There is no PSExec task. What I was referring to was running PSExec.exe on some local machine on the network, and pass it the FQDN/IP of the Azure VM to connect to and execute the command against. Refer to
https://docs.microsoft.com/en-us/sysinternals/downloads/psexec. It's an alternative to running commands on a computer/VM remotely.
I don't know of way to tokenize credentials.
If you can't use AutoIT and Selenium doesn't have native support to handle the Windows/HTTP authentication popup, then you will most likely have to resort to headless route, or passing the login in the URL.
If exposing login is a security, you should ensure the account used is very limited access for what it can do. In QA test automation, those accounts are very basic, so it shouldn't matter if as much if it was indeed hacked later on, and you can then just disable the account and make new one, or change the password, etc.