+ Post New Thread
Results 1 to 8 of 8
Scripts Thread, VB Script Auto Shutdown XP PC's placed in Computers Container in Coding and Web Development; Hi, I'm looking for a script that does the following: We are maintaining a Windows 2003 environment with xp sp3 ...
  1. #1
    Kogelkopper's Avatar
    Join Date
    Nov 2008
    Posts
    27
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0

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

    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

  2. #2

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    182
    Shutdownertron, as butchered by yours truly.

  3. #3
    monkeyx's Avatar
    Join Date
    Nov 2006
    Posts
    365
    Thank Post
    8
    Thanked 52 Times in 41 Posts
    Rep Power
    26
    I wrote a VBScript that does what you are asking for and no need for any pesky client installs, and it is open source so no pesky closed source binaries.

    See Shutdown Script
    and ShutDown Script ?(SlimmerIT)? for full documentation.

  4. #4
    Kogelkopper's Avatar
    Join Date
    Nov 2008
    Posts
    27
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0
    @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 ).
    I'm looking for an easier way!

  5. #5
    Kogelkopper's Avatar
    Join Date
    Nov 2008
    Posts
    27
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0
    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

  6. #6
    monkeyx's Avatar
    Join Date
    Nov 2006
    Posts
    365
    Thank Post
    8
    Thanked 52 Times in 41 Posts
    Rep Power
    26
    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

  7. #7

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    182
    Quote Originally Posted by Kogelkopper View Post
    I already looked in to that tool, but you need to install extra software on the client side (times 900 ).
    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.)


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

  8. #8

    Join Date
    Jul 2009
    Location
    Shropshire
    Posts
    49
    Thank Post
    2
    Thanked 4 Times in 3 Posts
    Rep Power
    12
    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.



SHARE:
+ Post New Thread

Similar Threads

  1. Shutdown Script
    By monkeyx in forum Scripts
    Replies: 37
    Last Post: 29th April 2009, 02:03 PM
  2. Script to shutdown computers.
    By FN-GM in forum Scripts
    Replies: 18
    Last Post: 17th November 2008, 04:43 PM
  3. Shutdown Script
    By andrew_91090 in forum Scripts
    Replies: 3
    Last Post: 1st October 2008, 03:03 PM
  4. Replies: 15
    Last Post: 8th September 2008, 02:43 PM
  5. UPS auto shutdown
    By adamyoung in forum How do you do....it?
    Replies: 14
    Last Post: 4th July 2007, 10:50 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •