From 143d5f801eb491ffaee0e550e16727b4a8e79d65 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Tue, 8 Sep 2020 08:06:18 -0400 Subject: [PATCH] Start Param Params --- ZertoApiWrapper/Public/Add-ZertoAzureVpgVm.ps1 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ZertoApiWrapper/Public/Add-ZertoAzureVpgVm.ps1 b/ZertoApiWrapper/Public/Add-ZertoAzureVpgVm.ps1 index a5abb52..89e989d 100644 --- a/ZertoApiWrapper/Public/Add-ZertoAzureVpgVm.ps1 +++ b/ZertoApiWrapper/Public/Add-ZertoAzureVpgVm.ps1 @@ -2,9 +2,14 @@ function Add-ZertoAzureVpgVm { [Cmdletbinding()] param( - [Parameter(Mandatory)] + [Parameter( + Mandatory, + HelpMessage = "VPG Settings Identifier of the target VPG.", + ValueFromPipeline, + ValueFromPipelineByPropertyName + )] [ValidateNotNullOrEmpty()] - [String]$VpgSettingsIdentifier, + [Guid]$VpgSettingsIdentifier, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [String]$VmName, @@ -144,7 +149,7 @@ function Add-ZertoAzureVpgVm { "TestIpAddress" { $VmSettings.Nics[0].FailoverTest.PublicCloud.PrivateIP = $TestIpAddress } - } + } # End Switch Statement # Update the VPG VM Settings Object with the updated attributes $null = Invoke-ZertoRestRequest -uri $VmSettingsUri -method PUT -body ($VmSettings | ConvertTo-Json -Depth 10)