Invoking RESTful APIs from PowerShell Scripts
:
Basic Invocation
Basic Invocation
Running Zerto Virtual Replication APIs from PowerShell is based on the
Invoke-RestMethod
command.
A basic invocation is similar to the following:
$vpgListApiUrl
= "https://" +
$strZVMIP
+ ":"+
$strZVMPort
+"/v1/vpgs"
Invoke-RestMethod -Uri
$vpgListApiUrl
-Headers
$zertSessionHeader