Forum Discussion
Powershell New-F5Session and close session issues.
Hi LanceLyons, this issue on Joel's github repo for this might provide some insight to the issue you're facing.
Hi JRahm, Thanks. I did also post over there. Headed over there to see if there was any response.
I posted in this area https://github.com/joel74/POSH-LTM-Rest/issues not sure if that was the right one but it seemed to have the most activity.
thanks
Lance
- JRahmAug 02, 2022Admin
Did you try the passthru switch Joel mentioned in the issue I shared? Seems to be the same scenario you mentioned, but posh is not my jam so I'm just throwing ideas out.
- LanceLyonsAug 02, 2022Cirrus
Yeah, I am able to get it to work for 1 session but I am not sure how to do 2 sessions since we have 2 F5s that we have to change iRules on. It seems like the New-F5Session is part of the scripts attributes and so the calls to Add-iRuleToVirtualServer assumes the "current F5 session" that is open so passthru might be the default. Joel may know of an alternative so I will have to wait and see.
I can always create another script that handles iRules for the other F5 but it involves a little more work and 2 separate scripts and commands to be created and executed.- JRahmAug 02, 2022Admin
Looking through some comments on the codeshare, i found this:
$F5Session = New-F5session -LTMName $host_address -LTMCredentials $mycreds -PassThrough; Get-Pool -F5Session $F5Session | Select-Object -ExpandProperty fullPath;
So maybe if you had that in a loop and just passed in $host_address from the iterable it would update? No worries if you've tried this, still slinging mud against the wall in the event something sticks... 🙂
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