Jump to content

VB Script Auto Shutdown XP PC's placed in Computers Container


Recommended Posts

Posted

Hi,

 

I'm looking for a script that does the following:

 

We are maintaining a Windows 2003 environment with xp sp3 clients (about 900 PC's)

By default pc's are placed in the Computers Container in AD, when they are placed in the domain.

I'm looking for a script that, based on computername, gives a shutdown command to the pc's at a specific time, that are in that container.

The computers that are used by the students have a name that starts with CL. So i'm looking for a way to filter out the students pc's, so that the teachers pc's can keep working.

 

Can somebody help me with this, i'm a complete noob with VB scripts.

 

Thanx in advance,

 

regards,

 

Kogelkopper

Posted

@Powdarrmonkey

 

Thanks for the quick response!

I already looked in to that tool, but you need to install extra software on the client side (times 900 :shocked:).

I'm looking for an easier way!

Posted

Hi MonkeyX,

 

I'm taking a look at the script, but when i fill in the domain and container, i get an error in VBSedit (line28):

 

strOU = "ou=Computers"

strDomain = "test.local"

 

The error is in the following line:

 

set objParent = GetObject("LDAP://" & strOU & "," & objRootDSE.Get("defaultNamingContext"))

 

there is no such object on the server........

 

Need help please.

 

Sorry for my noobieness

Guest monkeyx
Posted

I think the default computers is a container ie CN not an OU?

 

If you create a small test OU and put some PCs in does it work?

 

It maybe that you can cn=Computers as well?

 

Are you trying to run against the default computers container?

 

I have never tried to run against this so let me know if the abovbe helps.

 

Tim

Posted

I already looked in to that tool, but you need to install extra software on the client side (times 900 :shocked:).

I'm looking for an easier way!

 

Group Policy deployment - set and forget. (Not that I don't think a vbscript would do just as good a job, but there does seem to be some myths about the evils of client-side services being perpetuated recently.)

 

 

On the subject of sources, I'm limited by a license restriction from the original codebase, which is why it's still closed.

  • 3 weeks later...
Posted

I use Task scheduler in XP to run Shutdowns on the student machines at night, I have 2 ways to give the task files to the student machines LanSchool or Ghost Console Client, think RM provide something similar to LanSchool but don't know if it has a file transfer option, its really handy.

 

How To Schedule Tasks in Windows XP

 

the task sheduler in vista is even better allowing conditions.

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



×
×
  • Create New...