NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Active IQ Unified Manager Discussions

vfiler set options

francoisbnc
5,161 Views

Hi,

I would like set some options during WFA vfiler creation and the only way I found is

Invoke-NaSsh -ControllerName 172.16.4.134 -Command "vfiler run options vftest cifs.restrict_anonymous 1"

The problem is that invoke-NAssh don't use connect-wfacontroller credentials and I need to cache them before with add-NACrendentials.

Does exist a way to use  invoke-NAssh with WFA integrated cretentials or set options in vfilers in others ways.

Thanks in advance.

francois

1 ACCEPTED SOLUTION

sharu
5,161 Views

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

View solution in original post

2 REPLIES 2

sharu
5,162 Views

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

francoisbnc
5,161 Views

Hi sharu,

That is exactely what i wished, thanx a lot


francois

Public