Get Desired State Config. resources from a computer.
Syntax Get-DscResource [[-Name] String] [-Syntax] [CommonParameters] Key -Name String An array of names of the Desired State Configuration resource to view. -Syntax Indicates that the cmdlet returns the syntax view of the specified Desired State Configuration resources. The returned syntax shows how to use the resources in a PowerShell script.
Get-DscResource retrieves the Desired State Configuration resources present on the computer. It shows built-in and custom providers (created by the user), as well as composite resources (other configurations that are packaged as module or created at run time in the session).
Get all resources on the local computer:
PS C:\> Get-DscResource
Get the WindowsFeature resource:
PS C:\> Get-DscResource –Name WindowsFeature
Get the WindowsFeature resource, and show the syntax:
PS C:\> Get-DscResource –Name WindowsFeature -Syntax
Get the User resource, and then use the pipeline operator to return all the properties for the User resource.
PS C:\> Get-DscResource User | Select-Object -ExpandProperty Properties
“ I wanted to be a pharmacist. I liked the way our local pharmacist was always dressed in a nice white coat; he looked very calm, you'd give him money, and he'd give you something that you wanted to buy” ~ Walter Matthau
Related PowerShell Cmdlets:
New-DSCCheckSum - Create checksum files for DSC docs/resources.
Get-DscConfiguration - Get the current config. of a node.
Start-DscConfiguration - Apply Desired State config to nodes.
Get-DscLocalConfigurationManager - Get Local Config Manager settings.
TechNet - Desired State Configuration Overview.