When running a command as sudo in macOS, you can use this command to sudo. The command is running under the logged-in user. You can also choose to run on Swif admin user.
To run as sudo, you can run this command `echo '{PASSWORD}' | sudo -S ls`. The PASSWORD is the local user password.
For Windows command to run as administrator, please visit https://help.swif.ai/en/articles/9483755-run-command-script-as-administrator-windows.