Hello,
Since PowerShell 3, we have an incredibly good Integrated Scripting Environment shipped with for free.I kind of fan of the “Ctrl+J” shortcut, or “Edit -> Start Snippets”. You have instant access to a lot of code structure of PowerShell scriptword, of functions templates, as well as DSC templates :
If this is not enough for you, you can create your own snippets code, just like that :
$snippet = @{ Title = "Help"; Description = "Standard script Help"; Text = @" <# .SYNOPSIS .DESCRIPTION .EXAMPLE .PARAMETER .INPUTS .OUTPUTS .NOTES .LINK http://ItForDummies.net #> "@ } New-IseSnippet @snippet
You can write whatever you want in the herestring, you can even use variables. You may want to use the “-Force” on New-IseSnippet if you need to modify an existing one.
Once you’re done, “Ctrl+J” again :
All your custom snippets are stored next to your PowerShell profile :
C:Users$env:usernamedocumentsWindowsPowerShellsnippets
Nice one!