The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to register at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Active IQ Unified Manager Discussions

Add CIFS share propreties in WFA

NTA1201

Hello,

 

I would like to enable acces-based-enumeration on CIFS share create Workflow.

I know I have to add parameters definition but as I'm new in WFA I have no clue how to do it.

Can you pls give me step by step procedure?

 

Here is my "create CIFS share" power shell command:

param (
  [parameter(Mandatory=$true, HelpMessage="Name or IP address of the cluster hosting the Storage Virtual Machine.")]
  [string]$Cluster,

  [parameter(Mandatory=$true, HelpMessage="Name of the Storage Virtual Machine in which the CIFS share will be created.")]
  [string]$Vserver,

  [parameter(Mandatory=$true, HelpMessage="File system path that is shared through this CIFS share.")]
  [string]$Path,

  [parameter(Mandatory=$true, HelpMessage="Name of the CIFS share to be created.")]
  [string]$ShareName,

  [parameter(Mandatory=$false, HelpMessage="Option which determines whether SMB encryption is required for incoming CIFS traffic. By default this option is false.")]
  [ValidateSet("true","false")]
  [string]$EncryptData,

  [parameter(Mandatory=$false, HelpMessage="A comment that gives a description of the CIFS share. CIFS clients see this description when browsing the Storage Virtual Machine's CIFS shares.")]
  [string]$Comment
)

Get-WFALogger -Info -message $("Creating CIFS share: " + $ShareName + "at path: "+ $Path)

$command = "Add-NcCifsShare -Name " +  $ShareName + " -Path " + $Path

# Add share
if ($Comment)
{
    $command += " -Comment " + "'" + $Comment + "'"
}

if ($EncryptData -eq "true")
{
    $command += " -ShareProperties encrypt_data"
}

$command += " -VserverContext " + $Vserver

# connect to cluster
Connect-WfaCluster $Cluster

Try
{
    $result = Invoke-Expression -ErrorAction stop $command
}
Catch
{
    $ErrorMessage = $_.Exception.Message
    throw "Create CIFS share failed. Reason : " + $ErrorMessage
}
if ($result.Status -eq "failed")
 {
    throw "Create CIFS share failed. Reason : " + $result.ErrorMessage
 }

 

Thx.

 

 

0 REPLIES 0
Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public