In this SharePoint tutorial, we will discuss how to solve Get-SPFARM is not recognized as the name of a cmdlet in PowerShell ISE in SharePoint 2013.
Get SharePoint Online (Office 365 Enterprise E3) Subscription for your Business NOW
When I try to execute “Get-SPFarm” in PowerShell ISE on WFE I got the below error message:
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….
The mistake I have done here is PowerShell ISE is designed for Windows PowerShell scripts. The script I was trying to execute is to get the FARM object and all the services running in that FARM. So we have to include SharePoint snapin to PowerShell.
Follow the below steps to execute this script in PowerShell ISE without this error:
1. Navigate to 15 hives bin folder with the below command
cd ‘.\Program Files\Common Files\microsoft shared\Web Server Extensions\15\BIN’
2. Once you move on to the bin folder add the snapin by executing the below command
3. By executing the above command PowerShell ISE will include all the SharePoint related dll files to execute any SharePoint object.
4. Now if you execute the script by clicking on F5 or by clicking on the play button you will see the output seamlessly.
Hope this helps to solve Get-SPFarm : The term Get-SPFarm is not recognized as the name of a cmdlet, function, script file or operable program error., Happy development in SharePoint !!!!