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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.