Skip to content

Get-ADUserEqualPermissions

SYNOPSIS

Compares and retrieves common permissions for a list of Active Directory users.

SYNTAX

Get-ADUserEqualPermissions [-Users] <String[]> [-Indirect] [<CommonParameters>]

DESCRIPTION

The `Get-ADUserEqualPermissions` function compares the group memberships of multiple Active Directory users and retrieves the common permissions shared among them. It supports both direct and indirect group memberships.

EXAMPLES

EXAMPLE 1

Get-ADUserEqualPermissions -Users "jdoe", "asmith"

Retrieves the common permissions shared between the users "jdoe" and "asmith."

EXAMPLE 2

Get-ADUserEqualPermissions -Users "jdoe", "asmith" -Indirect

Retrieves the common permissions, including indirect group memberships, shared between the users "jdoe" and "asmith."

PARAMETERS

-Users

A list of Active Directory users (e.g., DistinguishedName, SamAccountName) to compare permissions for.

Type: String[]
Parameter Sets: (All)
Aliases:

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

-Indirect

A switch parameter that, when specified, includes indirect group memberships (nested groups) in the comparison.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: False
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

OUTPUTS

NOTES