CNS Category

Cmdlets are usually implemented around resource operations. The four basic operations are CREATE, READ, UPDATE and DELETE. This set of operations is known as CRUD. Most of the cmdlets support CRUD which are respectively cmdlets that start with the New/Get/Set/Remove cmdlet verbs but they also may have additional operations.

Step 1: Retrieve a object by running a Get command 

You can READ objects by using Get-CnsVolume cmdlet. See example below:
Get-CnsVolume -FileServiceDomain $fileServiceDomain

Step 2: Run commands from the CRUD group 

You can CREATE objects by using New-CnsVolume cmdlet. See example below:

New-CnsVolume -Name 'test-cns' -VDisk $vdisk -CnsVolumeMetadata $metadata -StaticBlock
You can UPDATE objects by using Set-CnsVolume cmdlet.

You can REMOVE objects by using Remove-CnsVolume cmdlet.

Step 3: Explore More Related Commands: 

New-CnsContainerCluster This cmdlet creates a vSAN file service IP configuration at the client side.
New-CnsKubernetesEntityMetadata This cmdlet creates a Cloud Native Storage (CNS) Kubernetes entity metadata at a client side.
New-CnsKubernetesEntityReference This cmdlet creates a Cloud Native Storage (CNS) Kubernetes entity reference at the client side.
New-CnsVolumeAttachment New-CnsVolumeAttachment -CnsVolume -VM [-Server ] [-RunAsync] [-WhatIf] [-Confirm] []
New-CnsVolumeMetadata This cmdlet creates a Cloud Native Storage (CNS) volume metadata at the client side.
Remove-CnsVolumeAttachment Remove-CnsVolumeAttachment -CnsVolume -VM [-Server ] [-RunAsync] [-WhatIf] [-Confirm] []

Was this page helpful?