Get-VMGuestDisk

Syntax

[-DiskPath  <String[]>]
[-Server  <VIServer[]>]
[-VM  <VirtualMachine[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional
DiskPath
String[] named
  • wildcards
  • Filters the results based on the file system mount location. For example, "C:\" or "/etc/my-mount-root". This parameter supports wildcards.
    optional
    Server
    VIServer[] named Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.
    optional
    VM
    VirtualMachine[] named
  • pipeline
  • Limits the results to guest disks on the specified virtual machines.

    [-DiskPath  <String[]>]
    [-Server  <VIServer[]>]
    [-VMGuest  <VMGuest[]>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    optional
    DiskPath
    String[] named
  • wildcards
  • Filters the results based on the file system mount location. For example, "C:\" or "/etc/my-mount-root". This parameter supports wildcards.
    optional
    Server
    VIServer[] named Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.
    optional
    VMGuest
    VMGuest[] named
  • pipeline
  • Limits the results to guest disks on the specified virtual machine guests.

    -HardDisk  <HardDisk[]>
    [-DiskPath  <String[]>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    required
    HardDisk
    HardDisk[] named
  • pipeline
  • Limits the results to guest disks that are backed by the specified virtual disks.
    optional
    DiskPath
    String[] named
  • wildcards
  • Filters the results based on the file system mount location. For example, "C:\" or "/etc/my-mount-root". This parameter supports wildcards.

    Output

    VMware.VimAutomation.ViCore.Types.V1.VM.Guest.VMGuestDisk

    Examples


    Example 1

    PS C:\> Get-VMGuestDisk -VM $myVM

    Retrieves all guest disks for a specified virtual machine.

    Example 2

    PS C:\> $myVms | Get-VMGuestDisk -DiskPath "C:\"

    Retrieves all C: drives on a specified set of virtual machines.

    Related Commands

    Feedback

    Was this page helpful?