Active Directory Management Framework

Configuration driven Active Directory management.

Compare-AdcProperty

SYNOPSIS

Helper function simplifying the changes processing of Test-* commands.

SYNTAX

Compare-AdcProperty [-Property] <String> [-Configuration] <Object> [-ADObject] <Object> [-Changes] <ArrayList>
 [-Resolve] [[-ADProperty] <String>] [-AsString] [-AsUpdate] [-CaseSensitive] [-IfExists] [[-Type] <String>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Helper function simplifying the changes processing of Test-* commands.

EXAMPLES

EXAMPLE 1

Compare-AdcProperty -Property Description -Configuration $ouDefinition -ADObject $adObject -Changes $changes -Resolve

Compares the description on the configuration object (after resolving it) with the one on the ADObject and adds to $changes if they are inequal.

PARAMETERS

-Property

The property to use for comparison.

Type: String
Parameter Sets: (All)
Aliases:

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

-Configuration

The object that was used to define the desired state.

Type: Object
Parameter Sets: (All)
Aliases:

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

-ADObject

The AD Object containing the actual state.

Type: Object
Parameter Sets: (All)
Aliases:

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

-Changes

An arraylist where changes get added to. The content of -Property will be added if the comparison fails.

Type: ArrayList
Parameter Sets: (All)
Aliases:

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

-Resolve

Whether the value on the configured object’s property should be string-resolved.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-ADProperty

The property on the ad object to use for the comparison. If this parameter is not specified, it uses the value from -Property.

Type: String
Parameter Sets: (All)
Aliases:

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

-AsString

Compare properties as string. Will convert all $null values to “”.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-AsUpdate

The result added to the changes arraylist is a custom object with greater details than the default.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-CaseSensitive

Property comparisons are executed minding casing of values.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-IfExists

If the property compared does not exist on the configured item, return silently.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Type

What kind of component is the compared object part of. Used together with the -AsUpdate parameter to name the resulting object.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: Unknown
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

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