SharePoint Management Shell Commands not recodnized.

Aug 5, 2013 at 2:31 PM
Ivan,

Great job on automating these installs, your work is greatly appreciated.

I have encountered an issue installing the PeoplePack where upon launching the installer, it process through the install script until it calls the UPS script and throws the following error:
'The term 'get-spserviceapplication' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.'

I have looked everywhere for a solution but have not found anything that will resolve this issue. Launching the SharePoint Management Shell manually will allow the SharePoint specific commands to be run manually.

Would you be able to assist?

Thanks in advance,

Bryan J. Gill, MCNPS, S+
Coordinator
Aug 5, 2013 at 4:02 PM
Edited Aug 5, 2013 at 4:04 PM
Hi Bryan,

Thank you, for the kind words..

What happens when you run the SharePoint 2013 Management Shell as administrator with the following

Get-SPServiceApplication

Should list all of your Service Apps?

Get-SPServiceApplication | Where {$_.DisplayName -eq "User Profile Service Application"}

Should list your UPS?

You cant run the UPSSync.ps1 by itself, if you do, then you need to add the following:

### Add the snap in if it's not already added
if ((Get-PSSnapin | where { $_.Name -eq "Microsoft.SharePoint.PowerShell" } | Measure-Object).Count -lt 1)
{ Add-PSSnapIn Microsoft.SharePoint.PowerShell }


it should look like the following:

# install.ps1-v3 Ivan Sanders 01/30/2013

### Add the snap in if it's not already added
if ((Get-PSSnapin | where { $_.Name -eq "Microsoft.SharePoint.PowerShell" } | Measure-Object).Count -lt 1)
{ Add-PSSnapIn Microsoft.SharePoint.PowerShell }

$Password = ConvertTo-SecureString -AsPlainText -String "pass@word1" -Force


I'm not having this issue but please let me know if this resolves the issue for you



-Ivan
Nov 14, 2013 at 7:24 PM
FWIW, I had this problem as well and I had to reboot my server to get Get-SPServiceApplication to run in the SharePoint PowerShell snap-in. The Content Installer still wouldn't work, I think because it was trying to run the commandlet from regular PowerShell. The solution was to run SharePoint PowerShell, cd to the Peoplepack content folder, and run install.ps1.