[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2012-09-05
6
Medium Priority
?
642 Views
Last Modified: 2012-09-07
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.
0
Comment
Question by:Created
  • 3
  • 3
6 Comments
 
LVL 1

Accepted Solution

by:
nkruger earned 2000 total points
ID: 38370660
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
 

Author Comment

by:Created
ID: 38371016
I'll try your suggestion next chance, and FYI the remote computer is part of a domain.
0
 
LVL 1

Expert Comment

by:nkruger
ID: 38371862
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Created
ID: 38372928
Yes, "officepc\joe" is a local account in the local administrators group.
0
 

Author Comment

by:Created
ID: 38377386
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
 
LVL 1

Assisted Solution

by:nkruger
nkruger earned 2000 total points
ID: 38377399
The /netonly option causes Runas to use the credentials supplied as if they were a user on the remote machine.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question