You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Details of the scenario you tried and the problem that is occurring
MultipleInstances option is a String. However, Get-TargetResource returns it as Microsoft.PowerShell.Cmdletization.GeneratedTypes.ScheduledTask.MultipleInstancesEnum, which causes Test-TargetResource function to always return $false.
Verbose logs showing the problem
VERBOSE: [TEST-SERVER]: [[ScheduledTask]MyScheduledTask] NOTMATCH: Type mismatch for property 'MultipleInstances' Current state type is 'Microsoft.PowerShell.Cmdletization.GeneratedTypes.ScheduledTask.MultipleInstancesEnum' and desired type is 'System.String'.
Suggested solution to the issue
Test-TargetResource could convert $currentValues['MultipleInstances'] value from enum to String
Alternatively, Get-TargetResource could do the enum -> string conversion.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
# insert configuration here
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
6.5.0.0
The text was updated successfully, but these errors were encountered:
Details of the scenario you tried and the problem that is occurring
MultipleInstances
option is aString
. However,Get-TargetResource
returns it asMicrosoft.PowerShell.Cmdletization.GeneratedTypes.ScheduledTask.MultipleInstancesEnum
, which causesTest-TargetResource
function to always return$false
.Verbose logs showing the problem
Suggested solution to the issue
Test-TargetResource
could convert$currentValues['MultipleInstances']
value from enum toString
Alternatively,
Get-TargetResource
could do the enum -> string conversion.The DSC configuration that is used to reproduce the issue (as detailed as possible)
# insert configuration here
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
6.5.0.0
The text was updated successfully, but these errors were encountered: