VsanFile Category | Vmware PowerCLI Reference

vSAN File 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-VsanFileServiceDomain cmdlet. See example below:

# Retrieves the vSAN file service domain from the $cluster vSAN cluster.

Get-VsanFileServiceDomain -Cluster $cluster

Step 2 : Run commands from the CRUD group

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

# Creates a primary new vSAN file server IP configuration with "192.128.3.253" as a gateway, "192.128.3.11" as an IP address, "h1.vmware.com" as FQDN, and "255.255.255.0" as a subnet mask.

New-VsanFileServerIpConfig -Gateway "192.128.3.253" -SubnetMask "255.255.255.0" -IpAddress "192.128.3.11" -Fqdn "h1.vmware.com" -IsPrimary
You can UPDATE objects by using Add-VsanFileServiceOvf cmdlet. See example below:

# Downloads an OVF file from the specified URL into the vSphere OVF repository.

Add-VsanFileServiceOvf -Url $url
You can REMOVE objects by using Remove-VsanFileServiceDomain cmdlet. See example below:

# Removes the vSAN file service domain without asking for confirmation.

Remove-VsanFileServiceDomain -VsanFileServiceDomain $domain serviceDomain -Confirm:$false

Step 3: Explore More Related Commands:


Get-VsanFileServiceOvfInfo This cmdlet retrieves a vSAN file service OVF information.
Get-VsanFileShare This cmdlet retrieves vSAN file shares based on the name or ID filter.
Get-VsanFileShareSnapshot This cmdlet retrieves vSAN file share snapshots based on the name or other filters.
New-VsanFileServiceDomain This cmdlet creates a file service domain in a vSAN cluster.
New-VsanFileShare This cmdlet creates a new vSAN file share in a specified file service domain.
New-VsanFileShareNetworkPermission New-VsanFileShareNetworkPermission -IPSetOrSubnet &#60string&#62 -VsanFileShareAccessPermission &#60VsanFileShareAccessType&#62 [-AllowSquashRoot] [-WhatIf] [-Confirm] [&#60CommonParameters&#62]
New-VsanFileShareSnapshot This cmdlet creates a vSAN file share snapshot for the specified vSAN file share.
Remove-VsanFileShare This cmdlet removes vSAN file shares.
Remove-VsanFileShareSnapshot This cmdlet removes vSAN file share snapshots.
Set-VsanFileServiceDomain This cmdlet modifies the settings of the given vSAN file domains.
Set-VsanFileShare This cmdlet modifies the configuration of a specified vSAN file share.