Get-HCXDatastore Command | Vmware PowerCLI Reference

Get-HCXDatastore

This cmdlet retrieves a list of HCX datastores. If the HCXSite is not passed as input, the source site datastores are listed. You can create new HCX migration, replication, and appliance requests by using the output of the cmdlet.

Syntax

Get-HCXDatastore
-Uid < String[] >
[-Server < HcxServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Uid String[] named
Specifies the Uid of the HCX datastore. Note: When a list of values is specified for the Uid parameter, the returned objects have a Uid that matches exactly one of the string values in the list.
optional Server HcxServer[] named
  • wildcards
Specifies the HCX Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-HCXServer cmdlet.
Get-HCXDatastore
[-Name < String[] > ]
[-Server < HcxServer[] > ]
[-Site < HCXSite[] > ]
[-StorageProfile < HCXStorageProfile > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional Name String[] named
  • wildcards
Specifies the name of the HCX datastore.
optional Server HcxServer[] named
  • wildcards
Specifies the HCX Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-HCXServer cmdlet.
optional Site HCXSite[] named
  • pipeline
Specifies the HCX site for which you want to list the datastores. If this parameter is not specified, the default one is selected from the source site.
optional StorageProfile HCXStorageProfile named
  • pipeline
Specifies the HCX storage profile matching which you want to list the datastores.

Output

VMware.VimAutomation.Hcx.Types.V1.HCXDatastore

Examples

Example 1

Get-HCXDatastore

Retrieves the available HCX datastore at the source site.

Example 2

Get-HCXDatastore -Name "myDatastoreName"

Retrieves the HCX datastore by name at the source site.

Example 3

$myDestination = Get-HCXSite -Destination -Name "myDestinationName"
        Get-HCXDatastore -Site $myDestination

Retrieves the HCX datastore by destination site.

Example 4

$myDestination = Get-HCXSite -Destination -Name "myDestinationName"
        $myStorageProfile = Get-HCXStorageProfile -Site $myDestination -Name "myStorageProfileName"
        Get-HCXDatastore -Site $myDestination -StorageProfile $myStorageProfile

Retrieves the HCX datastore by destination site and storage profile.

Example 5

$myDatastore = Get-HCXDatastore -Name "myDatastoreName"
        Get-HCXDatastore -Uid $myDatastore.Uid

Retrieves the HCX datastore by Uid.

Related Commands

HCXDatastore

This cmdlet retrieves a list of HCX datastores.