< Back

Get-VMHostStorage

Sun Jan 19, 2020 6:56 pm

NAME Get-VMHostStorage



SYNOPSIS

This cmdlet retrieves the host storages on a vCenter Server system.





SYNTAX

Get-VMHostStorage -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]



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

[<CommonParameters>]





DESCRIPTION

This cmdlet retrieves the host storages on a vCenter Server system. 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.





PARAMETERS

-Id <String[]>

Specifies the IDs of the host storages that you want to retrieve.



Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that

matches exactly one of the string values in that list.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Refresh [<SwitchParameter>]

Indicates whether the cmdlet refreshes the storage system information before retrieving the specified host

storages.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-RescanAllHba [<SwitchParameter>]

Indicates whether to issue a request to rescan all virtual machine hosts bus adapters for new storage devices

prior to retrieving the storage information.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-RescanVmfs [<SwitchParameter>]

Indicates whether to perform a re-scan for new virtual machine file systems that might have been added, prior

to retrieving the storage information.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Server <VIServer[]>

Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this

parameter, the command runs on the default servers. For more information about default servers, see the

description of Connect-VIServer.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-VMHost <VMHost[]>

Specifies the hosts for which you want to retrieve storage information.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Zero or more VMHostStorageInfo objects







NOTES





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



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



Get-VmHostStorage -VMHost 10.23.112.234 -Refresh



Retrieves storage information from the virtual machine host with IP address 10.23.112.234.

-------------------------- 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.



RELATED LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... orage.html

Set-VMHostStorage