Powershell Nugget : DSC ISE Snippet

One of cmdlet available within Powershell ISE is New-ISESnippet. This snippet allows us to add new code snippets to the ISE environment which can be used later at multiple places thereby saving overall development time as well as ensuring standards.

Desired State configuration provides a new snippet called “DSC Resource Provider”

On the Script tab of Powershell ISE, Press “Control + J”. A suggestion box appears containing all the registered Powershell snippets on the machine. Alternatively, you can also click on Edit menu and then “Start Snippets” sub-menu item to get the same suggestion box.


You can go to “DSC resource provider” and click on it. It provides a templates for creating custom resources. It provides the template for all the three functions namely: Get-TargetResource, Set-TargetResource and Test-TargetResource.


Makes life a bit easier by not remembering the name of the mandatory DSC functions.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s