+ Post New Thread
Results 1 to 8 of 8
Scripts Thread, VBS script for prestaging computers anyone? in Coding and Web Development; Im trying to write a VB script to read information from a csv then create computer accounts that are prestaged. ...
  1. #1
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,999
    Thank Post
    120
    Thanked 280 Times in 258 Posts
    Rep Power
    106

    VBS script for prestaging computers anyone?

    Im trying to write a VB script to read information from a csv then create computer accounts that are prestaged.

    I can do virtually all of it apart from adding the GUID part.
    As far as I can tell the value is "netbootGUID" but when I query AD with ADSI it returns an empty string for an account already setup and when I try wrinting a value it doesnt like it.
    I can get the GUID using a WMI script but thats pretty useless for me in this situation.

    I found an example in VB that is very similar but I think I may have to do something with the GUID value before displaying/writing it like convert it.
    Anyone done this ? Ideas?

    Cheers

    Chris

  2. #2
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: VBS script for prestaging computers anyone?

    Have you looked at this?

  3. #3
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: VBS script for prestaging computers anyone?

    ChrisH,

    Just a thought, but if you are prestaging the computers to get them in the correct OUs prior to installation by RIS, then you might like to have a look at the way Microsoft has used scripts in Learning Network Manager. When a PC is RIS built on this system, it is automatically moved to the correct OU.

    You might be able to get away with a SIF file for each OU...

  4. #4
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: VBS script for prestaging computers anyone?

    Further investigation reveals a MOVE.VBS which is executed by CMDLINES.TXT. The script interrogates C:\Windows\system32\$winnt$.inf, looking for a ProfileName entry. The ProfileName refers to an OU. The script then looks like it looks up the computer account in AD and moves it to the appropriate OU.

  5. #5
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,999
    Thank Post
    120
    Thanked 280 Times in 258 Posts
    Rep Power
    106

    Re: VBS script for prestaging computers anyone?

    Quote Originally Posted by ajbritton
    Have you looked at this?
    Thats the one I had looked at but involved some messing with a DLL which I would have to look into further.

    The LNM stuff looks interesting, I shall maybe have a look at that stuff as well.

    I prestage the computers for the correct OU placement and naming currently.

  6. #6

    Join Date
    May 2006
    Location
    West Bromwich
    Posts
    2,190
    Thank Post
    299
    Thanked 215 Times in 185 Posts
    Rep Power
    56

    Re: VBS script for prestaging computers anyone?

    Did you finish the script to do this?

    I am looking for a pre-staging script that I can run to set our computers in their OUs to make all the machines managed.

    I can do it maunally one at a time through the properties but that could take some time.

  7. #7
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,999
    Thank Post
    120
    Thanked 280 Times in 258 Posts
    Rep Power
    106

    Re: VBS script for prestaging computers anyone?

    No sorry I didnt as usual I got distracted . I have found that enabling custom setup as suggested and typing in the names as you go is good for the first run on the machine. You can also set the default OU in the RIS server properties.

  8. #8

    Join Date
    May 2006
    Location
    West Bromwich
    Posts
    2,190
    Thank Post
    299
    Thanked 215 Times in 185 Posts
    Rep Power
    56

    Re: VBS script for prestaging computers anyone?

    Lol. Same here. When ever i want to or need to do something i end up doing something else just before i finish it. Whats this now project number 1,230,128 ???

SHARE:
+ Post New Thread

Similar Threads

  1. A2Z Computers
    By dezt in forum Bad Experiences
    Replies: 16
    Last Post: 9th September 2008, 02:07 PM
  2. WDS and Prestaging
    By Arcolite in forum Windows
    Replies: 0
    Last Post: 5th September 2007, 03:21 PM
  3. Logon script & Printer script question.
    By Galway in forum Windows
    Replies: 3
    Last Post: 29th August 2007, 11:00 AM
  4. Prestaging...Should I or shouldn't I?
    By mrforgetful in forum Wireless Networks
    Replies: 20
    Last Post: 17th May 2006, 10:14 PM
  5. Script to shut down computers in a certain OU
    By tosca925 in forum Scripts
    Replies: 11
    Last Post: 25th September 2005, 09:23 PM

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
  •