Search This Blog

Wednesday 23 July 2014

Deleting a Service Application with Power Shell

Hi,

Here is how to delete a service app with Power Shell

Run
$spapp = Get-SPServiceApplication -Name "<Service application display name>"
Then to keep the data
Remove-SPServiceApplication $spapp
Or remove Data
Remove-SPServiceApplication $spapp -RemoveData
More details
http://technet.microsoft.com/en-us/library/ee806875(v=office.14).aspx

If the above does not work you can try this command(Dirty Method):
stsadm -o deleteconfiguratio nobject -id <ID>

Where you can change "<id>" to $spapp (Suppose to, did not test it) 
you can also run get-SPServiceApplication for a list.

Wednesday 9 July 2014

SharePoint 2013 Managed Metadata Service KeyNotFoundException

Hi,

Getting this error on a SharePoint 2013 farm when trying to access term store:

Failed to get term store for proxy 'Managed Metadata Service'. Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

Looks like the most common way to solve this is to recreate your managed metadata.

I did a little investigation. And nothing worked.

At the end i just recreated it...

Be sure to have a backup.

Detach The metadata DB
Delete and then recreate the managed metadata service application.
Attach the old DB and in the metadata settings point to it.