Syntax
Syntax to generate Runbook for a specific recovery mode to run in parallel, by passing all the mandatory and optional parameters.
New-HXRunbook -RecoveryMode <String> -ProtectedSiteClusterIP <IPAddress> -ProtectedSiteClusterCreds <PSObject[]> -RecoverySiteClusterIP
<IPAddress> -RecoverySiteClusterCreds <PSObject[]> -ProtectedSiteVCenterIP <IPAddress> -ProtectedSiteVCenterCreds <PSObject[]>
-RecoverySiteVCenterIP <IPAddress> -RecoverySiteVCenterCreds <PSObject[]> [-ParallelRecoveryLimit <Int32>] [-DelayBetweenRecovery
<Int32>] [-DelayInPowerOn <Int32>] [-RunbookFolder <String>] [-ResourcePoolName <String>] [-FolderName <String>] [-TestNetwork
<String>] [-TestVmPrefix <String>] [-NetworkMap <PSObject[]>] [-ProtectionGroup <PSObject[]>]
[-persistConnection] <CommonParameters>
Syntax to generate Runbook for a specific recovery mode to run in parallel, by letting the system to get credentials while
executing the command.
New-HXRunbook -RecoveryMode <String> -ProtectedSiteClusterIP <IPAddress> -RecoverySiteClusterIP <IPAddress> -ProtectedSiteVCenterIP
<IPAddress> -RecoverySiteVCenterIP <IPAddress> [-ParallelRecoveryLimit <Int32>] [-DelayBetweenRecovery <Int32>] [-DelayInPowerOn
<Int32>] [-RunbookFolder <String>] [-ResourcePoolName <String>] [-FolderName <String>] [-TestNetwork <String>] [-TestVmPrefix
<String>] [-NetworkMap <PSObject[]>] [-ProtectionGroup <PSObject[]>]
[-persistConnection] <CommonParameters>
Syntax to generate Runbook for a specific recovery mode to run in sequential order, by passing all the mandatory and optional
parameters.
New-HXRunbook -RecoveryMode <String> -ProtectedSiteClusterIP <IPAddress> -ProtectedSiteClusterCreds <PSObject[]> -RecoverySiteClusterIP
<IPAddress> -RecoverySiteClusterCreds <PSObject[]> -ProtectedSiteVCenterIP <IPAddress> -ProtectedSiteVCenterCreds <PSObject[]>
-RecoverySiteVCenterIP <IPAddress> -RecoverySiteVCenterCreds <PSObject[]> -SequentialRecovery [-DelayBetweenRecovery <Int32]
[-DelayInPowerOn <Int32>] [-RunbookFolder <String>] [-ResourcePoolName <String>] [-FolderName <String>] [-TestNetwork <String>]
[-TestVmPrefix <String>] [-NetworkMap <PSObject[]>]
[-persistConnection] <CommonParameters>
Syntax to generate Runbook for a specific recovery mode to run in sequential order, by letting the system to get credentials
while executing the command.
New-HXRunbook -RecoveryMode <String> -ProtectedSiteClusterIP <IPAddress> -RecoverySiteClusterIP <IPAddress> -ProtectedSiteVCenterIP
<IPAddress> -RecoverySiteVCenterIP <IPAddress> -SequentialRecovery [-DelayBetweenRecovery <Int32>] [-DelayInPowerOn <Int32>][-RunbookFolder
<String>] [-ResourcePoolName <String>] [-FolderName <String>] [-TestNetwork <String>] [-TestVmPrefix <String>] [-NetworkMap
<PSObject[]>]
[-persistConnection] <CommonParameters>
Syntax to regenerate Runbook for a specific recovery mode by passing parameters through JSON file.
New-HXRunbook [-JsonInputFile <String>] [-ProtectedSiteClusterCreds <PSObject[]>] [-RecoverySiteClusterCreds <PSObject[]>]
[-ProtectedSiteVCenterCreds <PSObject[]>] [-RecoverySiteVCenterCreds <PSObject[]>] [-RunbookFolder <String>] [-persistConnection]
[<CommonParameters>]
Syntax to regenerate Runbook for a specific recovery mode by passing JSON configuration variable.
New-HXRunbook [-JsonConfigVariable <PSObject>] [-ProtectedSiteClusterCreds <PSObject[]>] [-RecoverySiteClusterCreds <PSObject[]>]
[-ProtectedSiteVCenterCreds <PSObject[]>] [-RecoverySiteVCenterCreds <PSObject[]>] [-RunbookFolder <String>] [-persistConnection]
[<CommonParameters>]
Description
Generates runbook for various recovery scenarios. The New-HXRunbook cmdlet supports the following workflows: Test Recovery,
Planned Migration, and Disaster Recovery.
Required Parameters
-RecoveryMode <String>
Specify the recovery mode for which the runbook has to be generated. The valid recovery modes are: 'TestRecovery','DisasterRecovery',
and 'PlannedMigration'.
Aliases
|
Mode
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-ProtectedSiteClusterIP <IPAddress>
Specify the IP address of the protected site cluster.
Aliases
|
PriCluIP
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-ProtectedSiteClusterCreds <PSObject[]>
Specify the credentials of the protected site cluster.
Aliases
|
PriCluCred
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-RecoverySiteClusterIP <IPAddress>
Specify the IP address of the recovery site cluster.
Aliases
|
SecCluIP
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-RecoverySiteClusterCreds <PSObject[]>
Specify the credentials of the recovery site cluster.
Aliases
|
SecCluCred
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-ProtectedSiteVCenterIP <IPAddress>
Specify the IP address of the protected site vCenter server.
Aliases
|
PriVCIP
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-ProtectedSiteVCenterCreds <PSObject[]>
Specify the credentials of the protected site vCenter server.
Aliases
|
PriVCCred
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-RecoverySiteVCenterIP <IPAddress>
Specify the IP address of the recovery site vCenter server.
Aliases
|
SecVCIP
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-RecoverySiteVCenterCreds <PSObject[]>
Specify the credentials of the recovery site vCenter server
Aliases
|
SecVCCred
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-JsonInputFile <String>
If you want to regenerate a runbook with some updates to the variables in the JSON file of the generated runbook, do required
updates in the JSON file and specify path of the customized JSON input file to regenerate the runbook.
Aliases
|
—
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-JsonConfigVariable <PSObject>
If you want to regenerate a runbook with some updates to the variables in the JSON file of the generated runbook, specify
JSON config variable ($HXJsonConfig) to regenerate the runbook.
Aliases
|
—
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
Optional Parameters
-ParallelRecoveryLimit <Int32>
Specify the maximum limit for executing multiple recovery jobs in parallel at once. The default value is 10. The passed value
must be lesser than or equal to 10.
Aliases
|
—
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-DelayInPowerOn <Int32>
Specify the time delay, in seconds between when a device first powers on and when it starts responding to commands sent to
the VMs.
Aliases
|
—
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-SequentialRecovery [<SwitchParameter>]
Switch to enable recovery of VMs in a sequential order.
Aliases
|
—
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-DelayBetweenRecovery <Int32>
Specify the duration in seconds to delay the recovery operation of subsequent VMs when recovery operation is run in parallel
or sequential order.
Aliases
|
—
|
Position?
|
Named
|
Default Value
|
0
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-RunbookFolder <String>
Specify the path of a new output folder in which the generated runbook files have to be saved. The default path is C:\Runbooks
.
Aliases
|
—
|
Position?
|
Named
|
Default Value
|
"C:\Runbooks"
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-ResourcePoolName <String>
Specify the target resource pool name where all the VMs have to be recovered or migrated. This pool name is applicable for
all the protected VMs.
Aliases
|
RPool
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-FolderName <String>
Specify the folder name where all the VMs have to be recovered or migrated. This folder name is applicable for all the protected
VMs.
Aliases
|
FName
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-TestNetwork <String>
Specify the test network for test recovery.
Aliases
|
—
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-TestVmPrefix <String>
Specify the prefix name that needs to be added to VM after test recovery.
Aliases
|
—
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-NetworkMap <PSObject[]>
Specify the network mapping in the following format:
"SourceNetwork1:TargetNetwork1","SourceNetwork2:TargetNetwork2"
Aliases
|
NMap
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
-ProtectionGroup <PSObject[]>
Specify one or more protection groups.
Aliases
|
Group
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
PersistConnection [<SwitchParameter>]
Switch to persist cluster connection even after runbook generation.
Aliases
|
—
|
Position?
|
Named
|
Default Value
|
—
|
Accept Pipeline Input?
|
False
|
Accept Wildcard Characters?
|
False
|
Common Parameters
The New-HXRunbook cmdlet supports the following common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
For more information, see About CommonParameters.
Example 1
Generate a runbook for all the protected VMs for the Test Recovery scenario.
Input
New-HXRunbook -RecoveryMode 'TestRecovery' -ProtectedSiteClusterIP "10.10.10.0"
-ProtectedSiteClusterCreds "user","password" -RecoverySiteClusterIP "10.10.10.1"
-RecoverySiteClusterCreds "user","password" -ProtectedSiteVCenterIP "10.10.10.11"
-ProtectedSiteVCenterCreds "user","password" -RecoverySiteVCenterIP "10.10.10.12"
-RecoverySiteVCenterCreds "user","password"
Output
INFO: Generating 'TestRecovery' runbook.
INFO: Runbook has been successfully generated.
INFO: Target Folder:'C:\Runbooks\Runbook-TestRecovery-Parallel_(13-Feb-2019_15-32)'
INFO: Runbook file:'Runbook-TestRecovery-(13-Feb-2019_15-32).ps1'
INFO: Json file:'Json-TestRecovery-(13-Feb-2019_15-32).json'
INFO: Json Configuration Variable:$HXJsonConfig
INFO: Cleanup file:'CleanupScript-TestRecovery-(13-Feb-2019_15-32).ps1'
Note |
The Cleanup file is generated only for the test recovery mode. The Cleanup file is used to cleanup the secondary site.
|
Example 2
Generate a runbook for all the protected VMs for the Disaster Recovery scenario.
Input
New-HXRunbook -RecoveryMode 'DisasterRecovery' -ProtectedSiteClusterIP "10.10.10.0"
-ProtectedSiteClusterCreds "user","password" -RecoverySiteClusterIP "10.10.10.1"
-RecoverySiteClusterCreds "user","password" -ProtectedSiteVCenterIP "10.10.10.11"
-ProtectedSiteVCenterCreds "user","password" -RecoverySiteVCenterIP "10.10.10.12"
-RecoverySiteVCenterCreds "user","password"
Output
INFO: Generating 'DisasterRecovery' runbook.
INFO: Runbook has been successfully generated.
INFO: Target Folder: 'C:\Runbooks\Runbook-DisasterRecovery-Parallel_(13-Feb-2019_15-32)'
INFO: Runbook file: 'Runbook-DisasterRecovery-(13-Feb-2019_15-32).ps1'
INFO: Json file: 'Json-DisasterRecovery-(13-Feb-2019_15-32).json'
INFO: Json Configuration Variable: $HXJsonConfig
INFO: ReverseProtect file: 'ReverseProtect_Script_(13-Feb-2019_15-32).ps1'
Note |
The ReverseProtect file is generated only for the disaster recovery mode. The ReverseProtect file is used to recover the secondary site after disaster.
|
Example 3
Generate a runbook for all the protected VMs for the Planned Migration scenario.
Input
New-HXRunbook -RecoveryMode 'PlannedMigration' -ProtectedSiteClusterIP "10.10.10.0"
-ProtectedSiteClusterCreds "user","password" -RecoverySiteClusterIP "10.10.10.1"
-RecoverySiteClusterCreds "user","password" -ProtectedSiteVCenterIP "10.10.10.11"
-ProtectedSiteVCenterCreds "user","password" -RecoverySiteVCenterIP "10.10.10.12"
-RecoverySiteVCenterCreds "user","password"
Output
INFO: Generating 'PlannedMigration' runbook.
INFO: Runbook has been successfully generated.
INFO: Target Folder:'C:\Runbooks\Runbook-PlannedMigration-Parallel_(13-Feb-2019_15-31)'
INFO: Runbook file:'Runbook-PlannedMigration-(13-Feb-2019_15-31).ps1'
INFO: Json file:'Json-PlannedMigration-(13-Feb-2019_15-31).json'
INFO: Json Configuration Variable: $HXJsonConfig
Example 4
Generate a runbook for all the protected VMs for the Planned Migration scenario by passing addtional parameters such as FolderName
and NetworkMap.
Input
New-HXRunbook -RecoveryMode 'PlannedMigration' -ProtectedSiteClusterIP "10.10.10.0"
-ProtectedSiteClusterCreds "user","password" -RecoverySiteClusterIP "10.10.10.1"
-RecoverySiteClusterCreds "user","password" -ProtectedSiteVCenterIP "10.10.10.11"
-ProtectedSiteVCenterCreds "user","password" -RecoverySiteVCenterIP "10.10.10.12"
-RecoverySiteVCenterCreds "user","password" -NetworkMap "SourceNetwork1:TargetNetwork1",
"SourceNetwork2:TargetNetwork2" -FolderName "Recovery_Folder"
Output
INFO: Generating 'PlannedMigration' runbook.
INFO: Runbook has been successfully generated.
INFO: Target Folder:'C:\Runbooks\Runbook-PlannedMigration-Parallel_(13-Feb-2019_15-31)'
INFO: Runbook file:'Runbook-PlannedMigration-(13-Feb-2019_15-31).ps1'
INFO: Json file:'Json-PlannedMigration-(13-Feb-2019_15-31).json'
INFO: Json Configuration Variable: $HXJsonConfig
Example 5
Generate a runbook by passing the modified JSON file with customized VM details.
Input
New-HXRunbook -JsonInputFile "C:\Runbooks\Runbook-TestRecovery-Parallel_(08-Nov-2018_13-28)
\Json-TestRecovery-Parallel_(08-Nov-2018_13-28).json"
Output
INFO: Generating 'TestRecovery' runbook.
INFO: Runbook has been successfully generated.
INFO: Target Folder:'C:\Runbooks\Runbook-TestRecovery-Parallel_(13-Feb-2019_15-32)'
INFO: Runbook file:'Runbook-TestRecovery-(13-Feb-2019_15-32).ps1'
INFO: Json file:'Json-TestRecovery-(13-Feb-2019_15-32).json'
INFO: Json Configuration Variable:$HXJsonConfig
INFO: Cleanup file:'CleanupScript-TestRecovery-(13-Feb-2019_15-32).ps1'
Example 6
Generate a runbook for a specific protection group for the Test Recovery scenario.
Input
New-HXRunbook -RecoveryMode 'TestRecovery' -ProtectedSiteClusterIP "10.10.10.0" -ProtectedSiteClusterCreds
"user","password" -RecoverySiteClusterIP "10.10.10.1" -RecoverySiteClusterCreds "user","password"
-ProtectedSiteVCenterIP "10.10.10.11" -ProtectedSiteVCenterCreds "user","password" -RecoverySiteVCenterIP "10.10.10.12"
-RecoverySiteVCenterCreds "user","password" -ProtectionGroup "group1"
Output
INFO: Generating 'TestRecovery' runbook.
INFO: Runbook has been successfully generated.
INFO: Target Folder:'C:\Runbooks\Runbook-TestRecovery-Parallel_(12-Jun-2019_15-32)'
INFO: Runbook file:'Runbook-TestRecovery-(12-Jun-2019_15-32).ps1'
INFO: Json file:'Json-TestRecovery-(12-Jun-2019_15-32).json'
INFO: Json Configuration Variable:$HXJsonConfig
INFO: Cleanup file:'CleanupScript-TestRecovery-(12-Jun-2019_15-32).ps1'