<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using the Get-WfaCredentials in a WFA command script (PowerShell) in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138878#M25290</link>
    <description>&lt;P&gt;Hi Rick,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ah sorry i misunderstood your requirement, if you just want to extract the password from the credentials for use in your SSH command line to the IBM storage system within a WFA command using PowerShell you can just use the "GetNetworkCredential" method of the PSAutomation credential object returned from the "Get-WfaCredentials" CmdLet. EG&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$credentials = Get-WfaCredentials -HostName RC_IBM_Storwize
$password = $credentials.GetNetworkCredential().Password&lt;/PRE&gt;
&lt;P&gt;/Matt&lt;/P&gt;</description>
    <pubDate>Wed, 14 Mar 2018 22:31:58 GMT</pubDate>
    <dc:creator>mbeattie</dc:creator>
    <dc:date>2018-03-14T22:31:58Z</dc:date>
    <item>
      <title>Using the Get-WfaCredentials in a WFA command script (PowerShell)</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138792#M25259</link>
      <description>&lt;P&gt;I have created some PowerShell-based WFA commands that allow me to do storage provisioning on IBM Storwize-based storage systems, but I don't like that I have a username/password for logging into the storage systems embedded in my script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Right now, the script has the username/password hard-coded as variables:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;$storageUser&amp;nbsp; &amp;nbsp;= "TESTDOMAIN\WFA_USERACCT"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;$storagePasswd = '***********'&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was hoping I could create a UserName/Password entry in the WFA Execution/Credentials section, and then reference those settings within my script... and I was hoping that the WFA "&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Get-WfaCredentials&lt;/FONT&gt;&lt;/STRONG&gt;" cmdlet would do the trick...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For testing, I am using the&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;C:\Program Files\NetApp\WFA\bin\ps.cmd&lt;/STRONG&gt;&lt;/FONT&gt; shell (for testing), which loads the WFA cmdlets, and I pass the cmdlet the name of an entry that I put in the WFA Execution/Credentials section. This is what I get when I try it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;PS C:\Program Files\NetApp\WFA\bin&amp;gt; Get-WfaCredentials -HostName RC_IBM_Storwize&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;Get-WfaCredentials : Execution URI input line was not set.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think I'm probably missing something simple here... just don't know what it is&amp;nbsp;&lt;IMG id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.netapp.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 13:55:57 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138792#M25259</guid>
      <dc:creator>RickStratton</dc:creator>
      <dc:date>2025-06-04T13:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Get-WfaCredentials in a WFA command script (PowerShell)</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138798#M25261</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the Get-WFACredential CmdLet can't be used externally to WFA, have you considered either passing a Credential Object into your script or using the CmdLets in the DataONTAP toolkit to cache\retrieve them (See get-help for "Add-NcCredential" and "Get-NcCredential". Once credentials are cached you can use them with the "Connect-NcController" cmdlet)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Matt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 02:04:22 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138798#M25261</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2018-03-13T02:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Get-WfaCredentials in a WFA command script (PowerShell)</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138829#M25268</link>
      <description>&lt;P&gt;Hi Matt, thanks for the reply. I am not creating WFA commands/scripts to connect to NetApp storage devices, rather, I am connecting to IBM Storwize storage devices, so I am not sure that the "Nc" NetApp cmdlets will be able to be used...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get to the IBM storage system CLI, I have to SSH into the system... so, to script out communicating with an IBM &lt;SPAN&gt;Storwize&amp;nbsp;&lt;/SPAN&gt;storage device, I use a combination of Microsoft PowerShell talking to the IBM storage system via SSH via Putty PLINK... kinda kludgy, but it is IBM after all!... and it works...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an example, here is an excerpt from one of my PowerShell-based WFA Command scripts ... with a lot of the variable data changed for obvious reasons...:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;&lt;STRONG&gt;# Set some variables&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;$plinkPath&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;nbsp; "C:\Program Files\plink\plink.exe"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;$storageUser&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= "TESTDOMAIN\WFA_USERACCT"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;$storagePasswd&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= '***********'&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;$sourceStorageSystem = "ibmstorage.dns.name"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;$sourceStorwizeCmd&amp;nbsp; &amp;nbsp;= "mkvdisk " + " -iogrp " + $sourceIOGrp + " -mdiskgrp " + $sourceMdiskGrp + " -name " + $sourceVdiskUName + " -size " + $sizeInMB + " -nofmtdisk -unit mb"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;&lt;STRONG&gt;#Call Putty Plink, to SSH into the IBM Storage System, and then run the command to create a vdisk:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;amp; "$plinkPath" $sourceStorageSystem -ssh -l $storageUser -pw $storagePasswd -batch "$sourceStorwizeCmd" &amp;gt; $exportPath\$uniqueVar-$sourceVdiskName-logfile.txt&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see, I need to pass a username (-l) and a password (-pwd) to Putty PLINK in order to SSH into the IBM storage system... so I was hoping I could store these values somewhere other than in my script, such as storing them in another PowerShell object (hopefully in encryped format) ... and then within my PowerShell-based WFA Command scripts, just set my $storageUser and $storagePasswd variables via the appropriate item of that other object, ie. $credential.Username and $credential.Password&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that makes sense... I've only had one cup of coffee this morning!&amp;nbsp;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://community.netapp.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 14:31:37 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138829#M25268</guid>
      <dc:creator>RickStratton</dc:creator>
      <dc:date>2018-03-13T14:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Get-WfaCredentials in a WFA command script (PowerShell)</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138837#M25275</link>
      <description>&lt;P&gt;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/27644"&gt;@RickStratton&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/2305"&gt;@mbeattie&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The below should get you how to do what you are looking for:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="http://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/Connect-to-WFA-vi-web-services-using-machine-domain-account/m-p/73654/highlight/true#M15365" target="_self"&gt;http://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/Connect-to-WFA-vi-web-services-using-machine-domain-account/m-p/73654/highlight/true#M15365&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Its my very old post, but I think its still relavent.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sinhaa&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 18:52:48 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138837#M25275</guid>
      <dc:creator>sinhaa</dc:creator>
      <dc:date>2018-03-13T18:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Get-WfaCredentials in a WFA command script (PowerShell)</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138843#M25277</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could have your script prompt for credentials. You can use the "GetNetworkCredentials" Method of the PSCredential object to enumerate the username and password. This will save you from having to hard code username and passwords or stop prying eyes of entering passwords in clear text (EG $password = Read-Host "Enter the password").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Param(
   [Parameter(Mandatory=$False, HelpMessage="The credentials to authenticate as")]   
   [System.Management.Automation.PSCredential]$Credentials 
)
#'------------------------------------------------------------------------------
#'Prompt for credentials if not provided.
#'------------------------------------------------------------------------------
If(-Not($Credentials)){
   $username    = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
   $Credentials = Get-Credential -Credential $username
}
#'------------------------------------------------------------------------------
#'Enumerate variables from credential object
#'------------------------------------------------------------------------------
$domain   = $Credentials.GetNetworkCredential().Domain
$username = $Credentials.GetNetworkCredential().Username
$password = $Credentials.GetNetworkCredential().Password
If(-Not([String]::IsNullOrEmpty($domain))){
   $user = "$domain\$username"
}Else{
   $user = $username
}
If(([String]::IsNullOrEmpty($user)) -Or ([String]::IsNullOrEmpty($password))){
   Write-Warning -Message "Credentials must be provided"
   Break;
}
#'------------------------------------------------------------------------------
#'Set variables.
#'------------------------------------------------------------------------------
$plinkPath =  "C:\Program Files\plink\plink.exe"
$fqdn      = "ibmstorage.dns.name"
$command   = "mkvdisk " + " -iogrp " + $sourceIOGrp + " -mdiskgrp " + $sourceMdiskGrp + " -name " + $sourceVdiskUName + " -size " + $sizeInMB + " -nofmtdisk -unit mb"
#'------------------------------------------------------------------------------
#'Call Putty Plink, to SSH into the IBM Storage System, and then run the command to create a vdisk:
#'------------------------------------------------------------------------------
&amp;amp; "$plinkPath" $fqdn -ssh -l $user -pw $password -batch "$command" &amp;gt; $exportPath\$uniqueVar-$sourceVdiskName-logfile.txt
#'------------------------------------------------------------------------------&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might also consider passing the other variables as input parameters so they aren't hard coded either. EG&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Param(
   [Parameter(Mandatory=$True, HelpMessage="The FQDN of the storage system")]   
   [String]$Fqdn,
   [Parameter(Mandatory=$True, HelpMessage="The Source IO Group")]   
   [String]$SourceIOGrp,
   [Parameter(Mandatory=$True, HelpMessage="The Source Mdisk Group")]   
   [String]$SourceMdiskGrp,
   [Parameter(Mandatory=$True, HelpMessage="The Source Vdisk UName")]   
   [String]$SourceVdiskUName,
   [Parameter(Mandatory=$True, HelpMessage="The disk size in MB")]   
   [Int]$SizeInMB,
   [Parameter(Mandatory=$False, HelpMessage="The credentials to authenticate as")]   
   [System.Management.Automation.PSCredential]$Credentials 
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then call your script from a powershell prompt, EG assuming you saved it as "ibm.ps1" in "C:\scripts\ibm" (The -Credentials paramater is optional, IE if you don't provide it it will be prompted for credentials)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;PS C:\Scripts\IBM&amp;gt;ibm.ps1 -Fqdn $Fqdn -SourceIOGrp $SourceIOGrp -SourceMdiskGrp $SourceMdiskGrp -SourceVdiskUName $SourceVdiskUName -SizeInMB $sizeInMB&lt;/PRE&gt;
&lt;P&gt;That should work fine if you don't mind being prompted to enter a username or password when you run the script. If you want to run the script multiple times, first create a credential object in your powershell session then pass it as a paramater so you are not prompted to enter credentials every time. EG&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;PS C:\Scripts\IBM&amp;gt;$Credentials = Get-Credential
PS C:\Scripts\IBM&amp;gt;ibm.ps1 -Fqdn $Fqdn -SourceIOGrp $SourceIOGrp -SourceMdiskGrp $SourceMdiskGrp -SourceVdiskUName $SourceVdiskUName -SizeInMB $sizeInMB -Credentials $Credentials&lt;/PRE&gt;
&lt;P&gt;Hope that gives you some ideas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Matt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 23:29:04 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138843#M25277</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2018-03-13T23:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Get-WfaCredentials in a WFA command script (PowerShell)</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138874#M25287</link>
      <description>&lt;P&gt;Sinhaa,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is a pretty cool solution... very creative!... Unforunately, my WFA environment doesn't have a valid certificate, so I get this error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;&lt;STRONG&gt;The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. Location: Row '1' step 'rstratton - test2'.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ended up being able to get it to work this way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;$Credentials&amp;nbsp; &amp;nbsp; = Get-WfaCredentials -HostName RC_IBM_Storwize&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;$securepassword = $Credentials.Password&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;$BSTR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($securepassword)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;$clearpassword&amp;nbsp; = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 21:29:53 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138874#M25287</guid>
      <dc:creator>RickStratton</dc:creator>
      <dc:date>2018-03-14T21:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Get-WfaCredentials in a WFA command script (PowerShell)</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138875#M25288</link>
      <description>&lt;P&gt;Matt,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the feedback. I may not have been doing a good job of explaining what I was trying to do... I am trying to do all this within a WFA Command script (PowerShell based), not in an external PowerShell script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ended up being able to get it to work this way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;$Credentials&amp;nbsp; &amp;nbsp; = Get-WfaCredentials -HostName RC_IBM_Storwize&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;$securepassword = $Credentials.Password&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;$BSTR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($securepassword)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;$clearpassword&amp;nbsp; = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for the other variables - I agree - most, if not all of them, will be populated either with user input or via other WFA Commands that pass parameters to this WFA Command ... my script right now is just a rough POC script, to make sure I can communicate/configure IBM storage systems via NetApp WFA ... unfortunately, we are a 2-vendor storage environment&amp;nbsp;&lt;img id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://community.netapp.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've actually already created an IBM Storwize Data Source collector that then populates an IBM Storwize Scheme and associated Dictionaries&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 21:29:57 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138875#M25288</guid>
      <dc:creator>RickStratton</dc:creator>
      <dc:date>2018-03-14T21:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Get-WfaCredentials in a WFA command script (PowerShell)</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138878#M25290</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ah sorry i misunderstood your requirement, if you just want to extract the password from the credentials for use in your SSH command line to the IBM storage system within a WFA command using PowerShell you can just use the "GetNetworkCredential" method of the PSAutomation credential object returned from the "Get-WfaCredentials" CmdLet. EG&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$credentials = Get-WfaCredentials -HostName RC_IBM_Storwize
$password = $credentials.GetNetworkCredential().Password&lt;/PRE&gt;
&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 22:31:58 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138878#M25290</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2018-03-14T22:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Get-WfaCredentials in a WFA command script (PowerShell)</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138888#M25292</link>
      <description>&lt;P&gt;Matt,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's exactly what I was looking for, sorry for not explaining myself well enough!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate the quick/detailed feedback from both you and Sinhaa.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am a rookie at MS PowerShell scripting... doing some Internet searches, I was seeing references to the&amp;nbsp;"GetNetworkCredential" method, but it wasn't clicking, and wasn't sure I could use it with WFA's&amp;nbsp;Get-WfaCredentials&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 13:36:52 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-the-Get-WfaCredentials-in-a-WFA-command-script-PowerShell/m-p/138888#M25292</guid>
      <dc:creator>RickStratton</dc:creator>
      <dc:date>2018-03-15T13:36:52Z</dc:date>
    </item>
  </channel>
</rss>

