Get-CnsVolume

This cmdlet retrieves CNS volume based on the name or ID filter.

Syntax

[-CnsVolumeType  <CnsVolumeType[]>]
[-Datastore  <Datastore[]>]
[-Name  <String[]>]
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional
CnsVolumeType
CnsVolumeType[] named Specifies the type of the CNS volume. If not specified, all types are queried.
optional
Datastore
Datastore[] named
  • wildcards
  • pipeline
  • Specifies the datastore in which the CNS volume resides.
    optional
    Name
    String[] named
  • wildcards
  • Filters the retrieved vSAN file share by name.
    optional
    Server
    VIServer[] named Specifies the vCenter 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-VIServer cmdlet.

    -Id  <String[]>
    [-Server  <VIServer[]>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    required
    Id
    String[] named Filters the retrieved vSAN file share by ID.
    optional
    Server
    VIServer[] named Specifies the vCenter 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-VIServer cmdlet.

    Output

    VMware.VimAutomation.Storage.Types.V1.Vsan.Cns.CnsVolume

    Examples


    Example 1

    Get-CnsVolume -FileServiceDomain $fileServiceDomain

    Retrieves the vSAN file share which belongs to the $fileServiceDomain file service domain.

    Example 2

    Get-CnsVolume -Datastore $datastore -Name "volume1"

    Retrieves the CNS volume named "volume1" that resides in the $datastore datastore.

    Related Commands

    Feedback

    Was this page helpful?