Get-VMGuestDisk
This cmdlet retrieves storage volumes as seen by the virtual machines' guest operating systems. Optionally, you can filter the results by the virtual machine or the file system path where the storage volume is mounted. Alternatively, this cmdlet allows retrieving the guest storage volumes, backed by a specified virtual disk.Note: You should run the virtual machine's guest operating system at least once to make the storage volumes information available.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
optional |
|
String[] | named |
|
Filters the results based on the file system mount location. For example, "C:\" or "/etc/my-mount-root". This parameter supports wildcards. | optional |
|
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 |
|
VirtualMachine[] | named |
|
Limits the results to guest disks on the specified virtual machines. |
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
optional |
|
String[] | named |
|
Filters the results based on the file system mount location. For example, "C:\" or "/etc/my-mount-root". This parameter supports wildcards. | optional |
|
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[] | named |
|
Limits the results to guest disks on the specified virtual machine guests. |
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
HardDisk[] | named |
|
Limits the results to guest disks that are backed by the specified virtual disks. | optional |
|
String[] | named |
|
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
Retrieves all guest disks for a specified virtual machine.
Example 2
Retrieves all C: drives on a specified set of virtual machines.
Related Commands
VM
VMConsoleWindow
VMGuest
VMGuestDisk
VMGuestFile
VMQuestion
VMResourceConfiguration
VMScript