This is an archive version of the document. To get the most up-to-date information, see the current version.

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:

Find-VBRViDatastore -Server <CHost> [-Name <string[]>]  [<CommonParameters>]

  • For looking for datastores compatible with a specific storage policy:

Find-VBRViDatastore -StoragePolicy <VBRViStoragePolicy> [-Name <string[]>]  [<CommonParameters>]

Related Commands

Get-VBRServer

Find-VBRViStoragePolicy

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.

Return Type

CViDatastoreItem

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

Server

Specifies the ESX(i) host. The cmdlet will return the datastores connected to it.

True

Named

True (ByValue,
ByProperty
Name)

False

Storage
Policy

Specifies the VMware storage policy profile. The cmdlet will return datastores compatible with it.

True

Named

True (ByValue,
ByProperty
Name)

False

Name

Specifies the name of the datastore you want to get, or search conditions.

You can specify multiple names separated by commas.

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.

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.

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

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.

Find-VBRViDatastore -Server $server -Name "MSExchange"