<#
.SYNOPSIS
Create a new NFS Server.
.DESCRIPTION
Create a new NFS Server.
You need to have an active session with the array.
.NOTES
Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENSE
.LINK
https://github.com/equelin/Unity-Powershell
.PARAMETER Session
Specify an UnitySession Object.
.PARAMETER Confirm
If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.
.PARAMETER WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.
.EXAMPLE
New-UnityNFSServer -nasServer 'nas_15' -hostName 'NFS01'

#ID of the NAS server associated with the NFS server.[Parameter(Mandatory=$true,HelpMessage='ID of the NAS server associated with the NFS server.')][string]$nasServer,

#Host name of the NFS server. If host name is not specified then SMB server name or NAS server name will be used to auto generate the host name.[Parameter(Mandatory=$false,HelpMessage='Host name of the NFS server. If host name is not specified then SMB server name or NAS server name will be used to auto generate the host name.')][string]$hostName,

#Indicates whether the NFSv4 is enabled on the NAS server specified in the nasServer attribute.[Parameter(Mandatory=$false,HelpMessage='Indicates whether the NFSv4 is enabled on the NAS server specified in the nasServer attribute.')][bool]$nfsv4Enabled,

#Formating the result. Converting it from JSON to a Powershell object$results=($request.content|ConvertFrom-Json).content

Write-Verbose"$Item with the ID $($results.id) has been created"

#Executing Get-UnityUser with the ID of the new userGet-UnityNFSServer-Session$Sess-ID$results.id}# End If ($request.StatusCode -eq $StatusCode)}# End If ($Sess.TestConnection()) }# End Foreach ($sess in $session)}# End Process}# End Function