vSphere PowerCLI Reference



Retrieves the host storages on a vSphere server.


Get-VMHostStorage [-VMHost] <VMHost[]> [-Refresh] [-RescanAllHba] [-RescanVmfs] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

Retrieves the host storages on a vSphere server. The cmdlet returns a list of the storages on the hosts specified by the VMHost parameter. To specify a server different from the default one, use the -Server parameter.


NameTypeDescriptionRequired?Pipeline InputDefault Value
VMHostVMHost[]Specify the hosts for which you want to retrieve storage information.truetrue (ByValue)
RefreshSwitchParameterIndicate whether the cmdlet refreshes the storage system information before retrieving the specified host storages.falsefalse
RescanAllHbaSwitchParameterIndicate whether to issue a request to rescan all virtual machine hosts bus adapters for new storage devices prior to retrieving the storage information.falsefalse
RescanVmfsSwitchParameterIndicate whether to perform a re-scan for new virtual machine file systems that might have been added, prior to retrieving the storage information.falsefalse
ServerVIServer[]Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse

Return Type



The ScsiLun property of the VMHostStorageInfo object is deprecated and sche duled for removal.


-------------- Example 1 --------------

Get-VmHostStorage -VMHost -Refresh

Retrieves storage information from the virtual machine host with IP address

-------------- Example 2 --------------

Get-VMHostStorage | select -expandproperty scsilun | fl *

Retrieves information about the vendor, model, and serial number of the virtual machine host storage SCSI adapter.

Note that for devices, that are not SCSI-3 compliant, the SerialNumber property is not defined. And not all SCSI-3 compliant devices provide the serial number information.

Copyright © 1998 - 2011 VMware, Inc. All rights reserved.