Get-WBBackupSet
Get-WBBackupSet
Gets the list of backups (WBBackupSet objects) that were created for a server and stored at a location that you specified.
Syntax
Get-WBBackupSet [[-BackupTarget] <WBBackupTarget>] [[-MachineName] <string>] [<CommonParameters>]
Detailed Description
The Get-WBBackupSet cmdlet gets the list of backups (WBBackupSet objects) that were created for a server and stored at a location that you specified. The WBBackupSet object contains information about backup time and date, computer that was backed up, what type of backup was created, and what items were backed up.
Parameters
-BackupTarget <WBBackupTarget>
Specifies the storage location that contains the backups that you want the details for. Use for listing information about backups that were not created of the local computer. The backup sets will be listed from the catalog on the computer specified, not from the system catalog of the local computer. Alternate locations can be locally attached disk drives or remote shared folders.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
1 |
-MachineName <string>
Specifies the computer that you want backup details for. Use when backups of multiple computers are stored in the same location. Should be used when BackupTarget is specified.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
2 |
-CommonParameter
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. For more information, see about_CommonParameters.
Input and Return Types
The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.
Notes
When used without parameters, the Get-WBBackupSet cmdlet returns all the backups for a server. When the Get-WBBackupSet cmdlet is used with the BackupTarget parameter, it shows all backups at the specified location. And when it is used with the parameters BackupTarget and MachineName, it returns all backups for the specified server stored at the specified location.
To use Windows Server Backup cmdlets, you must be a member of the Administrators group or Backup Operators group.
Examples
EXAMPLE 1
C:\PS>$backups = Get-WBBackupSet
A list of WBBackupSet objects.
Description
-----------
Gets the backups for the server from the system catalog.
EXAMPLE 2
C:\PS>$backupLocation = New-WBBackupTarget -VolumePath d:
$backups = Get-WBBackupSet -BackupTarget $backupLocation
A list of WBBackupSet objects.
Description
-----------
Queries the catalog on the backup storage location $backupLocation and gets the backups for the server. (When the backup storage location contains backups from multiple computers, use the -MachineName <MachineName> parameter to specify which computer's backups to return.)