Forum Discussion
Nissan Dookeran
Jan 06, 2018Copper Contributor
Cannot execute SharePoint Powershell commands from remote powershell
I am trying to use Powershell remoting to run SharePoint Powershell commands from my client machine after remoting to the SP Server. I am getting the following error
Cannot access the local farm. V...
- Feb 07, 2018
Try running PowerShell "As Administrator", then (substituting farm credentials)
runas.exe /noprofile /env /user:domain\farmadmin "powershell.exe"
This should start new PowerShell window running as the Farm Administrator. Then:
asnp microsoft.sharepoint.powershell
You can use
Add-SPShellAdmin domain\username
to give yourself Shell Admin access.
Bill_Ayers1
Feb 07, 2018MVP
Try running PowerShell "As Administrator", then (substituting farm credentials)
runas.exe /noprofile /env /user:domain\farmadmin "powershell.exe"
This should start new PowerShell window running as the Farm Administrator. Then:
asnp microsoft.sharepoint.powershell
You can use
Add-SPShellAdmin domain\username
to give yourself Shell Admin access.