Windows 7 Remote Shutdown Script works locally but not remotely on a Windows 7 workstation joined to a workgroup

If I run the following script from a command prompt on the local machine it works perfectly.

runas /user:officepc\joe "shutdown /s /m \\officepc /t 120"

However when I run it from another machine on the network, I receive the following error message: RUNAS ERROR: Unable to run - shutdown /s /m \\officepc /t /120
1326: Logon failure: unknown user name or bad password.

Since it works when I'm on the machine locally, I know it's not a problem with the user name and password per se. I have also tried turning off the firewall, but to no avail. I also enabled the Remote Registry service.
CreatedAsked:
Who is Participating?
 
nkrugerCommented:
I would try runas /netonly in this instance I believe, such as runas /netonly /user:officepc\joe "shutdown /s /m \\officepc /t 120"

Is the remote computer part of a domain?
0
 
CreatedAuthor Commented:
I'll try your suggestion next chance, and FYI the remote computer is part of a domain.
0
 
nkrugerCommented:
Does the "officepc\joe" account (which sounds like it's a local account on the PC, not a domain user) have administrative privileges to the pc in question?
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
CreatedAuthor Commented:
Yes, "officepc\joe" is a local account in the local administrators group.
0
 
CreatedAuthor Commented:
nkruger,

I was able to test the command that you suggested and it worked!

runas /netonly /user:officepc\joe "shutdown /s /m \\officepc /t 120"

Okay, now that it works what does "/netonly" actually do?
0
 
nkrugerCommented:
The /netonly option causes Runas to use the credentials supplied as if they were a user on the remote machine.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.