Creating DSC Class-Based Resources

suggest change

Versions

[{“Name”:“5.0”,“GroupName”:null},{“Name”:“5.1 Preview”,“GroupName”:null}]

Introduction

Starting with PowerShell version 5.0, you can use PowerShell class definitions to create Desired State Configuration (DSC) Resources.

To aid in building DSC Resource, there’s a [DscResource()] attribute that’s applied to the class definition, and a [DscProperty()] resource to designate properties as configurable by the DSC Resource user.

Remarks

A class-based DSC Resource must:

After creating a class-based PowerShell DSC Resource, it must be “exported” from a module, using a module manifest (.psd1) file. Within the module manifest, the DscResourcesToExport hashtable key is used to declare an array of DSC Resources (class names) to “export” from the module. This enables consumers of the DSC module to “see” the class-based resources inside the module.

Feedback about page:

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


Creating DSC class-based resources:
* Creating DSC Class-Based Resources

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