Last active
May 12, 2016 17:14
-
-
Save gerane/8c91633ce89e8d8555a2cd596c8a45c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Test-ParameterSet | |
{ | |
[CmdletBinding(DefaultParameterSetName = 'Default')] | |
[OutputType([boolean], ParameterSetName = 'Test')] | |
[OutputType([PSObject], ParameterSetName = 'Default')] | |
param | |
( | |
[parameter(Mandatory = $true)] | |
[System.String]$Param1, | |
[parameter(Mandatory = $true)] | |
[System.String]$Param2, | |
[System.String]$Param3, | |
[System.UInt32]$Param4, | |
[Parameter(ParameterSetName = 'Test')] | |
[switch]$Test | |
) | |
$PSCmdlet.ParameterSetName | |
} | |
function Test-ParameterSet | |
{ | |
[CmdletBinding(DefaultParameterSetName = 'Default')] | |
[OutputType([boolean], ParameterSetName = 'Test')] | |
[OutputType([PSObject], ParameterSetName = 'Default')] | |
[OutputType([psobject])] | |
param | |
( | |
[parameter(Mandatory = $true)] | |
[System.String]$Param1, | |
[parameter(Mandatory = $true)] | |
[System.String]$Param2, | |
[System.String]$Param3, | |
[System.UInt32]$Param4, | |
[Parameter(ParameterSetName = 'Test')] | |
[switch]$Test | |
) | |
$PSCmdlet.ParameterSetName | |
} | |
function Test-ParameterSet | |
{ | |
[CmdletBinding()] | |
[OutputType([boolean], ParameterSetName = 'Test')] | |
[OutputType([psobject])] | |
param | |
( | |
[parameter(Mandatory = $true)] | |
[System.String]$Param1, | |
[parameter(Mandatory = $true)] | |
[System.String]$Param2, | |
[System.String]$Param3, | |
[System.UInt32]$Param4, | |
[Parameter(ParameterSetName = 'Test')] | |
[switch]$Test | |
) | |
$PSCmdlet.ParameterSetName | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment