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 - Create Groups

Introduction - Creating Global Groups with WSH

The purpose of this script is to create a new Global group.  My example uses an OU called BulkImport, a domain called CP.com and a Global group called Managers.  Do change these variables to names in your Active Directory.

WSH Topics

 ♦

Create the Global Group

To prevent the Global group being created in the Users container we specify the OU.  This is taken care of by this line:
Set oOU=oDomain.Create("organizationalUnit", "ou=BulkImport")

Note: The syntax is OU=BulkImport (Not CN=BulkImport or CN = Users)

Note: The script does not create the OU BulkImport, either make it manually or change the script to an OU that does exist.  (However there instructions in the WSH Create User if you want to create an OU.)

°

Set the Group Object

Note: You must change dc=CP to dc=xxxxxxx where xxxxxxx is your domain name.  Also check whether or not your domain has a com extension.  If it does not, and is just a plain domain, remove the element dc=com

Instructions

  1. Copy the entire Script in the green box below.
  2. Paste it into notepad.exe.
  3. File (menu), Save as Managers.vbs.   Note: This is where people go wrong, remember the .vbs extension.
  4. Double click Managers.vbs
  5. Go to Active Directory Users and Computers OU BulkImport, Press F5.

 

'Script to Create a Global Group in an OU called BulkImport
'Script created by Guy Thomas
'Feel free to adapt names
 

Set objOU = GetObject("LDAP://OU=BulkImport, dc=CP, dc=com")
Set objGroup = objOU.Create("Group", "CN=Managers")

objGroup.Put "sAMAccountName", "Managers"

objGroup.SetInfo

WScript.Echo "Congratulations, Global Group Managers created & Chr(13) Remember to Press F5"


 

Guy Recommends: Permissions Analyzer - Free Active Directory ToolFree Permissions Monitor

I like the Permissions Monitor because it enables me to see quickly WHO has permissions to do WHAT.  When you launch this tool it analyzes a users effective NTFS permissions for a specific file or folder, takes into account network share access, then displays the results in a nifty desktop dashboard!

Think of all the frustration that this free utility saves when you are troubleshooting authorization problems for users access to a resource.

Download Permissions Analyser - Free Active Directory Tool

 

If you get an error message - check this page


See Also

 *


Custom Search

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

 

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

Please report a broken link, or an error.