When beginning to leverage the Zerto Virtual Manager (ZVM) REST API for scripting operations with PowerShell the first hurdle to overcome is authentication to the ZVM and extracting the token needed in all subsequent API requests. The only real requirement is a set of credentials that is authorized to use Zerto. We will be leveraging the PSCredential Class along with the -credential
parameter to simplify the operation. When we have completed our operation, we will have a variable containing the required headers we need to supply to all ZVM REST API calls to provide authentication.