make sure your farm account has proper access.
- Click Start, and then right-click SharePoint 2010 Management Shell.
- Click Properties.
- Click the Shortcut tab in the SharePoint 2010 Management Shell Properties window.
- Input the following value in the Target field: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Version 2.0 -NoExit " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\sharepoint.ps1 ' "
If the above doesn't work, try the below one which worked all the time for me.
#Open Powershell and run the below commands
Start-Process cmd.exe -Credential "Domain\SP_Farm" -NoNewWindow -ArgumentList "Start-Process powershell.exe -Verb runAs"
# And then enter in cmd.exe
PowerShell -Version 2 #for SP 2010
# Add the snapin now
asnp *SharePoint*
Thanks & Regards,