Remove SharePoint DB without having SQL Management Studio access…

Remove SharePoint DB using PowerShell

Just a quick tip that can help a lot in some situations, when in the situation when you for example have deleted a service application and the DB’s are still there, the DBA’s have all left and you have no way of connecting to SQL with a management tool…

This is what you can do, given that you have the permissions…(high?)

(Will list all databases used by SharePoint, Name and GUID and Type.)

$DatabaseToDelete = Get-SPDatabase <GUID of the database you need to get rid of>
(Load the database as a SPDatabase object)

(It’s now gone…)

Thats all there is to it.



Twitter | Technet Profile | LinkedIn

SharePoint 2012/2013 Wishlist – Dear Microsoft…

SharePoint 2012/2013 Wishlist…dear Microsoft…

Ok, this time I would like to add a post intended for Microsoft and the product group, but also for all of you SharePoint fans out there.
I guess that you have like me and like this time my dear coworker Mattias Gutke who cowrote this list, thought over time that this and this should be done better or added in the next version.

However, I do not know of any good way to get this knowledge across to the product group, or even if there is a way to email someone. Perhaps there is for the MVP’s or the TAP/TechPreview community but for all of us mere mortals??
During my 8+ years at Microsoft there was always talk about the emailaddress I still today do not know if it even existed or if it was monitored.

So, I’ll just post the list we have gathered over time here and my hope is that it somehow will make it’s way to the top. Please aslo feel free to add your own reasonable requests as a comment and I will be happy to review and possibly add it to the list.

Ok, here we go! The list of features, functionality, added/fixed settings in the next version of SharePoint, SharePoint 2012/2013 (working title SharePoint v. 15)

Dear Microsoft, this is what we want:

  • In CA, add a setting for a common Farm wide prefix for all databases. Skip the guid from the gui if this is set.
    Example: Farmname_databasetype_function
  • Add a possibility to audit all Central administration settings, even when changed from PowerShell. Audit data should be collected at a separately named database server and database(can be the same as the farm SQL)
  • If a service or feature needs to be started in order to create a service application or other objects in CA, prompt to start them.
  • Add a link to the Search administration from the start page in CA when Search is installed.
  • Add a ‘Verify Kerberos setup’ that can access data and verify if a system are configured properly to operate using Kerberos authentication.
  • Add a wizard for setting up Claims authentication from possibly other external authenticators)
  • Record actions taken in CA as Powershell commands so that they can be re-executed in another farm or again in the same farm.
  • Save farm settings to xml+wsp, then import settings to new farm. An improved semi-automated way to transfer a test environment to prod or prod to test. Import will implement the exact same settings as in source farm complete with service applications and solutions. Acount and unique settings will be editable easily in the xml.
  • Correlation id link to logfile for admins, even a linenumbers would be great.
    Also for the end user experience they would be able to send (with a button) that id & link to an admin. with the option to write error/problem desctiption. with choices??? i.e Minor incident, Critical for business etc.
  • Easier to get UPS up and running in some way. installed default? but not activated/configured feature/service
  • Much easier navigation within CA, everything is still a mess. Hate to se a couple of settings as a preview but when you go into i.e Monitoring you will find even more, show everything at the beginning or nothing exectp the title of the section.
  • Visual Farm topology in CA would be nice to have, with clickable areas to get more information.
  • When copy a item to another library within the site collection a browse button should be available, you should not have to specify a URL!!!
  • Clean up permission pages, and default should only be 3 sharepoint groups, visitor, member owner
  • Add support to export/import termstore synonyms.
  • Add support for Managed metadata/Termstore in SharePoint Workspace.
  • Allow the ability to enter metadata on multiple-document upload
  • PDF-ifilter out of the box!
  • Auto-remove from SharePoint if AD-object is terminated/removed.
  • You should not have to have sharepoint installed on your VS dev machine, connect and publish to any external sharepoint farm. It should be enough to install an SDK for SharePoint.
  • A way to in the GUI or Visual Studio, select the components that you want to be part of a new Web Template/Site Definition.
  • If a new update/CU/SP is available for each product/feature/service, In the upgrade/version/patch level page in CA. Link to the correct place to get that patch/CU/SP, dont want to google it up every time!!!
    One place to select update farm (select in list to what cu/SP)!
  • Same for Language packs as for CU/SP, one place to select in CA and the languages should be downloaded and installed.
  • Export some configuration in CA as a powershellscript
  • Add an extended default example metadata classification tree to the term store.
  • Add easier export import of metadata from the term store.
  • built in warm-up-script functionality.
  • Built in Scedule task functionality.
  • Under site settings, red titles are features available but not enabled due to some feature that needs activation like (in red) Navigation – SharePoint Server Publishing Infrastructure feature. Once activated the feature turns blue and the text shoowing witch feature needs to be activated is gone.
  • Or, as above but with most settings available but if the feature is not enabled, you get a dialog that says that this feature will be activated, do you wish to go ahead?
  • Easier cutomization of the ribbon, checkboxes of what options should be available, today it’s too overwhelming experience for endusers. also a tab for admin/owner for the ribbon would be nice to be able to select all non-endusers settings.

