Sinhaa,
Thanks for the reply. I've been trying different combinations with various error messages. Using the Get-WfaInputPassword -EncryptedPassword $vcsPass_Password still produces errors. The $vscPass is now an encrypted string but not one the PSCredential likes.
My parameter:
[parameter(Mandatory=$true, HelpMessage="Specify an VSC password.")]
[Alias("vscPass_Password")] [string]$vscPass,
import-module VSC
Get-WFALogger -Info -message ("Username " + $vscUser)
Get-WFALogger -Info -message (" Password: " + $vscPass)
$creds = New-Object System.Management.Automation.PSCredential $vscUser, $vscPass
Connect-VSCserver $VSCHost -Credential $creds
Log messages:
2015-04-27 08:44:10,583 INFO [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-executor-threads - 27) [VSC_Create_DataStore] Username mszafran@netappusps.demo
2015-04-27 08:44:10,630 INFO [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-executor-threads - 24) [VSC_Create_DataStore] Password: cZlo6RBVImU/8+d3KfGOqg==
2015-04-27 08:44:10,724 ERROR [com.netapp.wfa.command.execution.instance.impl.ExecutionInstanceDaoImpl] (http-executor-threads - 29) [VSC_Create_DataStore] Cannot find an overload for "PSCredential" and the argument count: "2".