Hello all,
Due to popular request, we have updated our "Set Qtree Options" command to allow setting opportunity locks and security settings on the volume itself.
Usage:
Just define a Qtree object in define node on the volume in question, with the applicable sec options and locks. For qtree name use "-", as per the picture below:

==============================================
Command code (For users of older versions and for reference):
param (
[parameter(Mandatory=$true, HelpMessage="Array name or IP address")]
[string]$Array,
[parameter(Mandatory=$true, HelpMessage="Volume name")]
[string]$VolumeName,
[parameter(Mandatory=$true, HelpMessage="Qtree name")]
[string]$QtreeName,
[parameter(Mandatory=$false, HelpMessage="Virtual Filer name")]
[string]$VFilerName,
[parameter(Mandatory=$false, HelpMessage="The new oplocks settings. Values are enabled or disabled")]
[ValidateSet("enabled", "disabled")]
[string]$OpLocks,
[parameter(Mandatory=$false, HelpMessage="The new security style. Values are unix, ntfs or mixed")]
[ValidateSet("unix", "ntfs","mixed")]
[string]$SecurityStyle
)
# connect to controller
Connect-WFAController -Array $Array -VFiler $VFilerName
if ($QtreeName -eq "-")
{
$QtreeName = ""
}
# Check that Qtree exists
$QtreeStatus = Get-NaQtree -Volumename $VolumeName -QtreeName $QtreeName
if (-Not $QtreeStatus)
{
$msg = "QTree " + $QtreeName + " not found"
throw $msg
}
# Path of an existing qtree. The path should be in this format: /vol/volume/qtree or /vol/volume/ to select the volume qtree.
$QtreePath = "/vol/" + $VolumeName + "/" + $QtreeName
Get-WFALogger -Info -message $("Working on qtree: " +$QtreePath)
if ($OpLocks)
{
Get-WFALogger -Info -message $("Setting Qtree Oplocks: " +$OpLocks)
Set-NaQtree -path $QtreePath -OpLocks $OpLocks
}
if ($SecurityStyle)
{
Get-WFALogger -Info -message $("Setting Qtree Security style: " +$SecurityStyle)
Set-NaQtree -path $QtreePath -SecurityStyle $SecurityStyle
}