SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On a fresh SP2010 install.

I run powershell as the admin

I have my policy set to unrestricted.

I've tried embedding this in a .ps1 file or running in the shell.. but get:

Powershell Get-SPServiceInstance - The term 'Get-SPServiceInstance' is not recognized as the name of a cmdlet

I've also tried loading microoft.SharePoint firrst and it did not help

Am I missing something here?

share|improve this question
up vote 8 down vote accepted

You need to register SharePoint snap-in that contains the cmdlets by adding Add-PSSnapin Microsoft.SharePoint.PowerShell before you call any SP cmdlets.


Add-PSSnapin Microsoft.SharePoint.PowerShell
Get-SPServiceInstance | Where-Object {$_.TypeName -eq 'Central Administration'}

will return

TypeName                         Status   Id                                  
--------                         ------   --                                  
Central Administration           Online   xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

You can also use SharePoint 2010 Management Shell:

share|improve this answer

Instead of just loading PowerShell, goto the start menu - all programs - sharepoint server - sharepoint management shell. That loads powershell with the Sharepoint addons.

share|improve this answer
This helped me, +1. – JᴀʏMᴇᴇ Apr 30 '12 at 14:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.