MOF-based DSC resource folder structure

An MOF-based DSC resource has a strict folder structure. By convention, each PowerShell module that contains one or more DSC resources is stored in the $env:ProgramFiles\WindowsPowerShell\Modules folder. You can store DSC resources in any of the standard $env:PSModulePath paths, or you can store them in a location of your choosing as long as you append the location to the $env:PSModulePath variable before compiling the resource.

The strict folder structure for MOF-based DSC resources is as follows:

$env:ProgramFiles\WindowsPowerShell\Modules |- ExampleModule |- ExampleModule.psd1 |- DSCResources |- Example_InstallFoo |- Example_InstallFoo.psd1 (optional) |- Example_InstallFoo.psm1 (required) |- Example_InstallFoo.schema.mof ...

Get Learning PowerShell DSC - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.