Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Synopsis
Indicates whether an instance is in the desired state.
Metadata
SchemaDialect: https://json-schema.org/draft/2020-12/schema
SchemaID: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3.1.0/resource/properties/inDesiredState.json
Type: [boolean, 'null']
ReadOnly: true
Description
The _inDesiredState
canonical property indicates whether a resource instance is in the desired
state. Whether a resource's instance schema should include this property depends on whether the
resource's manifest defines the test property.
If the resource's manifest doesn't define test
, the resource relies on DSC's synthetic test. The
resource's instance schema must not include the _inDesiredState
property.
If the resource's manifest defines test
, the instance schema must include the _inDesiredState
property. When the resource returns the state of an instance for the get and set operations,
_inDesiredState
must be null
. When the resource returns the state of an instance for the test
operation, _inDesiredState
must be true
if the instance is in the desired state and otherwise
false
.
This property is read-only. The resource returns instances with this property, but the desired state can't include it.
To add this property to a resource's instance schema, define the property with the following snippet:
"_inDesiredState": {
"$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/v3/resource/properties/inDesiredState.json"
}