vSAN Fault 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 the vSAN fault domain which contains the $vmHost virtual machine host.
Get-VsanFaultDomain -VMHost $vmHost
Step 2 : Run commands from the CRUD group
# Creates a new vSAN fault domain named "MyFaultDomainName", which has virtual machine hosts $vmHost1 and $vmHost2.
New-VsanFaultDomain -VMHost $vmHost1, $vmHost2 -Name "MyFaultDomainName"
# Renames the $fd vSAN fault domain to "NewName" and adds the $vmHost1 and $vmHost2 virtual machine hosts to it. Also, removes the $vmHost3 virtual machine host from the renamed vSAN fault domain.
Set-VsanFaultDomain -VsanFaultDomain $fd -Name "NewName" -AddVMHost $vmHost1, $vmHost2 -RemoveVMHost $vmHost3
# Removes the $vsanFaultDomain vSAN fault domain without asking for confirmation.
Remove-VsanFaultDomain -VsanFaultDomain $vsanFaultDomain -Confirm:$false