I use PSEXEC to administer many embedded Windows systems (no KVM) that are not part of our domain. (Think of a thermostat or freezer.) They use their own user/password that does not exist in our domain or locally. I use "PSEXEC -u user -p password" to connect to them without a problem.
The IT group pointed out that the command line is logged (I assume process auditing in Windows Security Event Log) and so they see the user/password and don't like the security aspect of that, which is fine.
However, I can't figure out a way around that for my use.
Yes, if I don't specify the "-p password", it will prompt me for a password. However, I want to do this from the command line for many machines, so I don't want to continually retype the password.
I tried to ECHO the password and pipe it into PSEXEC, but that surprisingly didn't work. (I assume that PSEXEC flushes the input before prompting for a password.) Similarly, I put the password in a file and redirected it into PSEXEC and that similarly did not work.
I also tried to NET USE the remote \C$, \ADMIN$, and \IPC$ shares, thinking PSEXEC would not then need a user/password, but nope. It seems like the \ADMIN$ should have worked.
I understand that PSEXEC version 2.1 and up sends the password over the network encrypted. I verified it myself, so I'm satisfied with that aspect of it.
So does anyone know how I can use PSEXEC from a batch file to connect to a user/password on another machine without specifying the password on the command line?