Get-XenVBD

Last published : Nov 12, 2026
Gets the VBD objects in the pool.

Syntax

Get-XenVBD [[-Ref] <XenRef[VBD]>] [-BestEffort] [-SessionOpaqueRef <string>]
    [<CommonParameters>]
Get-XenVBD [-Uuid] <guid> [-BestEffort] [-SessionOpaqueRef <string>] [<CommonParameters>]

Description

Retrieves the VBD objects in the pool. With no parameters the cmdlet returns the whole collection; use -Uuid or -Ref to select one.
VBD: A virtual block device.

Parameters

-BestEffort

If set, the cmdlet continues processing further objects instead of throwing a terminating error when an operation fails for one object.
Attribute Value
Type SwitchParameter
Required False
Position Named
Accepts pipeline input False

-Ref

The VBD object to operate on, specified by its opaque reference.
Attribute Value
Type XenRef[VBD]
Required False
Position 0
Accepts pipeline input True (ByPropertyName)
Aliases opaque_ref

-SessionOpaqueRef

The session object on which to run the cmdlet. This overrides the default session and lets you target a specific open XenServer connection.
Attribute Value
Type string
Required False
Position Named
Accepts pipeline input False

-Uuid

The UUID of the VBD to operate on.
Attribute Value
Type guid
Required True
Position 0
Accepts pipeline input True (ByPropertyName)

Inputs

  • XenRef[VBD]
  • guid

Outputs

  • VBD[]

Examples

Example 1: List every VBD

PS> Get-XenVBD
Retrieves every VBD object in the pool. With no parameters the cmdlet fetches the whole collection.

Example 2: List a VM's disks, excluding the CD drive

PS> $vm = Get-XenVM -Name "web-01"
PS> $vm.VBDs |
    ForEach-Object { Get-XenVBD -Ref $_ } |
    Where-Object { $_.type -eq "Disk" }
A VBD is the attachment between a VM and a virtual disk, and a CD drive is a VBD too, hence the filter on type. The VM record holds references, so each one is resolved with -Ref.

Example 3: Retrieve one VBD by uuid

PS> Get-XenVBD -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff
Retrieves a single VBD. -Uuid is the way to be sure of exactly one object.
  • Class: VBD
  • Using the XenServer PowerShell module