Test-TargetResource

The Test-TargetResource function is similar to the Get-TargetResource function in that it inspects the current state of the system, but it takes things one step further. After inspecting the current state of the system, it compares it to the expected values provided by the user. Depending on the way the values are specified, it tests to see whether they match.

This function is required to implement all Key, Required, and Write parameters defined in the DSC resource definition file. Key and Required properties are required to be defined as mandatory parameters.

The Test-TargetResource function always returns a Boolean value of either $true or $false. If the target node is in the desired state, the function should return $true. If the target node is not in the desired state, it should return $false.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset