TLDR – The Add-SPShellAdmin and SPWebApplication.GrantAccessToProcessIdentity are very similar in what they do, but there are a few key differences: Add-SPShellAdmin: Should be used for granting admin accounts access to...
Ran into an interesting installation error – SharePoint was failing to create the Configuration Database..or so it appeared. Running New-SPConfigurationDatabase and running the SharePoint Products Configuration Wizard were both failing with the error “Value does not fall within expected range.” We were able to track down this issue in the ULS Logs and noticed all sorts of IIS-related errors:
Creating new application pool ‘SecurityTokenServiceApplicationPool’.
Adding DOMAIN\spfarmacct to local group IIS_WPG.
Adding DOMAIN\spfarmacct to local group WSS_WPG.
Adding DOMAIN\spfarmacct to local group PerformanceMonitorUsers.
Attempting to give SE_ASSIGNPRIMARYTOKEN_NAME privilege to application pool user DOMAIN\spfarmacct
Attempting to give SE_INCREASE_QUOTA_NAME privilege to application pool user DOMAIN\spfarmacct
An exception occurred while committing IIS configuration changes: Value does not fall within the expected range.
Unable to unprovision metabase object IIS://localhost/w3svc/AppPools/SharePoint Central Administration v4: System.Runtime.InteropServices.COMException (0x80070003): The system cannot find the path specified.
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
Removing the Web Server (IIS) Role Service and letting the prerequisite installer configure IIS was the ticket to get “past” the SharePoint Products Configuration Wizard. It looked like something was up with the client’s Windows Server 2012 R2 image which caused IIS to get a little out of whack. Some other items to watch out for in this configuration (SP10/Svr 2012 R2):
- SharePoint 2010 must be patched to SP2 + February 2014 CU to be fully supported running on Server 2012 R2. https://support.microsoft.com/en-us/kb/2724471
- Office Web Apps 2010 will not install on Server 2012 R2 (See the supported O/S on this download link: https://www.microsoft.com/en-us/download/details.aspx?id=39659)