when opening the sharepoint 2013 management shell, I get the error
Add-PsSnapin : Cannot load Windows PowerShell snap-in Microsoft.SharePoint.PowerShell because of the following error: Unable to cast object of type 'Microsoft.SharePoint.PowerShell.SPCmdletSnapIn' to type 'System.Management.Automation.CustomPSSnapIn'. At C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\CONFIG\POWERSHELL\Registration\SharePoint.ps1:3 char:1 + Add-PsSnapin Microsoft.SharePoint.PowerShell + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.SharePoint.PowerShell:St ring) [Add-PSSnapin], PSSnapInException + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.Ad dPSSnapinCommand
system is sharepoint 2013 sp1 enterprise, windows server 2012 r2, farm, non production, power shell 4.0, sql server 2012
after the window opens, I cannot run any cmdlets - which given the error seems understandable. I wanted to create a host-named site collection which can only be done via powershell.
the user is in the sql server SharePoint_Shell_Access role for the sharepoint_config db.
suggestions which have not worked include uninstalling windows management framework 3.0 which does not apply, running the shell in elevated mode
suggestions which will not be tried include uninstalling/reinstalling sharepoint, downgrading windows server
does anyone know how to fix this problem?