Get-RMBackupContent

From PowerGUI Wiki

Jump to: navigation, search

Gets the content of the backups held at a specified location.

Contents

Syntax

Get-RMBackupContent [-Path] <String[]> [-BackupPassword <SecureString>] [<CommonParameters>]

Detailed Description

The Get-RMBackupContent cmdlet gets the content of the backups created with Recovery Manager and held at the location specified by the path.



Related Commands

Parameters

Name Description Required? Pipeline Input Default Value
Path Specifies the path to the backups whose content is to be retrieved. true true (ByValue, ByPropertyName)
BackupPassword Specifies the password to access a password-protected backup. This is the same password that is set in the computer collection properties in the Recovery Manager console. false false

Examples

Example 1

$b = Get-ChildItem C:\Backups –Filter *.bkf –Recurse | Get-RMBackupContent

C:\PS>Where-Object –InputObject $b { $_.Contents –band 64 } | Add-RMBackup

This command gets the content of all backups held in the C:\Backups folder and its subfolders, and saves the content in the $b variable. The Where-Object cmdlet then passes the Active Directory backups from the $b variable to the Add-Backup cmdlet (the number 64 stands for the Active Directory component.) Add-RMBackup then registers the passed Active Directory backups in the Recovery Manager database.

Example 2

$p = Read-Host "Backup Password" -AsSecureString

C:\PS>Get-RMBackupContent C:\Backups\password-protected_backup1.bkf –BackupPassword $p

In this example the Read-Host cmdlet provided by Windows PowerShell is used to get the backup password as a SecureString object and save it in the $p variable. The Get-RMBackupContent then uses the password saved in the $p variable to access the password-protected backup C:\Backups\password-protected_backup1.bkf.

Personal tools