You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Method invocation failed because [System.Management.Automation.PSCustomObject] does not contain a method named 'Where'.
At C:\Program Files\WindowsPowerShell\Modules\ZertoApiWrapper\1.5.3\ZertoApiWrapper.psm1:5955 char:17
+ ... $protectedVms.Where( { $_.VmName -like $machine }) | Sele ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Where:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
WARNING: No VMs found to remove. Please check your parameters and try again.
To fix this I had to adjust Remove-ZertoVpgVm.ps1 line 33
Right now Remove-ZertoVpgVm is not working for me. When I run a command such as
Remove-ZertoVpgVm -VpgName 'test-vpg' -Vm 'test-vm'
I get the following error.
To fix this I had to adjust Remove-ZertoVpgVm.ps1 line 33
From
$protectedVms.Where( { $_.VmName -like $machine }) | Select-Object -ExpandProperty VmIdentifier
To
$protectedVms | Where-Object ( { $_.VmName -like $machine }) | Select-Object -ExpandProperty VmIdentifier
I don't know enough to explain why this fixes the issue I just figured it out by messing around with the code.
The text was updated successfully, but these errors were encountered: