Converse agora com nosso suporte
Chat com o suporte

Rapid Recovery 6.9 - Commands and Scripting Reference Guide

Introduction to Rapid Recovery Command Line Management utility PowerShell module
Prerequisites for using PowerShell Working with commands and cmdlets Rapid Recovery PowerShell module cmdlets
Add-EsxAutoProtectObjects Add-EsxVirtualMachines Add-HyperVClusterSharedVirtualDisks Add-HyperVClusterVirtualMachines Add-HyperVVirtualMachines Disable-HyperVAutoProtection Edit-AzureVirtualStandby Edit-EsxiVirtualStandby Edit-HyperVVirtualStandby Edit-OracleDBVerifyNightlyJob Edit-OracleLogTruncationNightlyJob Edit-Replication Edit-ScheduledArchive Edit-VBVirtualStandby Edit-VMVirtualStandby Enable-HyperVAutoProtection Enable-OracleArchiveLogMode Get-ActiveJobs Get-CloudAccounts Get-Clusters Get-CompletedJobs Get-ExchangeMailStores Get-Failed Get-FailedJobs Get-HyperVClusterSharedVirtualDisks Get-ListAzureVMSizes Get-Mounts Get-OracleInstances Get-Passed Get-ProtectedServers Get-ProtectionGroups Get-QueuedJobs Get-RecoveryPoints Get-ReplicatedServers Get-Repositories Get-ScheduledArchives Get-SqlDatabases Get-TransferQueueEntries Get-UnprotectedVolumes Get-Version Get-VirtualizedServers Get-Volumes New-AzureVirtualStandby New-Base New-BootCD New-CloudAccount New-EncryptionKey New-EsxiVirtualStandby New-FileSearch New-HyperVVirtualStandby New-Mount New-Replication New-Repository New-ScheduledArchive New-Snapshot New-VBVirtualStandby New-VMVirtualStandby Push-Replication Push-Rollup Remove-Agent Remove-EsxAutoProtectObjects Remove-HyperVClusterSharedVirtualDisks Remove-HyperVClusterVirtualMachines Remove-HyperVVirtualMachines Remove-Mount Remove-Mounts Remove-RecoveryPoints Remove-RemoteMount Remove-RemoteMounts Remove-Replication Remove-Repository Remove-ScheduledArchive Remove-VirtualStandby Restart-CoreService Resume-Replication Resume-ScheduledArchive Resume-Snapshot Resume-VirtualStandby Set-AgentMetadataCredentials Set-DedupCacheConfiguration Set-License Set-OracleMetadataCredentials Set-ReplicationResponse Start-Archive Start-AttachabilityCheck Start-AzureDeploy Start-AzureExport Start-ChecksumCheck Start-ConsumeSeedDrive Start-CopySeedDrive Start-EsxiExport Start-HypervExport Start-LogTruncation Start-MountabilityCheck Start-OptimizationJob Start-OracleDBVerifyJob Start-OracleLogTruncationJob Start-Protect Start-ProtectCluster Start-ProtectEsxServer Start-ProtectHyperVCluster Start-ProtectHyperVServer Start-RepositoryCheck Start-RestoreAgent Start-RestoreArchive Start-ScheduledArchive Start-VBExport Start-VirtualStandby Start-VMExport Stop-ActiveJobs Stop-CoreService Suspend-Replication Suspend-ScheduledArchive Suspend-Scheduler Suspend-Snapshot Suspend-VirtualStandby Suspend-VMExport Update-Repository
Localization Qualifiers
Scripting

Sample PowerShell scripts

The following sample scripts are provided to assist administrative users in executing PowerShell scripts.

PreTransferScript.ps1

The PreTransferScript is run on the protected machine before transferring a snapshot.

Sample PreTransferScript

# receiving parameter from transfer job
param([object]$TransferPrescriptParameter)
# building path to Agent's Common.Contracts.dll and loading this assembly
$regLM = [Microsoft.Win32.Registry]::LocalMachine
$regLM = $regLM.OpenSubKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AppRecovery Agent 5')
$regVal = $regLM.GetValue('InstallLocation')
$regVal = $regVal + 'Common.Contracts.dll'
[System.Reflection.Assembly]::LoadFrom($regVal)  |  out-null
# Converting input parameter into specific object
$TransferPrescriptParameterObject = $TransferPrescriptParameter -as [Replay.Common.Contracts.PowerShellExecution.TransferPrescriptParameter];
# Working with input object. All echo's are logged
if($TransferPrescriptParameterObject -eq $null) {
		echo 'TransferPrescriptParameterObject parameter is null'
}
else {
		echo 'TransferConfiguration:'$TransferPrescriptParameterObject.TransferConfiguration
		echo 'StorageConfiguration:' $TransferPrescriptParameterObject.StorageConfiguration
}

PostTransferScript.ps1

The PostTransferScript is run on the protected machine after transferring a snapshot.

Sample PostTransferScript

# receiving parameter from transfer job
param([object] $TransferPostscriptParameter)
# building path to Agent's Common.Contracts.dll and loading this assembly
$regLM = [Microsoft.Win32.Registry]::LocalMachine
$regLM = $regLM.OpenSubKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AppRecovery Agent 5')
$regVal = $regLM.GetValue('InstallLocation')
$regVal = $regVal + 'Common.Contracts.dll'
[System.Reflection.Assembly]::LoadFrom($regVal)  |  out-null
# Converting input parameter into specific object
$TransferPostscriptParameterObject = $TransferPostscriptParameter -as [Replay.Common.Contracts.PowerShellExecution.TransferPostscriptParameter];
# Working with input object. All echo's are logged
if($TransferPostscriptParameterObject -eq $null) {
			echo 'TransferPostscriptParameterObject parameter is null'
}
else {
echo 'VolumeNames:' $TransferPostscriptParameterObject.VolumeNames
			echo 'ShadowCopyType:' $TransferPostscriptParameterObject.ShadowCopyType
		echo 'ForceBaseImage:' $TransferPostscriptParameterObject.ForceBaseImage
		echo 'IsLogTruncation:' $TransferPostscriptParameterObject.IsLogTruncation
}

PreExportScript.ps1

The PreExportScript is run on the Core before any export job.

Sample PreExportScript

# receiving parameter from export job
param([object]$ExportJobRequest)
# building path to Core's Common.Contracts.dll and loading this assembly
$regLM = [Microsoft.Win32.Registry]::LocalMachine
$regLM = $regLM.OpenSubKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AppRecovery Core 5')
$regVal = $regLM.GetValue('InstallLocation')
$regVal = $regVal + 'CoreService\Common.Contracts.dll'
[System.Reflection.Assembly]::LoadFrom($regVal)  |  out-null
# Converting input parameter into specific object
$ExportJobRequestObject = $ExportJobRequest -as [Replay.Core.Contracts.Export.ExportJobRequest]
# Working with input object. All echo's are logged
if($ExportJobRequestObject -eq $null) {
		echo 'ExportJobRequestObject parameter is null'
}
else {
		echo 'Location:' $ExportJobRequestObject.Location
		echo 'Priority:' $ExportJobRequestObject.Priority
}
Documentos relacionados

The document was helpful.

Selecione a classificação

I easily found the information I needed.

Selecione a classificação