Forum Discussion
dan_03_140075
Nimbostratus
Apr 03, 2014Passing credential to New-Object iControl.Interfaces
Hello, big fan of powershell and icontrol. The F5 DevCentral has been awesome to get up and running. I have been using
$cred = (get-credential)
Initialize-F5.iControl -HostName $g_bigip -credentials...
Apr 21, 2014
I think your problem is with the Get-Credential call. That will return a PSCredential object with UserName (String) and Password (SecureString) members. You are treating the SecureString as a regular string when passing that in. Odds are the error occurs there. Try converting the password into a clear text string before calling initialize.
$creds = Get-Credential;
$user = $creds.Username;
$pass = $creds.GetNetworkCredential().Password;
Here's an article on dissecting the SecureString
Hope this helps...
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects