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"
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityNeed 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"
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:
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.