< Back

Get-CServicePermission

Sun Jan 12, 2020 9:57 pm

NAME Get-CServicePermission



SYNOPSIS

Gets the permissions for a service.





SYNTAX

Get-CServicePermission [-Name] <String> [[-Identity] <String>] [<CommonParameters>]





DESCRIPTION

Uses the Win32 advapi32 API to query the permissions for a service. Returns `Carbon.ServiceAccessRule` objects

for each. The two relavant properties on this object are



* IdentityReference - The identity of the permission.

* ServiceAccessRights - The permissions the user has.





PARAMETERS

-Name <String>

The name of the service whose permissions to return.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Identity <String>

The specific identity whose permissions to get.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Carbon.Security.ServiceAccessRule.





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-CServicePermission -Name 'Hyperdrive'



Gets the access rules for the `Hyperdrive` service.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-CServicePermission -Name 'Hyperdrive' -Identity FALCON\\HSolo



Gets just Han's permissions to control the `Hyperdrive` service.











RELATED LINKS

Grant-ServicePermissions

Revoke-ServicePermissions