Operations Shell–Using different credentials

Some companies setup their user accounts and then provide an administrator account, and maybe only the administrator account is a member of the Operations Manager Administrator user role. The Operations Console provides a login screen, so it’s not a problem authenticating to the management group. But the Operations Shell does not provide a login option – it will automatically attempt to login using the context of the current user.

This results in an access denied message:

New-SCOMManagementGroupConnection : The user does not have sufficient permission to perform the operation.

 

One way to get around this is to use the Powershell Get-Credential cmdlet. Add this to the beginning of administrative scripts or start your console sessions with:

 

$Credentials = Get-Credential –UserName [domain\username] -Message "Enter password"

$MS = [your management server name]

New-SCOMManagementGroupConnection -ComputerName $MS -Credential $Credentials

 

Smile

Comments welcome (links require moderation)