Skip to content

Instantly share code, notes, and snippets.

@sheeeng
Created October 30, 2013 16:00
Show Gist options
  • Save sheeeng/7235200 to your computer and use it in GitHub Desktop.
Save sheeeng/7235200 to your computer and use it in GitHub Desktop.
# ParamTest.ps1 - Show some parameter features
# Param statement must be first non-comment, non-blank line in the script
Param(
[ValidateSet("x86","x64","ia64","32","64")]
[parameter(Mandatory=$true, Position=1)]
[alias("persekitaran")]
$EnvironmentName,
[ValidateRange(16,64)]
[parameter(Mandatory=$true, Position=2)]
[alias("destinasi")]
$Destination,
[alias("namapengguna")]
$UserName,
[alias("katalaluan")]
$Password)
Write-Host "EnvironmentName = $EnvironmentName"
Write-Host "Destination = $Destination"
Write-Host "UserName = $UserName"
Write-Host "Password = $Password"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment