Given this simple configuration file:
Configuration MyDscConfiguration {
    Node "TEST-PC1" {
        WindowsFeature MyFeatureInstance {
            Ensure = "Present"
            Name =  "RSAT"
        }
        WindowsFeature My2ndFeatureInstance {
            Ensure = "Present"
            Name = "Bitlocker"
        }
    }
}
MyDscConfiguration
When run, the MOF file generated for Node "TEST-PC1", will be placed in a sub-directory named, MyDscConfiguration. 
I am looking for a way to output the MOF to a custom directory location, e.g. mofs\MyDscConfiguration\
Is this possible?
Yes, your configuration has an -OutputPath parameter you can give it.
Configurations are, essentially, functions and work mostly the same way.
You can even use Get-Help MyDscConfiguration to see all the parameters it has (you can define your own param() block with it too, just like you would for a function).
TAB completion works too, so that's a quick way to discover the params.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With