Can you help me with this script?

Hi, do I need if someone has a script to list and export blocked mac-addres from leases dhcp mikrotik?

Hello, We don’t know what you need and if you need or not.

if someone has a script

SomeOne have a script, not one, not two.

to list and export blocked mac-addres from leases dhcp mikrotik?

Re write this question.
“to list” maybe to print to file like by: ip dhcp-server lease print file=list.txt
“export blocked mac-addres” Where dhcp-server block a mac-address? He can assign IP details to client or not.

Be more specific.

EDIT:

Sorry, for writing in Spanish, but I don’t speak English and the translators are not good.
I have configured the mikrotik, dhcp-server, with about 500 users. with static ip all.
There are many that I have blocked, in the configuration of the leases, where is the option “block Access”
well I want to export the leases to a TXT, but only with those users that I have blocked. If someone can happen to me how to do it

Thank you

Perdon, por escribir en español, pero no hablo ingles y los traductores no son buenos.
Tengo configurado en el mikrotik , dhcp-server, con alrrededor de 500 usuarios. con ip estaticas todos.
Hay muchos que los tengo bloqueados, en la configuracion del leases, donde esta la opcion " block Access"
bueno quiero exportar el leases a un TXT , pero solamente con esos usuarios que tengo bloqueados. Si alguien me puede pasar como hacerlo

gracias

/ip dhcp-server lease print file=leases where block-access=yes

To get only the mac of the blocked users:

{
foreach logline in=[/ip dhcp-server lease find where block-access=yes] do={
  :put [/ip dhcp-server lease get $logline mac-address]
}
}

Thank you, everyone, good solution.