Restoring resources using PowerShell cmdlets

Restoring an Exchange database includes initiating a connection session with the SnapCenter Server, listing the backups and retrieving backup information, and restoring a backup.

Before you begin

You must have prepared the PowerShell environment to execute the PowerShell cmdlets.

About this task

For information about PowerShell cmdlets, use the SnapCenter cmdlet help or see the cmdlet reference information.

SnapCenter Software 4.1 Windows Cmdlet Reference Guide


  1. Initiate a connection session with the SnapCenter Server for a specified user by using the Open-SmConnection cmdlet.
    Open-smconnection  -SMSbaseurl  https:\\
  2. Retrieve the information about the one or more backups that you want to restore by using the Get-SmBackup cmdlet.

    This example displays information about all available backups:

    PS C:\> Get-SmBackup
    BackupId                      BackupName                    BackupTime                    BackupType
    --------                      ----------                    ----------                    ----------
    341                           ResourceGroup_36304978_UTM... 12/8/2017 4:13:24 PM          Full Backup
    342                           ResourceGroup_36304978_UTM... 12/8/2017 4:16:23 PM          Full Backup
    355                           ResourceGroup_06140588_UTM... 12/8/2017 6:32:36 PM          Log Backup
    356                           ResourceGroup_06140588_UTM... 12/8/2017 6:36:20 PM          Full Backup
  3. Restore data from the backup by using the Restore-SmBackup cmdlet.

    This example restores an up-to-the-minute backup:

    C:\PS> Restore-SmBackup -PluginCode SCE -AppObjectId '\sce-w2k12-exch_DB_2' -BackupId 341

    This example restores a point-in-time backup:

    C:\ PS> Restore-SmBackup -PluginCode SCE -AppObjectId '\sce-w2k12-exch_DB_2' -BackupId 341 -LogRestoreType ByTransactionLogs -LogCount 2

    This example restores a backup on secondary storage to primary story:

    C:\ PS> Restore-SmBackup -PluginCode 'SCE' -AppObjectId 'DB2' -BackupId 81 -Confirm:$false  
    -archive @{Primary="paw_vs:vol1";Secondary="paw_vs:vol1_mirror"} -logrestoretype All

    The -archive parameter enables you to specify the primary and secondary volumes you want to use for the restore.