For the rest of you – Enjoy!


  (with great contributions from Mattias Gutke – Enfo Sweden)

Whitepaper – SharePoint 2010 Site Settings made easy


Ok, when lacking a better way of getting this out to the public, I’ll just drop it here for now, this is free and it is a lot of work behind it, please download and use if you find it’s content valuable. Perhaps I will find a better means of getting it out, but this is ok for now.

As you all know, the Site Settings in SharePoint Server 2010 are dynamic, meaning that they change as different features are enabled or disabled. Some are available in the Site Collection root only(SPSite), some in subsites(SPWeb) only.
All of these seetings that have been made available to us in SharePoint Server 2010, I have catalogued and tagged.

You will find all settings explained, when they show up and what they do, what the url is and if it can be controlled using PowerShell.
These are the sections that we have seen so many times but perhaps not reflected over, I know I still saw a setting or two that I did not know existed during mywork with this paper…

Site Settings, 71 all in all available in the following categories:

Users and permissions
Site Administration
Site Collection Administration
Look and feel
Site Actions
Reporting Services

Download, but please do not share the document, share the link. That way I will get some form of reward in knowing how many people have downloaded and used my paper. Thanks!

Big THANKS to my present and future Collegues and friends for helping out and supporting the idea:
Mattias Gutke (Enfo Zipper)
Niklas Goude (Truesec)
Anders Grönlund (Enfo Zipper)

I owe you guys big time!

For the rest of you – Enjoy!


What’s New for SharePoint 2010 Development in Visual Studio 2012 RC

I previously added some info references to the new and coming Visual Studio, that has some new really nice features for us SharePoint fans. This time I have installed the smokin hot new RC of Visual Studio 2012 and I’ll here give you a taste of whats to come, in pictures….

As you can see, the GUI is all Metro now, the logo and all parts of Visual Studio have been Metrofied. Not bad…

Not bad at all….

We have the following project types to select from in the RC. I suspect that there will be change here come release time.
(in 2012 we have 12 templates default in 2010 for SharePoint 2010)

New items list…

And the really nice remote publishing possibility.

For a more complete list of news in VS 2012, see: What’s New for SharePoint 2010 Development in Visual Studio 11



Comment out – any way you can

Always, when you want to comment out something, I notice what language I’m in and can never remember what the comment out is for a perticular language…so, I have compiled what I usually work with withing the boundaries of SharePoint.

Hope they can help you as well.

Trasact SQL
Comment out a single line:
—  Comment out this row

Comment out a paragraph:
/* Comment out this
entire paragraph spanning
over several rows */

Comment out a line:
: Comment out this row
(Yes, the starting ‘:’ is what does it…)

Comment out a row or paragraph:
<!– Comment out this row or an entire paragraph/section from start to stop –>

Comment out a single row:
#  Comment out this row

Comment out a row or paragraph:
/* Comment out this row or an entire paragraph/section from start to stop */

Comment out a single row:
// Comment out this row

Comment out a row or paragraph:
/* Comment out this row or an entire paragraph/section from start to stop */

Comment out a single row:
’ Comment out this row

Comment out a row or paragraph:
<!– Comment out this row or an entire paragraph/section from start to stop –>