Rapid Recovery consists of several software components. Key components relevant to this topic include the following:
- The Rapid Recovery manages authentication for protected machines, schedules for transferring data for backup and replication, export to virtual machines, reporting, and bare metal restore (BMR) to similar or dissimilar hardware.
- The Rapid Recovery Agent is responsible for taking volume snapshots and for fast transfer of the data to the repository managed by the Core.
- The Rapid Recovery PowerShell Module is a Windows utility that lets users interact with the Core server by using Windows PowerShell® scripts. This module offers some of the same functionality that the Rapid Recovery Core Console graphic user interface (GUI) provides. For example, the Rapid Recovery PowerShell Module can mount Rapid Recovery recovery points or force a snapshot of a protected machine.
The PowerShell module interacts with the Rapid Recovery Core
PowerShell is a Microsoft .NET Framework-connected environment designed for administrative automation. This section describes the Rapid Recovery PowerShell module and the cmdlets administrators can use to script certain functions without interaction with the Rapid Recovery Core GUI.
NOTE: You can also run PowerShell scripts as pre and post scripts. For more information and sample scripts, see Scripting.
The Rapid Recovery PowerShell Module is automatically installed and registered when you install the Rapid Recovery Core. The module is installed in your Windows system directory in the path: [Environment.SystemDirectory]\WindowsPowerShell\v1.0\Modules\RapidRecoveryPowerShellModule. For example, for x86 or 32-bit OS, it is installed in C:\Windows\System32\WindowsPowerShell\v1.0\Modules\RapidRecoveryPowerShellModule. When using the module, run PowerShell as an Administrator, and then change the directory to the location of the module.
Before using the Rapid Recovery PowerShell module, you must have Windows PowerShell 2.0 or later installed. Due to new features introduced in PowerShell 3.0, including easier access to object properties, PowerShell Web access, and support for REST calls, Quest recommends using PowerShell 3.0 or later.
Note: Make sure to place the powershell.exe.config file in the PowerShell home directory; for example, C:\WindowsPowerShell\powershell.exe.config.
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>
Cmdlets are specialized commands in a Windows PowerShell script that perform a single function. A cmdlet is typically expressed as a verb-noun pair. The result returned by a cmdlet is an object.
You can pipeline PowerShell commands, which enables the output of one cmdlet to be piped as input to another cmdlet. As a simple example, you can request the list of commands in the Rapid Recovery PowerShell module, and sort that list by name. The example script for this is:
Get-Command -module rapidrecoverypowershellmodule | sort-object name
Getting cmdlet help and examples
After you open PowerShell and import the Rapid Recovery PowerShell module, you can request additional information at any time by using the Get-Help <command_name> cmdlet. For example, to get information about the virtual machine export cmdlet, enter the following cmdlet and then press Enter:
Get-Help Start-VMExport
The object returned includes the command name, synopsis, syntax, and any options you can use with the command.
Another method to get help for a specific cmdlet is to type the command name followed by -?
. For example:
Start-VMExport -?
You can also request examples for a cmdlet by executing the following command:
>Get-Help Start-VMExport -examples