removing active users with one profile

hi all
i need a script that remove my hotspot users from active users if their profile is “profile1”

thanks

Are 50$ at character on keyboard.

there are two way:

first, the longer:

:foreach i in=[/ip hotspot active find] do={
 :if ([/ip hotspot user $i get profile]="profile1") do={
  /ip hotspot active remove $i;
 }
}

translation: select all active session and search one-by-one if are one user with profile1, and on that case, remove active session from that users

and the second, the shorter:

:foreach i in=[/ip hotspot user find where profile="profile1"] do={
 /ip hotspot active remove [find where name=$i];
}

translation: select all user with profile1 and remove all active session from that users


and obviously I prefer the second… :wink:

i don’t what do you mean in the first replay, but what ever you r great

It’s a joke!!! :laughing:

i’m sorry but they doesn’t worked!!!