Hotspot Users
Bulk Change Hotspot User Profile — 6
Moves every hotspot user from one user profile to another (for example from ‘default’ to ‘2m’).
RouterOS 6
# EN: Current profile name | AR: اسم البروفايل الحالي
:local oldProfile "change here";
# EN: New profile name (must already exist) | AR: اسم البروفايل الجديد (يجب أن يكون موجوداً)
:local newProfile "change here";
# EN: Safety check | AR: حماية من عدم تعديل المتغيرات
:if ($oldProfile = "change here" || $newProfile = "change here") do={ :error "Edit the variables first" }
# EN: Loop over users in the old profile | AR: المرور على المستخدمين في البروفايل القديم
:foreach u in=[/ip hotspot user find where profile=$oldProfile] do={
# EN: Assign the new profile | AR: تعيين البروفايل الجديد
/ip hotspot user set $u profile=$newProfile
}