Details of the scenario you tried and the problem that is occurring:
Get-TargetResource function returns the Ensure that was passed as the paramater, regardless if it is true or not. There is no check that the state are actually in desired state and setting Ensure accordingly.
The DSC configuration that is using the resource (as detailed as possible):
Any configuration
Version of the Operating System and PowerShell the DSC Target Node is running:
n/a
Version of the DSC module you're using, or 'dev' if you're using current dev branch:
Dev
Details of the scenario you tried and the problem that is occurring: Get-TargetResource function returns the Ensure that was passed as the paramater, regardless if it is true or not. There is no check that the state are actually in desired state and setting Ensure accordingly.
The DSC configuration that is using the resource (as detailed as possible): Any configuration
Version of the Operating System and PowerShell the DSC Target Node is running: n/a
Version of the DSC module you're using, or 'dev' if you're using current dev branch: Dev