Archive

Archive for September, 2011

Fixing: Usage and Health Data Collection Service Proxy Stopped

September 22, 2011 1 comment

After provisioning all of my SharePoint 2010 Service Applications using PowerShell and checking to make sure all Service Applications had been provisioned correctly I noticed that even though the Usage and Health Data Collection Service was started the Proxy was stopped.  Apparently this is a known bug on clean installs of SharePoint 2010.  To fix this, and start this service proxy follow the steps below.

1.  Log into the Central Administration Server
2.  Bring up the SharePoint 2010 Management Shell (PowerShell) with Admin rights.
3.  Type: Get-SPServiceApplicationProxy

This will list all the IDs for each Service Application Proxy on the farm

4.  Find the ID for Usage and Health Data Collection Service Proxy
5.  Rigt click, select “Mark” and highlight the ID and right click again.  This will paste the ID in the clipboard.
6.  Next type: 

$UP = Get-SPServiceApplicationProxy | Where {$_.ID -eq “Paste ID Here”}
$UP.Provision()

This will provision the Usage and Health Collection Service Proxy.

Browse to Central Administration -> Application Management -> Manage Service Applications.  You might have to refresh the page if this page is already up.  You should now see that the proxy service has now started.

You can follow these same steps for any other Service Proxy that may be stopped.

*Bonus

If you don’t want to get the Proxy ID’s you can provision the proxy services by simply calling its name i.e.  This will eliminate one less powershell script.

$UP = Get-SPServiceApplicationProxy | Where {$_.TypeName -eq “Usage and Health Data Collection Proxy”}
$UP.Provision()

SharePoint 2010 Error Fixing: Missing Server Side Dependencies

September 14, 2011 2 comments

Error Fixing: Missing Server Side Dependencies

In SharePoint 2010 Health Analyzer if you see configuration errors – Missing Server Side Dependencies, and when opening up this configuration error you see GUIDs for missing web-parts dealing with SharePoint Search.  Follow the steps below to fix this error.

Browse to Central Administration -> System Settings -> Manage Services on server.

  1.  Change to the server that will handle the SharePoint Search Crawls.
  2. Scroll down until you find SharePoint Foundation Search and click ‘Start’ if it’s not already started.
  3.  Once the service is started click on the SharePoint Foundation Search link.
  4.  Enter in the Service Account, Content Access Account, Search Database names.  Make sure the account used for Service Account and Content Access Account has the correct permissions on the SQL Server.  Read-Only Access.
  5. Once the Service is started the service name changes to SharePoint Foundation Help Search
  6. Next browse to Central Administration -> General Application Settings -> Search -> Farm Search Administration -> Search Service Application.
  7. Once the Search Service Application page renders, close the browser.
  8. On the Search/Index server run an iisreset /noforce.
  9. Browse back to Central Administration, click on the SharePoint Health Analyzer, click on the Missing Server Side Dependencies error and click ‘Reanalyze Now’
  10. Error should disappear.

Adding Servers to a SharePoint 2010 Farm using PowerShell

September 1, 2011 Leave a comment

This is assuming that all the SharePoint 2010 Pre-requists have been installed on the server and that the SharePoint 2010 setup wizard has been ran WITHOUT having ran the SharePoint 2010 Products Configuration Wizard at the end of the installation.

1.  After installing all SharePoint 2010 Prerequists and running the Setup Wizard, make sure to uncheck the box at the end of the installation to avoid running the SharePoint 2010 Products Configuration Wizard.
2.  Open up SharePoint 2010 Management Shell (PowerShell)
3.  Type:

ConnectSPConfigurationDatabase -DatabaseServer “<$DatabaseServer>” -DatabaseName “<$RunSettings.ConfigurationDatabaseName>” -Passphrase “<$Passphrase>

Where:

  • <$DatabaseServer> is the name of the server that hosts the configuration database
  • <$RunSettings.ConfigurationDatabaseName> is the name of the configuration database
  • <$Passphrase> is the passphrase for the farm

4.  Next type and hit enter

Install-SPHelpCollection -All

5. Next type and hit enter 

 Initialize-SPResourceSecurity

6.  Next type and hit enter

Install-SPService

7.  Next type and hit enter

Install-SPFeature -AllExistingFeatures

8.  Finally type and hit enter

Install-SPApplicationContent

That’s it.  The new server should now be added to the farm.  Head over to Central Administration -> Manage Servers in this Farm and you should see the new server just added.

