Start Param Params

This commit is contained in:
Wes Carroll
2020-09-08 08:06:18 -04:00
parent f46c620302
commit 143d5f801e
@@ -2,9 +2,14 @@
function Add-ZertoAzureVpgVm { function Add-ZertoAzureVpgVm {
[Cmdletbinding()] [Cmdletbinding()]
param( param(
[Parameter(Mandatory)] [Parameter(
Mandatory,
HelpMessage = "VPG Settings Identifier of the target VPG.",
ValueFromPipeline,
ValueFromPipelineByPropertyName
)]
[ValidateNotNullOrEmpty()] [ValidateNotNullOrEmpty()]
[String]$VpgSettingsIdentifier, [Guid]$VpgSettingsIdentifier,
[Parameter(Mandatory)] [Parameter(Mandatory)]
[ValidateNotNullOrEmpty()] [ValidateNotNullOrEmpty()]
[String]$VmName, [String]$VmName,
@@ -144,7 +149,7 @@ function Add-ZertoAzureVpgVm {
"TestIpAddress" { "TestIpAddress" {
$VmSettings.Nics[0].FailoverTest.PublicCloud.PrivateIP = $TestIpAddress $VmSettings.Nics[0].FailoverTest.PublicCloud.PrivateIP = $TestIpAddress
} }
} } # End Switch Statement
# Update the VPG VM Settings Object with the updated attributes # Update the VPG VM Settings Object with the updated attributes
$null = Invoke-ZertoRestRequest -uri $VmSettingsUri -method PUT -body ($VmSettings | ConvertTo-Json -Depth 10) $null = Invoke-ZertoRestRequest -uri $VmSettingsUri -method PUT -body ($VmSettings | ConvertTo-Json -Depth 10)