You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `New-DscMetaConfiguration` cmdlet allows you to create a _localhost.meta.mof_ with the options specified when calling the cmdlet. Optionally, it will also apply the the meta configuration (and remove the temporary _localhost.meta.mof_).
4
+
5
+
How To Run
6
+
==========
7
+
Dot source the `New-DscMetaConfiguration.ps1` file into your session and run the following:
At it's core, this cmdlet just builds the DSC configuration code to create a _localhost.meta.mof_ file, based on the parameters specified. From there, a meta configuration file can be created, or it can be directly applied.
16
+
17
+
Future
18
+
======
19
+
In the near future, we will be packaging this cmdlet into a module and publishing to the PowerShell Gallery.
This example shows how configurations can be nested. Nesting configurations in this way, along with utilizing node configuration data, can allow you to build a group of configurations that selectively adds certain components, based on the configuration data.
4
+
5
+
How To Run
6
+
==========
7
+
This example can be run by cloning this repository, and then executing `RootConfiguration.ps1`. MOF files will be created in `\NestedConfigs\Output`.
8
+
9
+
How It Works
10
+
============
11
+
The `RootConfiguration.ps1` is the primary entry-point configuration. Executing this configuration will look for all `.ps1` files in the _Configurations_ folder, and will dynamically import them and execute the sub-configurations. It is required that sub-configurations have the same file name as their configuration name. This is used as a convention so that `RootConfiguration.ps1` knows which configuration to call.
12
+
13
+
Since each sub-configuration has access to the `$Node` variable, you can selectively skip configuration blocks (or return from the entire sub-configuration to return back to the root configuration) to change the resulting MOF file on a per-node basis.
14
+
15
+
Each node is processed consecutively, and the set of sub-configurations is processed for each node.
0 commit comments