shutdown and restart of network computers

Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
namich2007
Posts: 4
Joined: Tue Nov 09, 2010 8:45 am

shutdown and restart of network computers

Post by namich2007 » Tue Nov 09, 2010 9:24 am

Hey All,

I oversee a small testing facility which contains about 200 workstations running XP, VISTA and Win 7. All the systems are on the same lan / subnet and all have been configured with a static IP address.

Normally inbetween exams, there is usually a need to restart the PCs. I am looking for a step by step tutorial that will allow me to execute this task by either a batch file or a vb script.

i am new to this and would greatly appreciate some pointers.

User avatar
namich2007
Posts: 4
Joined: Tue Nov 09, 2010 8:45 am

shutdown and restart of network computers

Post by namich2007 » Tue Nov 09, 2010 9:24 am

Hey All,

I oversee a small testing facility which contains about 200 workstations running XP, VISTA and Win 7. All the systems are on the same lan / subnet and all have been configured with a static IP address.

Normally inbetween exams, there is usually a need to restart the PCs. I am looking for a step by step tutorial that will allow me to execute this task by either a batch file or a vb script.

i am new to this and would greatly appreciate some pointers.

User avatar
namich2007
Posts: 4
Joined: Tue Nov 09, 2010 8:45 am

shutdown and restart of network computers

Post by namich2007 » Wed Nov 10, 2010 2:35 am

When you say "allowing remote administration" are you saying that I have to have remote desktop enabled?

User avatar
namich2007
Posts: 4
Joined: Tue Nov 09, 2010 8:45 am

shutdown and restart of network computers

Post by namich2007 » Wed Nov 17, 2010 12:24 am

Jontyler, I have been doing some reading up on Powershell scripting to get a better understanding how this works. Coming from a Linux background, this is completely new to me.In the meantime I have compiled a text file of the workstations that require to be shut down and restarted. Also I was able to shut down and restart all my XP pro SP3 workstations by using the "shutdown.exe" command with the associated switches. So I am still investigating why I am not able to do the same on the Vista Home Basic and Win 7 Home Premium systems. I only hope the OS is not the contributing Factor.Questions:1: Is there a specific format as to the layout of the computer list file. Can that be by IP address, hostname or a combination of both.2: This power shell you mention, where is this application located.... Is this the same as a terminal prompt? How do I run this script you specified above?Thanks in advance

User avatar
jvierra
Posts: 13506
Joined: Tue May 22, 2007 9:57 am
Contact:

shutdown and restart of network computers

Post by jvierra » Wed Nov 17, 2010 1:19 am

Warning:

Shutdown and PoSHs Restart-COmputer use the exact same mechanisms to to mamange the computer and requires the same things as far as authenticationgoes.

Neither wil work through a firewall that is not set for remote management. WIndows Home editions do not open firewall ports for remote management. I also don't think you can install PowerSHell on all versions of Vista and Win 7 but am not sure on that.

When using authentication you will need to be sure all machines are in teh same workgroup or make adjustments to accomodate.

User avatar
jvierra
Posts: 13506
Joined: Tue May 22, 2007 9:57 am
Contact:

shutdown and restart of network computers

Post by jvierra » Fri Nov 19, 2010 12:34 am

1. Ping one computer by name.
2. type "restart-computer name" using the computer name used in ping.

Computer cannot be how edition.

Account name and password must be identical. Machines in same domain/workgroup.

If you still get access denied then WMI or DCOM are not working correctly.

I suggest you start using a machine you have just installed since many bits from third parties on home machines alter the DCOM settings. Troubleshooting this is very complex. Once you have a working machine you can compare its settings with the remaining machines.

You can also use wbemtest to diagnose the issue.

At a command prompt typ WBEMTEST and use it co connect to the remote machine. Once you can connect you will be able to use the other scritps. Right now ynu are not able to create a good connection.

Fairly frequesntly I have found that, in th e process of learning WIndows, many users will have been led byt various docs to alter settings in Windows which may also make DCOM or WMI stop working.

You may also have to alter some settings on Vista and Win7 to obtain a full admin session. (UAC)





Locked