Templates/BasicStdTemplate.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<#
.Synopsis Template .DESCRIPTION This basic template has support for Write-Verbose, -WhatIf and whatnot. .Notes Author: Changes: #> [CmdletBinding(SupportsShouldProcess = $True)] param () #region Init $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition #endregion Msg "Start Execution" Write-Verbose "Script is in $scriptPath" if ($pscmdlet.ShouldProcess("ActiveCode", "Run Code")) { #Put your commands/code here... } Msg "End Execution" |