Skip to main content

New-AdcChange

SYNOPSIS

Create a new change object.

SYNTAX

__AllParameterSets

New-AdcChange [-Property] <string> [[-OldValue] <Object>] [[-NewValue] <Object>]
[[-Identity] <string>] [[-Type] <string>] [[-Data] <hashtable>] [[-ToString] <scriptblock>]
[<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

-Data

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

Type: System.Collections.Hashtable
DefaultValue: '@{ }'
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 5
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Identity

Identity of the object being updated

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 3
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-NewValue

The new value the property should receive

Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-OldValue

The previous value the property had

Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Property

The property being updated

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-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: System.Management.Automation.ScriptBlock
DefaultValue: "{ '{0} -> {1}' -f $this.Property, $this.New }"
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 6
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Type

The object/component type of the object being changed

Type: System.String
DefaultValue: Unknown
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 4
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

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