Yesterday I experienced a strange issue: some commands disappeared from SharePoint 2010 Management Shell!
Like the screenshot below, the commands "New-SPAccessServiceApplication", "New-SPExcelServiceApplication" are not in the command list.
I checked the SharePoint version, which tells me 14.0.6029 (RTM with SP1).
Then I checked PowerShell Snapin, which is also correct as shown below:
Since there is no error message regarding the missing commands, I removed and then reloaded the SharePoint PowerShell Snapin, then everything back to normal as shown below.
I got this issue when trying to build a farm through PowerShell scripts. Initially there is no SharePoint farm, so PowerShell cannot load some Snapin completely. That's why we need to reload "Microsoft.SharePoint.PowerShell" after installing the core part (Initialize-SPResourceSecurity, Install-SPService, Install-SPApplicationContent, etc.)
Hope this post can save you some time.
No comments:
Post a Comment