Skip to content

Instantly share code, notes, and snippets.

@tekkies
Last active July 1, 2020 17:08
Show Gist options
  • Save tekkies/39688d3122f6f0edc8d75061083efd32 to your computer and use it in GitHub Desktop.
Save tekkies/39688d3122f6f0edc8d75061083efd32 to your computer and use it in GitHub Desktop.
Template PowerShell script with help and params
<#
.SYNOPSIS
10 words
.DESCRIPTION
Tweet
.NOTES
Full description
On multiple lines
.PARAMETER Mandatory
This ian a mandatory param
.PARAMETER Optional
This is an optional param
.PARAMETER Help
Show this help.
.EXAMPLE
Template.ps1 -Mandatory mandatoryValue -Optional optionalValue
#>
param([Parameter(Mandatory=$true)][string]$Mandatory, [string]$Optional="optionalValue",[switch]$Help)
$ErrorActionPreference = "Stop"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment