Setting & Getting AD Properties during SCCM OSD Task sequence

This is a script I wrote over a year ago but have only just rediscovered, I can’t remember if it works / or if I ever used it in production. But hopefully will be of use to someone (assuming it works).

If anyone tries it please respond and let me know how worked / any issues you had.

Continue reading “Setting & Getting AD Properties during SCCM OSD Task sequence”

VBS: Get old computer accounts from AD

UPDATED 2011-02-10: Added support for 33000+ records. Thanks to Mike for finding the limitation and testing the solution. (Note for 33000 records script takes about 1.5hrs to run)

The VBScript loops through the AD and lists all of the computer accounts in a csv file.

The Excel Code does the same except places the data in a formated table in excel, note it is only tested with excel 2007.

The following properties are returned:

  • Hostname,
  • Password Last Set,
  • Day Count (since password was last set),
  • Recent (was this done within the days specified in the script),
  • Disabled?,
  • Top Level OU,
  • OU,
  • Distinguished Name

Continue reading “VBS: Get old computer accounts from AD”