description | ms.date | ms.topic | title |
---|---|---|---|
Command line reference for the 'dsc config' command |
02/05/2024 |
reference |
dsc config |
Apply a configuration document.
dsc config [Options] <COMMAND>
The dsc config
command includes subcommands for managing the resource instances defined in a DSC
configuration document. To manage resources directly, see the dsc resource command.
The export
command generates a configuration document that defines the existing instances of a
set of resources. For more information, see dsc config export.
The get
command retrieves the current state of the resource instances in a configuration
document. For more information, see dsc config get.
The set
command enforces the desired state of the resource instances in a configuration document.
For more information, see dsc config set.
The test
command verifies whether the resource instances in a configuration document are in the
desired state. For more information, see dsc config test.
The help
command returns help information for this command or a subcommand.
To get the help for a command or subcommand, use the syntax:
dsc config help [<SUBCOMMAND>]
For example, dsc config help
gets the help for this command. dsc config help set
gets the help
for the set
subcommand.
You can also use the --help option on the command or subcommand to display the help
information. For example, dsc config --help
or dsc config set --help
.
Specifies the path to a data file containing the parameters to pass to the configuration as JSON or YAML. When you specify this option, DSC interprets the keys in the data file as parameters and uses the specified values. The values in the data file override any defaults defined in the configuration itself.
The data file must contain an object with the parameters
key. The value of the parameters
key
must be an object where each key is the name of a defined parameter and each value is a valid value
for that parameter.
This option can't be used with the --parameters
option. Choose whether to pass the parameters as
a data string with the --parameters
option or in a data file with the --parameters_file
option.
For more information about defining parameters in a configuration document, see DSC Configuration document parameter schema. For more information about using parameters in configuration document, see the parameters function reference.
Specifies the parameters to pass to the configuration as a JSON or YAML string. When you specify this option, DSC interprets the keys in the data string as parameters and uses the specified values. The values in the data string override any defaults defined in the configuration itself.
The data string must contain an object with the parameters
key. The value of the parameters
key
must be an object where each key is the name of a defined parameter and each value is a valid value
for that parameter.
This option can't be used with the --parameters_file
option. Choose whether to pass the
parameters as a data string with the --parameters
option or in a data file with the
--parameters_file
option.
For more information about defining parameters in a configuration document, see DSC Configuration document parameter schema. For more information about using parameters in configuration document, see the parameters function reference.
Displays the help for the current command or subcommand. When you specify this option, the application ignores all options and arguments after this one.
Type: Boolean
Mandatory: false
The dsc config *
subcommands create the DSC_CONFIG_ROOT
environment variable when you call a
command with the --path
option to specify the configuration document to use for the command. DSC
sets the value of the DSC_CONFIG_ROOT
environment variable to the full path of the folder
containing the specified configuration document.
Note
If you define the DSC_CONFIG_ROOT
variable outside of DSC, DSC raises a warning when it
overrides the existing environment variable's value for an operation.
You can use the envvar configuration function to reference that folder path for resource instances in the configuration.