Skip to content

Test-M365DSCParameterState

Description

Performs drift evaluation between desired and current values, records drift details, emits telemetry, and can write event log entries for drift and non-drift states.

Output

This function outputs information as the following type: System.Boolean

Parameters

Parameter Required DataType Default Value Allowed Values Description
CurrentValues True Hashtable Specifies the current values retrieved from the tenant.
DesiredValues True Object Specifies the desired values to compare against.
ValuesToCheck False Array Specifies the property names that should be compared.
Source False String Generic Specifies the resource/source name used for logging and telemetry.
IncludedDrifts False Hashtable Specifies precomputed drift details to include in comparison output.
NoEventMessage False SwitchParameter Indicates that event log messages should not be written.
NoDriftReset False SwitchParameter Indicates that global drift collections should not be reset before comparison.
ExcludedProperties False String[] Specifies property names to skip during comparison.