#PSTip Identifying DSC commands

Note: This tip requires PowerShell 4.0 or above.

Starting in Windows PowerShell 4.0 with the new Desired State Configuration (DSC) feature, we now have one more command type added to the list of command types: Configuration.

To get a list of Configuration commands only from your PowerShell session, type:

PS> Get-Command -CommandType Configuration

To tell if a command in hand is a Configuration command, check the command ScriptBlock.IsConfiguration property

PS> $command.ScriptBlock.IsConfiguration

About the author: Shay Levy

Shay Levy is a Co-founder and editor of the PowerShell Magazine. He is a multiple-year recipient of the Microsoft MVP award, and a Microsoft Certified Trainer (MCT). Shay often covers PowerShell related topics on his blog and you can also follow him on Twitter at @ShayLevy

Related Posts

%d bloggers like this: