Bulk change mikrotik password

Hi,
Is there way to make script which will bulk change mikrotik password?
I have 50 devices on which we need to change password from time to time, I have ip list of all mikrotik
Is there way to automate this process?

Upload an rsc file with the auto option?

Or something with a script on the server which invokes this;
https://wiki.mikrotik.com/wiki/Manual:System/SSH_client#Executing_remote_commands