HI Francois,
In a custom command to set options in a vfiler, i have used the below in the command code:
param (
[parameter(Mandatory=$true, HelpMessage="Array name or IP address")]
[string]$Array,
[parameter(Mandatory=$true, HelpMessage="Name of the vfiler")]
[string]$VfilerName,
[parameter(Mandatory=$true, HelpMessage="options name")]
[string]$OptionName,
[parameter(Mandatory=$true, HelpMessage="option value")]
[string]$Value
)
# connect to controller
Connect-WFAController -Array $Array -Vfiler $VfilerName
# in vfiler context
Set-NaOption -OptionName $OptionName -OptionValue $Value
This code will help you connect to the vfiler directly and Connect-WFAController will take the credentials from what the user sets in WFA credentials
Hope this helps
-Sharu