Parameters

The most important piece of information in the DSC MOF schema file is the property declarations.

CIM uses the term property, and PowerShell uses parameter to refer to the same thing. It's easy to get confused by this, and some people use the term interchangeably.

As we will cover in The DSC PowerShell module file coming up, the parameters or properties the DSC resource accepts have to match each of the TargetResource functions. This rule also applies to the MOF schema file.

The parameter statement has the same information as the parameter statement in the TargetResource functions, but it looks drastically different. This is because it is using the more verbose CIM syntax, which is less pleasant to the eyes than the PowerShell syntax. There are a few rules to keep in mind when specifying the parameter set here, and we will cover them in the next section, when we author our own DSC resources.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset