Skip to content

Get‑ServiceAccessRule

raandree edited this page Sep 6, 2026 · 1 revision

SYNOPSIS

Gets access rules from local services or the Service Control Manager.

SYNTAX

Service (Default)

Get-ServiceAccessRule [-Name] <Object[]> [-Account <Object[]>] [-ExcludeInherited] [-ExcludeExplicit]
 [-ThrottleLimit <Int32>] [<CommonParameters>]

ServiceControlManager

Get-ServiceAccessRule [-ServiceControlManager] [-Account <Object[]>] [-ExcludeInherited] [-ExcludeExplicit]
 [-ThrottleLimit <Int32>] [<CommonParameters>]

DESCRIPTION

Reads service or SCM DACLs and returns structured rules with SID, account, qualifier, and the corresponding typed service rights enum.

EXAMPLES

EXAMPLE 1

Get-ServiceAccessRule -Name BITS -Account 'BUILTIN\Users'

Gets BITS service access rules for the Users group.

PARAMETERS

-Account

Filters rules by account names, SIDs, identity references, or module identities.

Type: Object[]
Parameter Sets: (All)
Aliases: IdentityReference, ID

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeExplicit

Excludes explicit ACEs; service descriptors do not support inheritance.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeInherited

Excludes inherited ACEs; service descriptors normally contain explicit ACEs only.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Name

One or more local service names, ServiceController objects, or module outputs.

Type: Object[]
Parameter Sets: Service
Aliases: ServiceName

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ServiceControlManager

Selects the local Service Control Manager instead of a named service.

Type: SwitchParameter
Parameter Sets: ServiceControlManager
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ThrottleLimit

Limits concurrently processed canonical targets. One requests deterministic sequential execution.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: [Math]::Max(1, [Math]::Min(8, [Environment]::ProcessorCount))
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

System.ServiceProcess.ServiceController

OUTPUTS

WindowsAccessControl.ServiceAccessRule

WindowsAccessControl.ServiceControlManagerAccessRule

NOTES

RELATED LINKS

Home

Commands

DSC resources

Clone this wiki locally