Supported Parameter Types

Here is a code snippet which demonstrates all the supported parameter types which can be used in a PowerScript:

param(
[string] $string,
[string][ValidateSet('First Option', 'Second Option', 'Third Option')] $stringWithSet,
[int] $int,
[single] $single,
[double] $double,
[decimal] $decimal,
[Long] $long,
[Char] $char,
[Byte] $byte,
[Boolean] $boolean,
[Switch] $switch,
[System.IO.FileInfo] $fileInfo,
[SecureString] $secureString,
[string[]] $stringArray,
[int[]] $intArray,
[PSCredential] $psCredential,
$unspecifiedType
)