DSC resource import declarations

One last area we need to cover before we get into the syntax of DSC configuration script files is DSC resource imports. When we write our DSC configuration blocks, DSC needs to know what external DSC resources are used in order to validate parameters, ensure the syntax is correct, and record version information about the DSC resources being used.

We use the Import-DSCResource command to tell DSC that the specified DSC resources must be loaded in order to parse this configuration file. These DSC resources must be present on the system in one of the paths listed in the PowerShell module path variable $env:PSModulePath, but they aren't executed when you compile the configuration script to MOF. They are inspected for the parameters needed by each DSC resource so that the DSC configuration script can be validated and then compiled to MOF.

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

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