Of course all this can be done via the SharePoint 2010 Products Configuration Wizard without running PowerShell, but what fun is that!!

Unable to Remove Search Service Application in SharePoint 2010

September 1, 2011 5 comments

Recently the Search Service Application in my SharePoint 2010 farm became corrupt.  I was unable to do crawls or set content sources.  Everything within the Search Service Application was erroring out.  So since this was just a Search Service Application there is no harm in just blowing away this Service App, creating a new database and just reinializing a full crawl once its reconfigured.  However, when attempting to remove the Search Service Application within Central Administration it was erroring out, SharePoint was telling me it is unable to remove the Search Service Application for some odd reason.  Strange!

So I turned to PowerShell, if all fails this always comes to the rescue, correct?  Wrong! Even after attempting to remove the Search Service Application using PowerShell cmdlt

Remove-SPEnterpriseSearchServiceApplication

I was presented with a 30 min wait with no results.  I had to cntrl-c to break out of the PowerShell cmdlt.

So what now?  Can’t remove from Cental Administration and can’t remove using PowerShell.  How are we going to remove this service app?

Welcome back STSADM.  I was able to succesfully remove the service application by using our old SharePoint 2007 friend STSADM.

First I grab the Search Service Application GUID ID.

1.  Log into the Central Administration Server
2.  Open up SharePoint 2010 Management Shell (PowerShell)
3.  Type: Get-SPEnterpriseSearchServiceApplication
4.  This will list all properities of the Search Service Application.
5.  Right click and select “Mark”, highlight the Search Service ID and right click again to paste into the clipboard.

Second we are going to remove the Search Service Application using STSADM

1.  While still logged into the Central Administration Server open up a Command Prompt using Admin Rights
2.  Change directory to:  c:\Program Files\common files\Microsoft Shared\Webserver Extensions\14\bin
3.  Now type the STSADM command

stsadm -o deleteconfigurationobject -id [Search Service Application GUID ID].  Just right click in the window and paste the GUID ID.

4.  Hit Enter!

Thats it, STSADM will do its thing.  Now go back to Central Administration -> Application Management -> Manage Service Applications to double check and make sure that the Search Service Application was indeed removed for Service Applications.

You should now be good to go to recreate your Search Service Application.

Removing Unused Service Application App Pools in SharePoint 2010 using PowerShell

September 1, 2011 Leave a comment

Working with Service Applications within SharePoint 2010 can sometimes result in having to completely remove  and reconfigure it due to some type of corruption, possibly in the backend databases that has prevented it from working correctly.  I’ve had to do this a few times with Service Apps such as PerformancePoint, UserProfile, Search, and Secure Store applications, mutltiple times.

When I recreate and configure new Service Applications that i’ve previously removed I often like to keep the same Service Application App Pool names when I configure them initially.

Unfortunately when you delete or remove a Service Application in SharePoint 2010, it deletes the Service Application and its database fine, however it does not delete the Service Application App Pools.  These are lingering in SharePoint 2010 purgatory.  Since I don’t like to resue application pools after removing corrupted Service Applications I tend not to select the existing Service Application App Pools that were created, you will have the option to do this when creating new Service Application by selecting an existing app pool instead of creating a new one.

If you try to create a new app pool with the same name that was used previously you will recieve an error that SharePoint already has an IIS Application Pool (SPIisWebServiceApplicationPool) that exists with that same name.

If you check IIS you will not find this Application Pool. 

Here is where our good friend PowerShell comes into handy.

You can view and remove the Service Application Application Pool by using PowerShell.

1.  Log into your Central Administration server
2.  Bring up SharePoint 2010 Management Shell (PowerShell) using Admin rights
3.  To list all SharePoint 2010 Service Application App Pools run this PowerShell cmdlt

Get-SPServiceApplicationPool

4.  To remove the Service Application App Pools simply run this PowerShell cmdlt

Remove-SPServiceApplicationPool “[Name of Service Application App Pool]”

5.  You will be promoted to confirm:

Are you sure you want to perform this action?
Performing operation “Remove-SPServiceApplicationPool” on Target “Name of Service Application Pool”
[Y] Yes [A]Yes to All [N] No [L] No to All [S] Suspend [?] Help
<default is “Y”>:

6.  After selecting Y for Yes, you can now double check to make sure the Service Application App Pool was indeed removed by re-running the Get-SPServiceApplicationPool cmdlt
7.  You should no longer see the Service Application App Pool.
8.  Now you can go back to Central Administration and attempt to create the Service Application App Pool using the same name used previously.