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

Need to execute an out of the box cmdlet for SharePoint 2010... but cannot for the life of me figure out how to execute them.

What am I missing?

I am trying to execute "Get-SPServiceApplication"

share|improve this question
up vote 5 down vote accepted

You need to add SharePoint snap-in in order to use SharePoint cmdlets:

Add-PSSnapin Microsoft.SharePoint.PowerShell;

After this you'll be able to use Get-SPServiceApplication and all other SharePoint cmdlets.

Also, you can consider using another scenario accessing SharePoint-ready PowerShell console: press Start, type Sharepoint, and you will see something like this:

enter image description here

This will execute pre-configured console, where the SharePoint snap-in is already added.

Personally I prefer even to pin the "SharePoint 2010 Management Shell" shortcut to taskbar, to have it always ready to work.

share|improve this answer
that resolved my issue - you are a gentleman and a scholor... will mark as answer as soon as I can. – dbobrowski Jan 10 '12 at 15:51
Exactly. Just for additional info, if you want Sharepoint Snapin to be added automatically whenever you start Powershell, add this command to your $PROFIlE – Anatoly Mironov Jan 10 '12 at 15:57

Try typing this first:

Add-PSSnapin Microsoft.SharePoint.Powershell

share|improve this answer

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.