I am trying to print out just the host names in DHCP-Server leases but cannot get this to work…
What am i not doing corectly?
/ip dhcp-server lease print where host-name=“WLR*”
Thanks
Bill
I am trying to print out just the host names in DHCP-Server leases but cannot get this to work…
What am i not doing corectly?
/ip dhcp-server lease print where host-name=“WLR*”
Thanks
Bill
Not sure what you like as an output. When you search for WLR as a host-name, why do you like to just output the host-name, it will only be WLR?
Correct way in script is to use find and get
:put [/ip dhcp-server lease get [find where host-name="WLR"] host-name]
or expanded
{
local id [/ip dhcp-server lease find where host-name="WLR"]
local name [/ip dhcp-server lease get $id host-name]
:put $name
}