Update ExportVpg with help and export all option

This commit is contained in:
Wes Carroll
2019-03-14 20:30:52 -04:00
parent 28b36d3983
commit 42b45e5314
+21 -4
View File
@@ -1,12 +1,29 @@
function Export-ZertoVpg {
[cmdletbinding()]
param(
[string]$outputPath,
[string[]]$vpgName
[Parameter(
HelpMessage = "Location where to dump the resulting JSON files containing the VPG Settings",
Mandatory = $true
)]
[string]$outputFolder,
[parameter(
HelpMessage = "Name(s) of the VPG(s) to be exported",
ParameterSetName = "namedVpgs"
)]
[string[]]$vpgName,
[parameter(
HelpMessage = "Export all VPGs at this site",
ParameterSetName = "allVpgs",
valuefrompipeline = $true,
ValueFromPipelineByPropertyName = $true
)]
[switch]$allVpgs
)
begin {
if ($allVpgs) {
$vpgName = $(Get-ZertoVpg).vpgName
}
}
process {
@@ -21,4 +38,4 @@ function Export-ZertoVpg {
end {
}
}
}