In this SharePoint PowerShell tutorial, we will discuss how to solve Get-SPFARM is not recognized as the name of a cmdlet in PowerShell ISE in SharePoint 2013.
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 !!!!
You may like following SharePoint PowerShell tutorials:
- Delete content type from SharePoint list using PowerShell
- How to change SharePoint authentication from classic mode to claims based mode in SharePoint using PowerShell
- How to activate publishing feature in SharePoint 2013/2016 using PowerShell Script
- Change Site Collection URL in SharePoint 2013/2016 using PowerShell
- Bulk SharePoint Online Site Collection Creation using PowerShell
- Extend web application in SharePoint 2013
- Delete Hidden Web Application in SharePoint 2013 using PowerShell
- PowerShell out gridview in SharePoint 2013/2016
- Upload documents to SharePoint document library using PowerShell Remotely
- Upload documents from network drive to SharePoint 2013/2016 Server document library using PowerShell
- Change content type recursively using PowerShell SharePoint 2013
- Create Artifacts in SharePoint 2013/2016 using PowerShell
I am Krishna.Vandanapu a SharePoint architect working in IT from last 13+ years, I worked in SharePoint 2007, 2010, 2013, 2016 and Office 365. I have extensive hands on experience in customizing SharePoint sites from end to end. Expertise in SharePoint migration tools like Sharegate, Doc Ave and Metalogix. Migrated SharePoint sites from SharePoint 2007 to 2010 and 2010 to 2013 several times seamlessly. Implementing CSOM with Microsoft best practices. Spent quality time in configuring SharePoint application services like User Profile, Search, Managed Meta data services etc. Now exploring SharePoint Framework and SharePoint 2019
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.