Forum Discussion
iControl PowerShell Authentication Behavior (Initialize-F5.iControl)
Michael has it pretty much correct but each time you make a call it doesn't make a separate auth calls. The Initialize-F5.iControl essentially creates an internal iControl.Interfaces object that can be retrieved with the Get-F5.iControl cmdlet. When you call Initialize-F5.iControl it makes a call to the BIG-IP's system information interface just to check that the credentials will work. Then when you access any of the interface members of the Interfaces object (returned from Get-F5.iControl), a separate auth call isn't made. It just uses the credentials you originally supplied and adds Authentication headers to all method call requests. iControl is stateless in that each call you make will establish a new HTTPS connection to the BIG-IP and request the URL for the given method. I believe I set the PreAuthenticate header on the .Net connection object so that it would pass the credentials on the first pass without requiring retries.
If you wish to manage multiple systems, you can create individual interfaces objects, initialize each once, and then use them for your different devices. Essentially it's just a object storing the server IP and client credentials.
You can do something like this for multiple systems if you don't want to have to keep calling Initialize-F5.iControl back and forth
$bigip1 = New-Object iControl.Interfaces
$bigip1.initialize("address1", 443, "username1", "password1")
$bigip2 = New-Object iControl.Interfaces
$bigip2.initialize("address2", 443, "username2", "password2")
...
$sysinfo1 = $bigip1.SystemSystemInfo.get_system_information()
$sysinfo2 = $bigip2.SystemSystemInfo.get_system_information()
Hope this helps...
-Joe
Recent Discussions
Related Content
* 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