I'm using a program called psExec to remotely connect to a machine and start an interactive program.
The machine I'm connecting to, does not have a password.
So if I run this:
psExec \\Computer_Name -u User -i -d calc.exe
It prompts me for a password:
Password:
I just hit enter(since the computer doesn't have a password), and it works.
I don't want to have to hit enter every time, because I am writing a script.
So I tried this:
psExec \\Computer_Name -u User -p -i -d calc.exe
and this:
psExec \\Computer_Name -u User -p"" -i -d calc.exe
and this:
psExec \\Computer_Name -u User -p'' -i -d calc.exe
and this:
psExec \\Computer_Name -u User -p "" -i -d calc.exe
and this:
psExec \\Computer_Name -u User -p '' -i -d calc.exe
but no matter what, specifying the p
flag results in a "Wrong Username or Password error."
How can I tell my script to either press enter automatically, or automate psExec to connect automatically without a password?
I'm in PowerShell if that is relevant.