I need a script for SSID passkey using serial No.

Hi, I am new to Mikrotik and scripting. Is anyone able to supply a script that uses the serial number of the router as the SSID pre shared key for WPA2 PSK.
I’ve had a look on this forum for this, but haven’t been able to find exactly what I’m after. Thanks in advance.

That is not to complicated to make:

/interface wireless security-profiles
add authentication-types=wpa2-psk eap-methods="" management-protection=allowed mode=dynamic-keys name=\
    Test supplicant-identity="" wpa2-pre-shared-key=[/system routerboard get serial-number]

This will create a security profile with name: Test and serial number as SSID

That’s great - thanks very much Jotne. I’m very new to scripting and just learning the ropes. Much appreciated

Hi, I have kindly been supplied a script for creating a security profile with name of Test and the pre-shared key as the serial number of the router board.
However, in addition to this - and as I look into this some more - can anyone possibly supply a script that creates a new virtual AP, with the SSID of User and using the Security profile named as Test - created in the below script. Thanks in advance.

/interface wireless security-profiles
add authentication-types=wpa2-psk eap-methods=“” management-protection=allowed mode=dynamic-keys name=
Test supplicant-identity=“” wpa2-pre-shared-key=[/system routerboard get serial-number]