correct remote server time using psexec or similar

roy_batty
roy_batty used Ask the Experts™
on
I have a server which I am unable to RDP to as I get an error about the time on the server being incorrect.

I am trying to use psexec to run "net time /set" on th remote server.

I run "psexec \\servername cmd"

followed by "net time /set"

I get an access denied. How to I specify a username and password in psexec.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2017
Commented:
the issue that the time issue is preventing the authentication of any user by any means so short of using of a local admin account you are out of luck and would need to use local access either via RDP or locally.
Matt MinorTechnical Systems Analyst
Commented:
The time on the server should be in sync with a domain controller. shouldn't need to update time manually.

However for future reference, PSEXEC can be passed credentials as follows, with the -u switch.

psexec \\servername -u domain\domainuser cmd
roy_battyDirector

Author

Commented:
Thanks for the advice

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial