-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Hi,
I was writing a DSC script and I noticed that the Example #2 did not work at all.
In the TestScript section:
TestScript = { $state = $GetScript if( $state['Result'] -eq $using:version ) { Write-Verbose -Message ('{0} -eq {1}' -f $state['Result'],$using:version) return $true } Write-Verbose -Message ('Version up-to-date: {0}' -f $using:version) return $false }
The example tries in the query result of the GetScript part, by using $GetScript in the TestScript section. The $GetScript variable only contains the scriptblock/source code from GetScript. No actual results that you returned in the GetScript section.
I don't know if it's a DSC script resource bug or if the documentation is wrong.
I could not get it working.
Documentation source:
https://github.com/PowerShell/PowerShell-Docs/blob/staging/dsc/scriptResource.md
Thanks,
N