- This topic has 3 replies, 2 voices, and was last updated March 24, 2017 by Tarandeep S.
Start FailOverTest Powershell
You must be logged in to create new topics.
Click here to login
I unable to start failover test through Rest API
here is my code
$json=”
{
"CheckPointIdentifier
“: "144321
”
}”
Invoke-RestMethod -Uri $url -Body $json -Headers $zh -ContentType $TypeJSON -Method Post
Error I am getting
{“Message”:”failed parsing as a valid CheckPoint Identifier”}
Have you tried https://www.powershellgallery.com/packages/ZertoModule/0.9.13
Import-Module ZertoModule
Set-Item ENV:ZertoServer "ZERTOSRV"
Set-Item ENV:ZertoPort "9669"
Set-ZertoAuthToken -ZertoUser "ZERTOUSER"
$VPGID = Get-ZertoVPGID -VpgName "TESTVPG"
$ZertoVpgCheckpointIdentifier=(Get-ZertoVPGCheckpoints -ZertoVpgIdentifier $VPGID)[-1].CheckPointIdentifier
Start-ZertoVPGFailoverTest -ZertoVpgIdentifier $VPGID -ZertoVpgCheckpointIdentifier $ZertoVpgCheckpointIdentifier
This is what I’m using but it doesn’t work against the source site, I can’t test against the target at the moment but it should work.
Yes,I have tried that also. I got the same error.
The issue has been resolved.
I was sending the parameters with wrong names.Correct parameter name is ‘CheckpointID’ . I was using ‘Checkpointidentifier’.
$json=”{"CheckPointId
“:"144321
”}”