i have a task to delete specific sesssions every night. is there anyway i can automate this. i looked in the powershell module but there were no delete modules.
i am looking to run the following command every night..
-> delete sys connection cs-server-addr 126.96.36.199 cs-client-addr 188.8.131.52
please refer to SOL https://support.f5.com/kb/en-us/solutions/public/11000/600/sol11635.html?sr=51181919
it contain an example to run tmsh command correctly by crontab
from usage of crontab:
refer to https://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-autotasks.html
Hope it help.
The powershell module has some built-ins, but it has access to the API via the Get-F5.iControl object. You should be able to use a combination of get_all_active_connections_v2 and delete_active_connection to achieve your result.
Here's a quick sample on getting the connection list:
How to write in Powershell? is it like below
$Clientside_ClientipPortDef = new-object -typename iControl.CommonIPPortDefinition
$Clientside_ClientipPortDef.address = "10.118.219.205";
$Clientside_ClientipPortDef.port = 4500;
$Serverside_ServeripPortDef = new-object -typename iControl.CommonIPPortDefinition
$Serverside_ServeripPortDef.address = "10.118.219.198";
$Serverside_ServeripPortDef.port = 4500;
$Clientside_ServeripPortDef = new-object -typename iControl.CommonIPPortDefinition
$Clientside_ServeripPortDef.address = "10.118.219.220";
$Clientside_ServeripPortDef.port = 4500;