Short Description
Looks for VMware datastores.
Applies to
Platform: VMware
Product Edition: Standard, Enterprise, Enterprise Plus
Syntax
This cmdlet provides two parameter sets.
- For looking for datastores connected to a specific host:
Find-VBRViDatastore -Server <CHost> [-Name <string[]>] [<CommonParameters>] |
- For looking for datastores compatible with a specific storage policy:
Find-VBRViDatastore -StoragePolicy <VBRViStoragePolicy> [-Name <string[]>] [<CommonParameters>] |
Detailed Description
This cmdlet returns datastores connected to the specified ESX(i) host or that are compatible with a particular VMware storage policy profile.
With both parameter sets, you can narrow down your search by indicating a datastore name.
Parameters
Parameter | Description | Required | Position | Accept | Accept |
Server | Specifies the ESX(i) host. The cmdlet will return the datastores connected to this host. Accepts server object or string (host name) type. | True | Named | True (ByValue, | False |
Storage | Specifies the VMware storage policy profile. The cmdlet will return datastores compatible with this profile. Accepts VBRViStoragePolicy type. | True | Named | True (ByValue, | False |
Name | Specifies the array of datastores names. The cmdlet will return datastores with these names. | False | Named | False | True |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
Return Type
CViDatastoreItem
Example 1
This command looks for the list of datastores connected to the ESXi hosts. The servers are obtained with Get-VBRServer, sorted by "Type" and piped down.
PS C:\PS> Get-VBRServer -Type ESXi | Find-VBRViDatastore |
Example 2
This command looks for the datastores connected to the ESXi host named "ESXiHost". The server is obtained with Get-VBRServer and piped down. The list of datastores is narrowed down to the datastore named "MSExchange" and datastores with names starting with "LocalStore_0".
PS C:\PS> Get-VBRServer -Name "ESXiHost" | Find-VBRViDatastore -Name "MSExchange", "LocalStore_0*" |
Example 3
This command looks for the datastore named "MSExchange" connected to the server represented by the $server variable. The server object is obtained with Get-VBRServer and assigned to the variable beforehand.
PS C:\PS> Find-VBRViDatastore -Server $server -Name "MSExchange" |
Related Commands