Computer Performance, Windows 2003, Logon Scripts

Google

WebSearch Site

 Home
Subscribe to Newsletter
WSH - Home
WSH - Simple Script
WSH - Create User
WSH - Bulk Import
WSH - Create Group
WSH - Create Contact
WSH - FSO Create File
WSH - List Members
WSH - Error Messages
VBScript Home
Logon Script Home
CSVDE & LDIFDE
 LDAP Attributes

 

 More Sections
 Guy's eBooks
 Windows 2003
 Exchange 2003 (New)
 Performance Monitor

 

 Windows 2000 AD
 Exchange 2000
 SQL Server 2000
 SharePoint Portal

 

 Litmus Tests
 Registry Hacks
 Problem Solving
 On-line advice
 Free ebooks

 

Contact Guy
About Us
Online Jobs at CP
Guy's eBooks

 

 

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

˚

 

 


See Also

 *


Google

Webcomputerperformance.co.uk

GFi Events Manager

Guy Recommends: GFi EventsManager

Here is a solution to monitor, manage and archive thousands of events that are generated by devices across your entire network.  Get your free evaluation copy of GFI EventsManager.

 

Home Copyright © 1999-2008 Computer Performance LTD All rights reserved

Please report a broken link, or an error.