diff --git a/demos-sdk2/VMFS-VMDK Snapshot/VMFS-VMDK Snapshot.ps1 b/demos-sdk2/VMFS-VMDK Snapshot/VMFS-VMDK Snapshot.ps1 index d312796..417db12 100644 --- a/demos-sdk2/VMFS-VMDK Snapshot/VMFS-VMDK Snapshot.ps1 +++ b/demos-sdk2/VMFS-VMDK Snapshot/VMFS-VMDK Snapshot.ps1 @@ -125,8 +125,7 @@ $FirstSnapStatus = Get-Pfa2ProtectionGroupSnapshotTransfer -Array $FlashArray -N if ($FirstSnapStatus.completed -ne $null) { # If $FirstSnapStatus.completed, then it hasn't been fully replicated $MostRecentSnapshot = $MostRecentSnapshots[0].name -} -else { +} else { # Use prior snapshot instead $MostRecentSnapshot = $MostRecentSnapshots[1].name } @@ -279,3 +278,4 @@ Remove-Pfa2Volume -Array $FlashArray -Name $NewClonedVolumeName # Clean up Remove-PSSession $TargetVMSession +