DSC Resource with Mandatory Property

suggest change
[DscResource()]
class Ticket {
  [DscProperty(Key)]
  [string] $TicketId

  [DscProperty(Mandatory)]
  [string] $Subject
}

When building a DSC Resource, you’ll often find that not every single property should be mandatory. However, there are some core properties that you’ll want to ensure are configured by the user of the DSC Resource. You use the Mandatory parameter of the [DscResource()] attribute to declare a property as required by the DSC Resource’s user.

In the example above, we’ve added a Subject property to a Ticket resource, that represents a unique ticket in a ticketing system, and designated it as a Mandatory property.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Creating DSC class-based resources:
* DSC Resource with Mandatory Property

Table Of Contents
1 Loops
19 XML
22 Strings
25 Aliases
47 MongoDB
57 Creating DSC class-based resources
65 AWS S3