I have been working on getting SharePoint 2013 installed on an upgraded development box. We upgraded the OS from Win2008R2 to Win2012. I have already installed SQL2012, SP1, SSRS SP1, and SQL 2012 for PowerPivot 2013. Now to the problem … I cannot get PowerShell to work with SharePoint. When I run the SP2013 Mgmt. Shell an immediate error is generated:
Add-PsSnapin : Cannot load Windows PowerShell Snap-In Microsoft.SharePoint.PowerShell because fo the following error: Unable to cast object of type ‘Microsoft.SharePoint.PowerShell.SPCmdletSnapIn’ to type ‘System.Management.Automation.CustomPSSnapIn’
I have 4 admin accounts which are all part of the local admins group. I will give them fake names: SQLSetup, SQLAdmin, Setup, and Farm domain accounts.
I have installed SQL 2012 and installed SP2013 and have Central Admin up, but I have not configured any services or Web Applications or Site Collections.
Any ideas on how to fix this issue?
p.s. I did run PowerShell as Admin, too.
Â
Â
Â
Config DB should get you going and then you can use Add-SPShellAdmin.
See this forum post for more details:
But for which databases? Every database? just “Admin_Content_DB”, or just “Config_DB”? Is there a way to automatically assign a checkmark to allow this?
It’s not enough for your account to be a local admin, you also need SharePoint_Shell_Access role for PowerShell:
I went to check the permissions on SQL Server “Admin_Content_DB” and the “Config_DB”. Which checkmarks should be checked for my 4 admin domain accounts when looking at “User Mappings”? I am seeing a number of options, such as:
- public
- db_owner
- db_securityadmin
- SharePoint_Shell_Access
- SPDataAccess
How do these settings affect my ability to use PowerShell? It looks like they could be related, but not sure.
Â
I have been to these pages time and again over the past 2 days. They were not successful in fixing the issue. I cannot get to the 4th link though, my company’s websense is blocking the site.