Get-WBVirtual Machine

Gets all virtual machines and components from the backup policy.

Syntax

Get-WBVirtualMachine
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Get-WBVirtualMachine
   [[-Policy] <WBPolicy>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Get-WBVirtualMachine cmdlet gets all virtual machines and Hyper-V Server components from the WBPolicy object or the physical computer.

Examples

Example 1: Get all virtual machines and components from the backup policy

PS C:\> Get-WBVirtualMachines

This command queries for virtual machines and Hyper-V Server 2016 components on the machine and lists them.

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Aliases: cf
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Policy

Specifies the backup policy information contained in the WBPolicy object to display.

Type: WBPolicy
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Aliases: wi
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Inputs

Windows.ServerBackup.Commands.WBPolicy

Outputs

Windows.ServerBackup.Commands.WBVirtualMachine[]