vSAN Iscsi 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
# Retrieves all vSAN iSCSI initiator groups from the "vsan-cluster" cluster.
Get-VsanIscsiInitiatorGroup -Cluster "vsan-cluster"
Step 2 : Run commands from the CRUD group
# Creates a new vSAN iSCSI initiator group named "Group1" in the "vsan-cluster" cluster.
New-VsanIscsiInitiatorGroup -Name "Group1" -Cluster "vsan-cluster"
# Adds iSCSI initiators with IQN "initiator1-iqn" and "initiator2-iqn" to the $initiatorGroup initiator group and removes iSCSI initiator with IQN "initiator3-iqn" from the initiator group.
Set-VsanIscsiInitiatorGroup -InitiatorGroup $initiatorGroup -AddInitiator "initiator1-iqn", "initiator2-iqn" -RemoveInitiator "initiator3-iqn"
# Removes the $initiatorGroup iSCSI initiator group without asking for confirmation.
Remove-VsanIscsiInitiatorGroup -InitiatorGroup $initiatorGroup -Confirm:$false
Step 3: Explore More Related Commands:
Get-VsanIscsiInitiatorGroupTargetAssociation | This cmdlet retrieves all pairs of associations between vSAN iSCSI targets and initiator groups, which have access to the corresponding targets. |
Get-VsanIscsiLun | This cmdlet retrieves the vSAN iSCSI LUNs from a cluster or target. |
Get-VsanIscsiTarget | This cmdlet retrieves vSAN iSCSI targets from clusters. |
New-VsanIscsiInitiatorGroupTargetAssociation | This cmdlet associates the specified vSAN iSCSI initiator group with specified vSAN iSCSI target to provide access to the target. |
New-VsanIscsiLun | This cmdlet adds a new vSAN iSCSI LUN to a target. |
New-VsanIscsiTarget | This cmdlet adds a new vSAN iSCSI target to a cluster. |
Remove-VsanIscsiInitiatorGroupTargetAssociation | This cmdlet removes the specified association of vSAN iSCSI initiator group and target. |
Remove-VsanIscsiLun | This cmdlet removes vSAN iSCSI LUNs from their iSCSI targets. |
Remove-VsanIscsiTarget | This cmdlet removes vSAN iSCSI targets form their clusters. |
Set-VsanIscsiLun | This cmdlet modifies the specified vSAN iSCSI LUNs. |
Set-VsanIscsiTarget | This cmdlet modifies the settings of the specified vSAN iSCSI targets. |