description | ms.date | ms.topic | title |
---|---|---|---|
Command line reference for the 'dsc resource' command |
09/06/2023 |
reference |
dsc resource |
Invoke a specific DSC Resource.
dsc resource [Options] <COMMAND>
The dsc resource
command contains subcommands for listing DSC Resources and invoking them
directly. To manage resource instances in a configuration, see the dsc config command.
The list
command returns the list of available DSC Resources with an optional filter. For more
information, see dsc resource list.
The export
command generates a configuration document that defines the current state of every
instance for a specified resource. For more information, see dsc resource export.
The get
command invokes the get operation for a resource, returning the current state of a
resource instance. For more information, see dsc resource get.
The set
command invokes the set operation for a resource, enforcing the desired state of a
resource instance and returning the final state. For more information, see dsc resource set.
The test
command invokes the test operation for a resource, returning the expected and actual
state of an instance and an array of properties that are out of the desired state. For more
information, see dsc resource test.
The schema
command returns the JSON Schema for instances of a resource. This schema validates an
instance before any operations are sent to the resource. For more information, see
dsc resource schema.
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 resource help [<SUBCOMMAND>]
For example, dsc resource help
gets the help for this command. dsc resource help list
gets the help for the list
subcommand.
You can also use the --help option on the command or subcommand to display the help
information. For example, dsc resource --help
or dsc resource set --help
.
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