Logon Scripts

Guy recommends :
Free SolarWinds
VM Console

Solarwinds VM Console Free Download

Find out which of your VMs are a waste of space and which VMs need more resources.


 

WSH - List members in Active Directory

Introduction - Listing the members of the Users container

This script enumerates all the Administrators in the Builin container.  If you like to learn by changing items in the code, well here is a challenge for you, adapt my script to list members of your OU.

WSH Topics

 ♦

Instructions

  1. Copy the entire Script in the green box below.
  2. Paste it into notepad.exe.
  3. File (menu), Save as AdminList.vbs.   Note: This is where people go wrong, remember the .vbs extension.
  4. Double click AdminList.vbs

 

'Script to List all the Administrators in the Builtin container
'Script created by Guy Thomas
'Feel free to adapt names

Set objGroup = GetObject _
("LDAP://cn=Administrators, cn=Builtin, dc=CP,dc=com")
For each objMember in objGroup.Members
Wscript.Echo objMember.Name
Next

Challenge

  1. Alter the cn=Administrators to the name of another group.  Note it must be the name of a real group.
  2. Alter the cn=Builtin to OU=yourou.  Note you use OU here not cn.  Its an organization unit not a container.

If you get an error message - check this page

°

Guy Recommends:  SolarWinds' Free Bulk Import ToolFree Download Bulk Import Tool

Import users from a spreadsheet.  Just provide a list of the users with their fields in the top row, and save as .csv file.  Then launch this FREE utility and match your fields with AD's attributes, click and import the users.  Optionally, you can provide the name of the OU where the new accounts will be born.

There are also two bonus tools in the free download, and all 3 have been approved by Microsoft:

  1. Bulk-import new users into Active Directory.
  2. Seek and zap unwanted user accounts.
  3. Find inactive computers.

Download your FREE bulk import tool.


See Also

 *


Custom Search

Site Home

Guy Recommends: WMI Monitor and It's Free!Solarwinds WMI Monitor

Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft operating systems.

Fortunately, SolarWinds have created the Free WMI Monitor so that you can actually see and understand these gems of performance information.  Take the guess work out of which WMI counters to use for applications like Microsoft Active Directory, SQL or Exchange Server.

Download your free copy of WMI Monitor

Author: Guy Thomas Copyright © 1999-2012 Computer Performance LTD All rights reserved.

Please report a broken link, or an error to: