Tuesday 4 June 2013

Checking which role can run a specific cmdlets


Below command is to find which role has the permissions to run the cmdlet "Get-ActiveSyncDevice" & "Remove-ActiveSyncDevice"

[PS] C:\Windows\system32>Get-ManagementRoleEntry "*\get-activesyncdevice"

Name                           Role                      Parameters
----                           ----                      ----------
Get-ActiveSyncDevice           MyBaseOptions             {ErrorAction, ErrorVariable, Identity, Mailbox, OutBuffer, OutVariable, SortBy, WarningA
Get-ActiveSyncDevice           View-Only Recipients      {Debug, DomainController, ErrorAction, ErrorVariable, Filter, Identity, Mailbox, Organiz
Get-ActiveSyncDevice           User Options              {Debug, DomainController, ErrorAction, ErrorVariable, Filter, Identity, Mailbox, Organiz
Get-ActiveSyncDevice           Mail Recipients           {Debug, DomainController, ErrorAction, ErrorVariable, Filter, Identity, Mailbox, Organiz


[PS] C:\Windows\system32>Get-ManagementRoleEntry "*\remove-activesyncdevice"

Name                           Role                      Parameters
----                           ----                      ----------
Remove-ActiveSyncDevice        MyBaseOptions             {ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, WarningAction, WarningVar
Remove-ActiveSyncDevice        User Options              {Confirm, Debug, DomainController, ErrorAction, ErrorVariable, Identity, OutBuffer, OutV
Remove-ActiveSyncDevice        Mail Recipients           {Confirm, Debug, DomainController, ErrorAction, ErrorVariable, Identity, OutBuffer, OutV

No comments:

Post a Comment