Microsoft Powershell with iControl
Thanks Leif. Here's my question for just getting started.
Thought I would finally try this out, I have an irule to add to all VIPs using HTTPs. Seemed that would be easy and quick. I loaded the module, all went well and pretty slick. I needed to use -passthrough with the session to be able to run:
Get-VirtualServer | Where-Object {($_.Destination -like "*443*")} | Select-Object Name
with passthrough in my new-f5session command I was good.
Then a few minutes later I got this error and do not know how to get around it.
Invoke-F5RestMethod : "401 F5 Authorization Required: X-F5-Auth-Token does not exist.
I tried new-f5session, logged in again, still got the error. Shut down powershell and tried it all again, still got th error.
How do I set my session to last longer?
What are the steps required to set a new token?
Within powershell what is the syntax for add-iruletovirtualserver? I have an irule that I want to apply to virtual servers, is this run with the get-virtualserver context?
get-virtualserver $vsname | add-iruletovirtualserver $irulename?
I keep getting False returned.
@Joel Newton(MVP) can you help?