Active Directory Management Framework

Configuration driven Active Directory management.

New-AdcChange

SYNOPSIS

Create a new change object.

SYNTAX

New-AdcChange [-Property] <String> [[-OldValue] <Object>] [[-NewValue] <Object>] [[-Identity] <String>]
 [[-Type] <String>] [[-Data] <Hashtable>] [[-ToString] <ScriptBlock>] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

DESCRIPTION

Create a new change object. Used for test results in cases where no specialized change objects are intended. Mostly used from the internal Compare-Property command.

EXAMPLES

EXAMPLE 1

New-Change -Property Path -OldValue $adObject.DistinguishedName -NewValue $path -Identity $adObject -Type Object

Creates a new change object for the path of an object

PARAMETERS

-Property

The property being updated

Type: String
Parameter Sets: (All)
Aliases:

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

-OldValue

The previous value the property had

Type: Object
Parameter Sets: (All)
Aliases:

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

-NewValue

The new value the property should receive

Type: Object
Parameter Sets: (All)
Aliases:

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

-Identity

Identity of the object being updated

Type: String
Parameter Sets: (All)
Aliases:

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

-Type

The object/component type of the object being changed

Type: String
Parameter Sets: (All)
Aliases:

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

-Data

Additional data to include in the change object. Will ignore keys named “Property”, “Old”, “New” or “Identity”

Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: @{ }
Accept pipeline input: False
Accept wildcard characters: False

-ToString

Scriptblock that determines, how the change is being displayed when a property itself. Defaults to ‘<property> -> <newvalue>’ Use $this to refer to the object being displayed.

Type: ScriptBlock
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: { '{0} -> {1}' -f $this.Property, $this.New }
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