Paste this code in a PowerShell ISE new tab :
[scriptblock]$code = {#PutYourCodeHere } New-IseSnippet ` -Text $code.ToString() ` -CaretOffset $code.ToString().Length ` -Force ` -Title ‘SnippetTitle’ ` -Description ‘SnippetDescription’
Replace the #PutYourCodeHere by your Powershell commands, set the snippet Title, description and run it. Why not make a snippet to create snippet.
No comments:
Post a Comment