打开一个Windows PowerShell,然后执行Get-SPSite命令时候,报错了:
The error usually comes if you directly run the command in the Windows PowerShell Console. To resolve to execute the below command first:
Add-PSSnapin Microsoft.Sharepoint.Powershell
Ideally, we should run in SharePoint 2013 Management Shell rather than only in PowerShell console. So Open SharePoint 2013 Management Shell in Administrator mode and then run the Cmdlet the error will not come.