troubleshooting Question

psexec giving Access Is Denied error when attempting to run a command on remote system

Avatar of wally_davis
wally_davisFlag for United States of America asked on
Microsoft DOS
23 Comments3 Solutions6672 ViewsLast Modified:
I am PsExecing to a remote computer to launch a batch file named remote_fd_info.cmd.
In that command it runs the following: fcinfo | find "PortWWN" >> test.txt file.
I'm passing the credentials I need on the remote system and therefore I shouldn't get the Access Is Denied error/Exit Error Code 255. I tried the PsExec -s -i switches but got an exit error code = 1.
Can anyone tell me what I'm missing?
Thanks Experts,

For /f %%s In (%fcinfo_dir%\servers.txt) Do (%ps_exec% \\%%s  -u %user% -p %pswd% c:\progra~1\fcinfo\remote_fc_info.cmd)
"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 3 Answers and 23 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 23 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros