Skip to content

Compare-ADObjectProperties

SYNOPSIS

Compares the properties of two Active Directory objects.

SYNTAX

Compare-ADObjectProperties [-ReferenceObject] <String> [-DifferenceObject] <String> [-IncludeEqual]
 [<CommonParameters>]

DESCRIPTION

The `Compare-ADObjectProperties` function compares the properties of two Active Directory objects (e.g., users, groups, or computers) and identifies differences. Optionally, it can include properties that are equal in the output.

EXAMPLES

EXAMPLE 1

Compare-ADObjectProperties -ReferenceObject "CN=John Doe,OU=Users,DC=example,DC=com" -DifferenceObject "CN=Jane Doe,OU=Users,DC=example,DC=com"

Compares the properties of the two specified Active Directory objects and outputs the differences.

EXAMPLE 2

Compare-ADObjectProperties -ReferenceObject "jdoe" -DifferenceObject "janedoe" -IncludeEqual

Compares the properties of the two specified Active Directory objects and includes properties that are equal in the output.

PARAMETERS

-ReferenceObject

The identity of the reference Active Directory object (e.g., DistinguishedName, GUID, or SamAccountName).

Type: String
Parameter Sets: (All)
Aliases:

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

-DifferenceObject

The identity of the Active Directory object to compare against the reference object.

Type: String
Parameter Sets: (All)
Aliases:

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

-IncludeEqual

A switch parameter that, when specified, includes properties that are equal in the comparison output.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
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