Jump to content

Remote Shutdown


eperezjr

Recommended Posts

Hey guys,

At my work, we have about 250 units that boot WinPE many times a day. At the end of the day or just during certain periods, I'd like to be able to shutdown all or just some PCs through a custom application I'm making.

So far, I'm having no luck with the shutdown command and was hoping I could get some advice from everyone here. At first, I couldn't even ping the PCs. I then found out that I needed to turn off the firewall in order to do so. Doing that allows me to ping each PC just fine, but when I send the shutdown command, either by PC name or IP, it just returns a bunch of lines.

Just for testing, I'm only doing this:

shutdown //computerName

or

shutdown //0.0.0.0

Link to comment
Share on other sites


The shutdown command used from another computer has requirements:

- Server service should be started on the target and not filtered.

- You need to have the shutdown right on the target computer.

In PE the server service might not be even installed.

And for the credentials, you're way off as each PE is running with the system account and without other account (by default).

You should first check if you are able to connect to the remote PE with a command line "net use".

Another way of doing things properly would be creating a service on the PE and send it the custom command when you want or you might want to do this the other way around (a service on the PE could check regularly a network location to know if it need to shutdown).

Link to comment
Share on other sites

The shutdown command used from another computer has requirements:

- Server service should be started on the target and not filtered.

- You need to have the shutdown right on the target computer.

In PE the server service might not be even installed.

And for the credentials, you're way off as each PE is running with the system account and without other account (by default).

You should first check if you are able to connect to the remote PE with a command line "net use".

Another way of doing things properly would be creating a service on the PE and send it the custom command when you want or you might want to do this the other way around (a service on the PE could check regularly a network location to know if it need to shutdown).

allen2,

Thanks a lot for the suggestion. It's helped a whole lot.

So, I decided to do two different things. First, I setup static IPs for each desktop. Which was a pain, but it allows me to ping each one and I'll always know which PC it is. Second, I'm going to setup a background script to check for a file on the server every "x" amount of seconds. If the file, which will most likely be the MAC address, is on the server, then call shutdown. In theory, I think this should work out perfectly well.

Thanks again for the help! :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...