From c47614727ab27760fc0d8204bc0a3125f134b28c Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 28 Nov 2019 10:41:26 -0500 Subject: [PATCH 1/2] Fix Verbose Typo --- ZertoApiWrapper/Public/Invoke-ZertoMove.ps1 | 2 +- ZertoApiWrapper/Public/Start-ZertoFailoverTest.ps1 | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ZertoApiWrapper/Public/Invoke-ZertoMove.ps1 b/ZertoApiWrapper/Public/Invoke-ZertoMove.ps1 index da397a6..2f82592 100644 --- a/ZertoApiWrapper/Public/Invoke-ZertoMove.ps1 +++ b/ZertoApiWrapper/Public/Invoke-ZertoMove.ps1 @@ -89,7 +89,7 @@ function Invoke-ZertoMove { Write-Error "VPG: $name not found. Please check the name and try again. Skipping" } else { $uri = "{0}/{1}/move" -f $baseUri, $vpgId - if ($PSCmdlet.ShouldProcess("Moving VPG: $name wiht settings: $($body | convertto-json)")) { + if ($PSCmdlet.ShouldProcess("Moving VPG: $name with settings: $($body | convertto-json)")) { Invoke-ZertoRestRequest -uri $uri -method "POST" -body $($body | ConvertTo-Json) } } diff --git a/ZertoApiWrapper/Public/Start-ZertoFailoverTest.ps1 b/ZertoApiWrapper/Public/Start-ZertoFailoverTest.ps1 index ee044e3..c889e0c 100644 --- a/ZertoApiWrapper/Public/Start-ZertoFailoverTest.ps1 +++ b/ZertoApiWrapper/Public/Start-ZertoFailoverTest.ps1 @@ -27,11 +27,12 @@ function Start-ZertoFailoverTest { if ( -not $vpgIdentifier) { Write-Error "VPG: $vpgName Not Found. Please check the name and try again!" -ErrorAction Stop } + $body = @{ } if ( $PSBoundParameters.ContainsKey('vmName') ) { $vpgVmInformation = Get-ZertoProtectedVm -vpgName $vpgName - [System.Collections.ArrayList]$vmIdentifiers = @() + $vmIdentifiers = [System.Collections.Generic.List[string]]::new() foreach ( $name in $vmName ) { - $selectedVm = $vpgVmInformation | Where-Object {$_.VmName.toLower() -eq $name.toLower()} + $selectedVm = $vpgVmInformation | Where-Object { $_.VmName.toLower() -eq $name.toLower() } if ($null -eq $selectedVm) { Write-Error "VM: $name NOT found in VPG $vpgName. Check the name and try again." -ErrorAction Stop } elseif ($vmIdentifiers.Contains($selectedVm.vmIdentifier.toString())) { From f094263882183290f761b795eda9f585ac5b1b22 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 28 Nov 2019 10:55:59 -0500 Subject: [PATCH 2/2] Update RELEASENOTES.md --- RELEASENOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index b97d8b5..8113f71 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -7,6 +7,7 @@ * A new function has been added; `New-ZertoPairingToken`. This function will allow users to generate a pairing authentication token from the target ZVM to be used in the pairing process. [Issue 47](https://github.com/ZertoPublic/ZertoApiWrapper/issues/47) covers additional details. * A new function has been added; `Invoke-ZertoEvacuateVra`. This function will allow users to evacuate a target VRA by specifying a Host Name, VRA Name, or VRA Identifier. All VMs currently replicating to the specified location will be migrated to different targets. [Issue 51](https://github.com/ZertoPublic/ZertoApiWrapper/issues/51) * A function has been added; `Copy-ZertoVpg`. This function will allow users to copy the settings of a single VPG and add new VMs to it. There is currently no customization beyond specifying the VMs to be placed in the newly created VPG. Should additional edits \ updates be required, they should be done post creation. [Issue 54](https://github.com/ZertoPublic/ZertoApiWrapper/issues/54) + * Fixed [issue 57](https://github.com/ZertoPublic/ZertoApiWrapper/issues/57) where a `Start-ZertoFailoverTest` would throw an error complaining about validating the body parameter. This has been fixed and tested against Zerto Virtual Manager 7.5 Update 1 with Windows PowerShell 5.1 and PowerShell Core 6.2. ### Zerto Analytics