Get-WBDisk
Gets a list of internal and external disks that are online for the local computer.
Syntax
Get-WBDisk
Description
The Get-WBDisk cmdlet gets a list of internal and external disks that are online for the local computer. You can add these disks to a WBPolicy object that contains a backup policy by using the New-WBBackupTarget cmdlet to specify online disks as backup storage locations.
To use Windows Server® 2012 Backup cmdlets, you must be a member of the Administrators group or Backup Operators group.
Examples
Example 1: Get a list of disks for the local computer
PS C:\> $disks = Get-WBDisk
A list of WBDisk objects.
This command gets a list of the disks that are on the system. You can then use the WBDisk object in the variable named $disks to specify a WBBackupTarget object, and use the WBBackupTarget object to specify where to store backups for a WBPolicy object that contains a backup policy.
Inputs
None
None
Outputs
WBDisk[]
The Get-WBDisk cmdlet lists an array of WBDisk objects for the hard disks that the cmdlet detects on the local computer.
Related Links
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for