Effective December 3, NetApp adopts Microsoft’s Business-to-Customer (B2C) identity management to simplify and provide secure access to NetApp resources.
For accounts that did not pre-register (prior to Dec 3), access to your NetApp data may take up to 1 hour as your legacy NSS ID is synchronized to the new B2C identity.
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

WFA - Generate Random Password ?

sheelnidhig

Hello All,

 

I am trying to create a workflow which should be able to create a user on a Netapp Cluster mode system.

For that an idea was to be able to generate the random password and send it over an email.

 

But i am not able to pass the password string on to next command.

Attached a test workflow which sould create a password and prints from next command but its not working.

 

Please help,

 

,Sheel

1 ACCEPTED SOLUTION

sinhaa

Sheel,

            Your workflow has fundamental errors. I'm not going to explain them all, there are many.

 

But will resolve your query. To pass dynamically generated password to the next command use Powershell cmdlet : Add-WfaWorkflowParameter and Get-WfaWorkflowParameter in your next command. See how to to use them go-to WFA->Help->Support Links -> WFA Powershell cmdlets help

 

See the below command code for your help:

 

##Random Password

 

param
(
[parameter(Mandatory=$true, HelpMessage="Parameter Name")]
[string]$ParameterName

)

 

Add-Type -AssemblyName System.web
$Password = [Web.Security.Membership]::GeneratePassword(12,3)


Get-WFALogger -Info -message $("Generated " +$ParameterName+":"+$Password )
Add-WfaWorkflowParameter -Name $ParameterName -Value $Password

 

 

#next command Print The password

 

param
(
[parameter(Mandatory=$true, HelpMessage="Parameter Name")]
[string]$ParameterName

)

$Password = Get-WfaWorkflowParameter -Name $ParameterName
Get-WFALogger -Info -message $("Value of "+$ParameterName+" : " + $Password )

 

 

 

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

2 REPLIES 2

sinhaa

Sheel,

            Your workflow has fundamental errors. I'm not going to explain them all, there are many.

 

But will resolve your query. To pass dynamically generated password to the next command use Powershell cmdlet : Add-WfaWorkflowParameter and Get-WfaWorkflowParameter in your next command. See how to to use them go-to WFA->Help->Support Links -> WFA Powershell cmdlets help

 

See the below command code for your help:

 

##Random Password

 

param
(
[parameter(Mandatory=$true, HelpMessage="Parameter Name")]
[string]$ParameterName

)

 

Add-Type -AssemblyName System.web
$Password = [Web.Security.Membership]::GeneratePassword(12,3)


Get-WFALogger -Info -message $("Generated " +$ParameterName+":"+$Password )
Add-WfaWorkflowParameter -Name $ParameterName -Value $Password

 

 

#next command Print The password

 

param
(
[parameter(Mandatory=$true, HelpMessage="Parameter Name")]
[string]$ParameterName

)

$Password = Get-WfaWorkflowParameter -Name $ParameterName
Get-WFALogger -Info -message $("Value of "+$ParameterName+" : " + $Password )

 

 

 

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

sheelnidhig

Thanks Sinhaa, atleast this works for me:-)

Would it be possible to point out the errors that you saw in the workflow.

 

,Sheel

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