How to resolve DNS name in MikroTik RouterOS scripting/command line

In order to resolve a DNS name use

resolve <domain name>

Use

:put [resolve <domain name>]

to resolve a domain name and print the IP address.

Example

:put [resolve techoverflow.net]

Output:

[admin@CoreSwitch01] > :put [resolve techoverflow.net]
172.67.166.211