Home Dashboard Directory Help

ValidateSet for a DSC Parameter in a Class Based Resource Fails to Throw Error by azhskr


Status: 

Active


6
0
Sign in
to vote
Type: Bug
ID: 1267368
Opened: 4/21/2015 9:41:18 AM
Access Restriction: Public
0
Workaround(s)
view
3
User(s) can reproduce this bug

Description

A DSC Resource has a parameter Validation Set of ("a","b","c"). If a Configuration is built using this DSC Resource, with one of the values in the validation set, everything works as expected. If you build a Configuration using this DSC Resource with a value that is not part of the validation set, the LCM does not throw an error and creates the .MOF file. In addition, if you run Start-DSCConfiguration with the .MOF file, it also runs without throwing an error, but doesn't actually do anything. If you take the same values contained in the Validation Set and place them in an Enum block, and try to build a Configuration with a value outside the Validation Set, it immediately throws an error stating that the value is outside of the possible values.
Details
Sign in to post a comment.
Posted by Microsoft on 4/21/2015 at 7:28 PM
Thanks for your feedback. We will consider fixing this issue in future WMF release
Sign in to post a workaround.