Srinath_Sadda_1
Mar 10, 2015Altostratus
iControl PowerShell Authentication Behavior (Initialize-F5.iControl)
Hello,
I've the below sample code snippet to retrieve pool member statistics. F5 LTM v11.4.1
In my assumption, "Initialize-F5.iControl" Cmdlet establishes only one authentication request to F5 there by total of 3 requests for 3 HostNames. Am I correct?
Is each query like "$iControl.LocalLBPoolMember.get_object_status()" establishes another authentication request to F5?
Is there any documentation exist which talks about iControl authentication (PowerShell) in detail?
Any further help would be greatly appreciated. Thank you!
ForEach ($HostName in $HostNames) {
Try {
If (Initialize-F5.iControl -HostName $HostName -PSCredentials $F5Credential) {
$iControl = Get-F5.iControl
}
ForEach ($Pool in $Pools) {
$PoolMemberObjectStatus = $iControl.LocalLBPoolMember.get_object_status($Pool)
ForEach ($PoolMemberObject in $PoolMemberObjectStatus) {
$PoolMembers = $PoolMemberObject.member
ForEach ($PoolMember in $PoolMembers) {
...
...
...
}
}
}
}
Catch {
Write-Error -Message $_.Exception.Message
}
}