Grants a user/group permission to start/stop (i.e. use PowerShell's *-Service cmdlets) a service.


Grant-ServiceControlPermission [-ServiceName] <String> [-Identity] <String> [-WhatIf] [-Confirm] [<CommonParameters>]


By default, only Administrators are allowed to control a service. You may notice that when running the Stop-Service, Start-Service, or Restart-Service cmdlets as a non-Administrator, you get permissions errors. That's because you need to correct permissions. This function grants just the permissions needed to use PowerShell's Stop-Service, Start-Service, and Restart-Service cmdlets to control a service.

Related Commands


Name Type Description Required? Pipeline Input Default Value
ServiceName String

The name of the service.

true false
Identity String

The user/group name being given access.

true false
WhatIf SwitchParameter false false
Confirm SwitchParameter false false
CommonParameters This cmdlet supports common parameters. For more information type
Get-Help about_CommonParameters.


Grant-ServiceControlPermission -ServiceName CCService -Identity INITRODE\Builders

Grants the INITRODE\Builders group permission to control the CruiseControl.NET service.