Zerto Powershell Cmdlets Guide

Zerto Powershell Cmdlets Guide

Zerto PowerShell Cmdlets Guide Rev01 Nov 2020 ZVR-C_8.5 Zerto PowerShell Cmdlets Guide - Rev01 © 2020 Zerto All rights reserved. Information in this document is confidential and subject to change without notice and does not represent a commitment on the part of Zerto Ltd. Zerto Ltd. does not assume responsibility for any printing errors that may appear in this document. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or information storage and retrieval systems, for any purpose other than the purchaser's personal use, without the prior written permission of Zerto Ltd. All other marks and names mentioned herein may be trademarks of their respective companies. The scripts are provided by example only and are not supported under any Zerto support program or service. All examples and scripts are provided "as-is" without warranty of any kind. The author and Zerto further disclaim all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. In no event shall Zerto, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if the author or Zerto has been advised of the possibility of such damages. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. ZVR-C_8.5 2 Table of Contents About This Guide 5 Intended Audience 5 Overview of Content in This Guide 5 Support and Feedback 5 Setting Up Zerto Cmdlets 6 Windows PowerShell and Zerto Cmdlets 6 Running PowerShell with Zerto Cmdlets 6 Defining Credentials to Run Zerto Cmdlets 7 Zerto Cmdlets Reference 8 Abort-Backup 8 Clone-VPG 11 Export-Settings 16 Force-Sync 19 ForceRemove-ProtectionGroup 22 Get-Checkpoints 25 Get-LicenseInfo 28 Get-ProtectionGroups 30 Get-Sites 33 Get-VmsReplicatingToHost 36 Import-Settings 38 Pause-ProtectionGroup 42 Resume-ProtectionGroup 45 Set-ChangeRecoveryHost 48 Set-Checkpoint 52 Set-License 54 Set-Pair 56 Start-Backup 59 Start-FailoverTest 62 Stop-FailoverTest 66 Unprotect-VPG 70 Optional PowerShell Parameters 73 Using the Cmdlets 76 Using the Cmdlets in Recovery Scripts 76 Creating a Script Using Cmdlets 76 Retrieving Information 78 Retrieving a List of Checkpoints 78 Retrieving a List of Virtual Machines Recovering to a Host 79 Retrieving a List of VPGs 80 3 Zerto PowerShell Cmdlets Guide - Rev01 Retrieving a List of Sites 81 Working with Checkpoints 81 Adding a Checkpoint 81 Testing VPGs 82 Cloning VPGs 84 Starting and Aborting an Offsite Backup 85 Pausing and Resuming Protection of a VPG 87 Synchronizing a VPG 88 Deleting VPGs 89 Deleting a VPG 89 Forcibly Deleting a VPG 90 Changing the Target Host for a Protected Virtual Machine 91 4 About This Guide Zerto provides a business continuity (BC) and disaster recovery (DR) solution in a virtual environment, enabling the replication of mission-critical applications and data as quickly as possible, with minimal data loss. When devising a recovery plan, these two objectives, minimum time to recover and maximum data to recover, are assigned target values: the recovery time objective (RTO) and the recovery point objective (RPO). Zerto enables a virtual-aware recovery with low values for both the RTO and RPO. In addition, Zerto enables protecting virtual machines for extended, longer term recovery from an offsite backup. This guide describes how to use the Zerto cmdlets in Windows PowerShell to enable performing specific management functions via scripts, including retrieving information like the VPGs defined for a site, working with checkpoints and deleting a VPG. Intended Audience This guide is for the use of Windows PowerShell users. Overview of Content in This Guide This guide contains the following chapters: Chapter Title Description Setting Up Setting Up Zerto Cmdlets on Describes how to set up Zerto cmdlets. Zerto page 6 Cmdlets on page 6 Using the Using the Cmdlets on page 76 Describes how to perform specific management Cmdlets functions via scripts, including retrieving information on like the VPGs defined for a site, working with page 76 checkpoints and deleting a VPG. Zerto Zerto Cmdlets Reference on Provides reference material about the Zerto cmdlets. Cmdlets page 8 Reference on page 8 Support and Feedback Please send suggestions to improve the documentation to Zerto support. Intended Audience 5 Setting Up Zerto Cmdlets Zerto cmdlets in Windows PowerShell enable performing specific tasks using a script and not within the Zerto User Interface, such as retrieving information like the VPGs defined for a site, working with checkpoints and deleting a VPG. This section describes how to set up Zerto cmdlets. The following topics are described in this section: • Windows PowerShell and Zerto Cmdlets on page 6 • Running PowerShell with Zerto Cmdlets on page 6 • Defining Credentials to Run Zerto Cmdlets on page 7 Windows PowerShell and Zerto Cmdlets Windows PowerShell is a command-line shell running under Windows operating systems for system administrators. The Windows PowerShell includes both an interactive command line prompt and a scripting environment that can be used independently or in combination. Windows PowerShell is built on top of the .NET Framework common language runtime (CLR), enabling it to accept and return .NET Framework objects. Running PowerShell with Zerto Cmdlets To run the Zerto cmdlets you must first run the installation package supplied by Zerto. Note: You must have both Microsoft .NET Framework 4.7.2 and Windows PowerShell installed. To install the Zerto cmdlets: 1. Make sure that Windows PowerShell is closed. 2. Run the installation file. After installing the Zerto cmdlets, either add the cmdlets each time you open the Windows PowerShell, or create a Windows PowerShell profile. The following procedure describes how to add the Zerto cmdlets for every Windows PowerShell session. To add the Zerto cmdlets to the current session: • Open Windows PowerShell with the following arguments: -NoExit -Command Add-PSSnapIn Zerto.PS.Commands The Add-PSSnapin cmdlet adds registered Windows PowerShell snap-ins to the current session. Windows PowerShell and Zerto Cmdlets 6 Zerto PowerShell Cmdlets Guide - Rev01 Setting Up Zerto Cmdlets To add the Zerto cmdlets to every session, in the Properties dialog for a PowerShell shortcut specify a Target value similar to the following: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -NoExit - Command Add-PSSnapIn Zerto.PS.Commands Note: You can create a Windows PowerShell profile, as described in the Windows PowerShell Help, to add the snap-in to all future Windows PowerShell sessions. Each Zerto cmdlet includes help, accessed by entering the Windows PowerShell get-help command: get-help <cmdlet-name> Defining Credentials to Run Zerto Cmdlets To run the Zerto cmdlets you must specify a username and password that is valid for the Zerto Virtual Manager, against which the command is run. You specify usernames and passwords in the Zerto installation folder on the machine with the Zerto Virtual Manager against which the cmdlet action is performed, in the users.txt file. You specify the username followed by a tab as a separator and then the SHA-1 hash of the password. Note: After making any changes to the users.txt file, you do not have to restart the Zerto Virtual Manager service. The SHA-1 hash for password is 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8. Note: On any Linux machine you can use the sha1sum command to generate the SHA-1 hash of a password, for example: root@mymachine:~# echo -n mypassword | sha1sum 91dfd9ddb4198affc5c194cd8ce6d338fde470e2 - Defining Credentials to Run Zerto Cmdlets 7 Zerto Cmdlets Reference This section provides reference material about the Zerto cmdlets. • Abort-Backup on page 8 • Clone-VPG on page 11 • Export-Settings on page 16 • Force-Sync on page 19 • ForceRemove-ProtectionGroup on page 22 • Get-Checkpoints on page 25 • Get-LicenseInfo on page 28 • Get-ProtectionGroups on page 30 • Get-Sites on page 33 • Get-VmsReplicatingToHost on page 36 • Import-Settings on page 38 • Pause-ProtectionGroup on page 42 • Resume-ProtectionGroup on page 45 • Set-ChangeRecoveryHost on page 48 • Set-Checkpoint on page 52 • Set-License on page 54 • Set-Pair on page 56 • Start-Backup on page 59 • Start-FailoverTest on page 62 • Stop-FailoverTest on page 66 • Unprotect-VPG on page 70 • Optional PowerShell Parameters on page 73 Abort-Backup Aborts a specified offsite backup. Abort-Backup 8 Zerto PowerShell Cmdlets Guide - Rev01 Zerto Cmdlets Reference Syntax Abort-Backup [-ZVMIP] <String> [-ZVMPort] <Int32> [-Username] <String> [-Password] <String> [-VirtualProtectionGroup] <String> [-Wait <int32>] [<Common&RiskParameters>] Description The Abort-Backup cmdlet aborts a running offsite backup job for a specified VPG. When the Zerto Virtual Manager is paired with multiple sites the VPGs can be from any of these paired sites, as long as they were either protected or recovered to the site of the Zerto Virtual Manager where the cmdlet is run. Parameters [-ZVMIP] <String> The IP address of the machine where the Zerto Virtual Manager is installed that is used to process the cmdlet. Required? True Position? 1 or named Default

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    93 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us