Skip to content

From Small to BIGGER

Menu
  • Home
  • About Us
  • Portofolio
  • Contact
Menu

Mikrotik – Script Foreach and Set Data

Posted on October 21, 2022October 21, 2022 by kura

Case: how to disabled many user pppoe and set comment

:local date;
:local list;

:set date [/system clock get date];
:set list {"2257"; "2354"; "2146"; "2382"; "2396"; "2432"; "2394"};

:foreach i in=$list do={
/ppp secret set [find where name~"$i"] comment="Suspend $date, Kura" disabled=yes
}
FacebookTweetLinkedIn

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Laravel & Datatables – Server Side Manualy
  • Linux – User Login Set Directory & Set Permission
  • Javascript Call Function From iFrame
  • Python – Create data dummy attendance
  • PHPWord Convert HTML + PDF

Categories

  • Apache
  • Database
  • Freeradius
  • Javascript
  • Mikrotik
  • Mysql
  • Networking
  • PHP
  • Postgresql
  • Programming
  • Python
  • Server
©2025 From Small to BIGGER | Built using WordPress and Responsive Blogily theme by Superb