Syntax
Get-Datastore [-Server <VIServer[]>] [[-Name] <String[]>] [-Datacenter <Datacenter[]>] [-VMHost <VMHost[]>] [-VM <VirtualMachine[]>] [-Entity <VIObject[]>] [-Refresh] [<CommonParameters>]Related Commands
Online versionDetailed Description
Retrieves the datastores available on a vSphere server. Returns a set of datastores that correspond to the filter criteria defined by the cmdlet parameters. To specify a server different from the default one, use the -Server parameter.Parameters
Return Type
DatastoreNotes
Examples
-------------- Example 1 --------------
Get-Datastore -VMHost (Get-VMHost -Id HostSystem-host-8)
Retrieves a list of the datastores on the virtual machine host with ID HostSystem-host-8.
-------------- Example 2 --------------
$datastores = Get-Datastore | where {$_.type -eq "NFS"}Lists all the datastores of the Vmfs file type.