Fix Verbose Typo

This commit is contained in:
Wes Carroll
2019-11-28 10:41:26 -05:00
parent 7cad7eaf75
commit c47614727a
2 changed files with 4 additions and 3 deletions
@@ -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())) {