host kick script

Hi all

I need a bit of help for a script.
I want to kick every host that is not authenticated or bypassed on MT. I can generate a list of those hosts by doing:

/ip hotspot host print where !authorized and !bypassed

and then kick them one by one by doing

remove <host_number>

Now to put that in a script is a little above my head :confused:

Any help will be appreciated

/ip hotspot host remove [find where !authorized and !bypassed]

Awesome! So simple and it works like a charm :smiley:

Thanks mrz

I am looking to take this script a step further.

Could someone explain to me how I would write a script that checks for unauthorized hotspot hosts and removes them only if they have been idle for x amount of time?

Version 4.5.

Thanks in advanced.