[SPShellAdmins] Setting specific DBs did not succeed
See original GitHub issueProblem description
I always get an error when setting the ShellAdmins. This occurs on the BCS-DB and Secure Store. As far as I noticed the DBs are created differently than the others. In the SQL the farm account is not set at Security > Users at the specific DBs. Instead the dbo-Account uses the schema of the farm account. Could that be the problem?
Verbose logs
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
"Cannot add DEV\Farm to the SharePoint_Shell_Access role of the database SP16-JUMP_ServiceApplication_BusinessDataConnectivity. A possible cause of this error
is that the account name was already added to the database as a login using a different user name than the account name."
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Get-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving BeginProcessing Method of Add-SPShellAdmin.
Some or all identity references could not be translated.
+ CategoryInfo : InvalidData: (Microsoft.Share...AddSPShellAdmin:) [], CimException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin
+ PSComputerName : SERVER01
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving ProcessRecord Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: [[SPShellAdmins]AddShellAdmins] Leaving EndProcessing Method of Add-SPShellAdmin.
VERBOSE: [SERVER01]: LCM: [ End Set ] [[SPShellAdmins]AddShellAdmins] in 0.8280 seconds.
The PowerShell DSC resource '[SPShellAdmins]AddShellAdmins' with SourceInfo 'D:\INSTALL\DSC\SharePoint.ps1::837::17::SPShellAdmins' threw one or more non-terminating
errors while running the Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for
more details.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : NonTerminatingErrorFromProvider
+ PSComputerName : SERVER01
DSC configuration
SPShellAdmins AddShellAdmins {
MembersToInclude = @("DEV\Farm","DEV\Admins","DEV\ShellAdmins")
AllDatabases = $true
IsSingleInstance = "Yes"
PsDscRunAsCredential = $SpFarmAccount
DependsOn = "[SPFarm]CreateOrJoinSharePointFarm"
}
Suggested solution
Actually I don’t know whether my description includes the solution?!
SharePoint version and build
SharePoint 2016
16.0.5227.1000
Operating system the target node is running
OsName : Microsoft Windows Server 2016 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture : 64-bit
WindowsBuildLabEx : 14393.4825.amd64fre.rs1_release.211202-1611
OsLanguage : en-US
OsMuiLanguages : {en-US}
PowerShell version and build the target node is running
Name Value
---- -----
PSVersion 5.1.14393.4583
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.4583
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
SharePointDsc version
Name Version Path
---- ------- ----
SharePointDSC 4.5.1 C:\Program Files\WindowsPowerShell\Modules\SharePointDSC\4.5.1\SharePointDSC.psd1
Issue Analytics
- State:
- Created 2 years ago
- Comments:27 (13 by maintainers)
Top Results From Across the Web
Add-SPShellAdmin (sharepoint-server)
When you run this cmdlet to add a user to the SharePoint_Shell_Access role, you must have membership in the securityadmin fixed server role...
Read more >Get-SPShellAdmin (sharepoint-server)
Use the Get-SPShellAdmin cmdlet to return the names of all users who have the SharePoint_Shell_Access role in a database.
Read more >Add-SPShellAdmin–user cannot exist in database
Connect to SharePoint config database using Management Studio · Open SharePoint config database · Change database dbo using the following command:
Read more >Permissions error setting up SharePoint 2010 PowerShell ...
I realise installing SP on a DC is not advised but I've no alternative. I have checked:
Read more >Add-SPShellAdmin
Use the Add-SPShellAdmin cmdlet to add a user to the SharePoint_Shell_Access role as follows: –If you specify only the user, the user is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ykuijs I am going to to test your code I hope next week. I will install another system from scratch and I can rerun the first system. What do you think is the best way?
Nevertheless: When I read your comments, I wondered whether I am using the modules wrong… Maybe I don’t need to put the users in as shell Admin… Is this a way?
Actually the error did not occur anymore! 😃