Skip to content

Instantly share code, notes, and snippets.

@byrney
Created December 24, 2015 06:32
Show Gist options
  • Save byrney/ed8d85b4c3302d05c685 to your computer and use it in GitHub Desktop.
Save byrney/ed8d85b4c3302d05c685 to your computer and use it in GitHub Desktop.
function usage(){
echo "usage"
}
function main(){
param(
[alias("s")][string] $serverName ,
[alias("v")][switch] $verbose
)
if(!$serverName){
usage;
exit 2;
}
if($verbose){
echo "serverName: $serverName";
} else {
echo $serverName;
}
}
#
# call main passing all args
#
main @args
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment