correct remote server time using psexec or similar

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.
LVL 1
roy_battyDirectorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Matt MinorTechnical Systems AnalystCommented:
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_battyDirectorAuthor Commented:
Thanks for the advice
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server OS

From novice to tech pro — start learning today.