I was using Windows Poweshell - ISE for creating some power shell scripts and got the following error.
"get-spfarm : The term 'get-spfarm' 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."
Checked the PowerShell Code and found that I forgot to add powershell snapin and added the following and the script got executed.
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
"get-spfarm : The term 'get-spfarm' 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."
Checked the PowerShell Code and found that I forgot to add powershell snapin and added the following and the script got executed.
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Thank you! This worked for me.
ReplyDeletethanks, that worked for me too. I was looking for the snapin name and it was pretty obvious
ReplyDelete