Find-VBRViDatastore
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:
- For looking for datastores compatible with a specific storage policy:
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 ESXi 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 on common parameters, see the About CommonParameters section of Microsoft Docs.
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.
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".
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.
Related Commands