Set Parameters to Mandatory

This commit is contained in:
Wes Carroll
2019-03-31 21:51:21 -04:00
parent c28257ee3a
commit 3fa53349a5
+4 -2
View File
@@ -11,14 +11,16 @@ function Export-ZertoVpg {
[string]$outputPath, [string]$outputPath,
[parameter( [parameter(
HelpMessage = "Name(s) of the VPG(s) to be exported", HelpMessage = "Name(s) of the VPG(s) to be exported",
ParameterSetName = "namedVpgs" ParameterSetName = "namedVpgs",
Mandatory = $true
)] )]
[string[]]$vpgName, [string[]]$vpgName,
[parameter( [parameter(
HelpMessage = "Export all VPGs at this site", HelpMessage = "Export all VPGs at this site",
ParameterSetName = "allVpgs", ParameterSetName = "allVpgs",
valuefrompipeline = $true, valuefrompipeline = $true,
ValueFromPipelineByPropertyName = $true ValueFromPipelineByPropertyName = $true,
Mandatory = $true
)] )]
[switch]$allVpgs [switch]$allVpgs
) )