New Script – Group Name and Member Count
Posted by Scott Horsfield - 30/04/08 at 09:04:09 amI’ve been reading a thread on the activedir.org mail list over the past few days that talked about finding groups with no members using ADFIND. I’ve posted a new script that will do this with VBScript by listing all groups and their member count. ADFIND can do the same thing, but with VBScript I’ve found it’s easier to tie one task to another and perform modifications on groups if necessary. (ie: find all groups with 0 members and move them to an OU for later removal, or change their description to make them more identifiable)
Also I highly recommend signing up for the activedir.org mail list. It’s full of helpful people and great information!
Function: Parse Object Name from Path
Posted by Scott Horsfield - 15/04/08 at 12:04:37 pmThe following function will allow you to pull an object name from a path:
Example: LDAP:\\CN=JSMITH, OU=USERS, DC=DOMAIN, DC=COM
The function will return JSMITH. This may not seem very useful at first, and I created it only after I was unable to return results of anthing but the path. This is also useful in scripts that need both the path and the object name and can be used to remove the need for multiple queries. Function posted after the break.
Continue reading Function: Parse Object Name from Path…
New Script – Query Group Membership on Remote Computer
Posted by Scott Horsfield - 15/04/08 at 12:04:45 pmIs it just me or does it seem like this blog is turning into a blog about scripting.? I promise that is not the case but it seems that I have a lot of scripts that I’ve collected over the years and feel that may be of some use to those learning WMI and VBScript. The following script will display a list of members in a specified group on a specified remote computer. Check out the syntax and a link to the script after the break.
Continue reading New Script – Query Group Membership on Remote Computer…
New Script – Scheduled Task Information
Posted by Scott Horsfield - 18/03/08 at 10:03:26 amAs part of a recent project I had to create the following script to parse out information about scheduled tasks. It’s pretty simple and displays all of the available properties for all scheduled tasks on all server within the domain. Enjoy.
New Script – Add Users to Local Group on Remote Computer
Posted by Scott Horsfield - 10/12/07 at 02:12:08 pmManaging membership of local groups on servers and remote machines can become a nightmare if you don’t have a proper plan in place. In the near future I will write about restricting group membership via GPO. However, many older networks have yet to institute this type of organization, and have to rely on other methods for managing local group membership.
I’ve posted a new script that will add a user (or list of users) to a local group on a computer (or list of computers). I hope that you find this of some use, and I have added some small error detection and output formatting to make running against a large server list easier. I suggest redirecting the output to a .CSV file for easy management. You can add either a single user or a group of users. Make sure to specify your domain name in the strDomain variable.
You can find the script here and in our Scripting section. Follow the break for syntax.
Continue reading New Script – Add Users to Local Group on Remote Computer…
New Scripts – Display List of Users and List of Servers
Posted by Scott Horsfield - 07/12/07 at 04:12:47 pmI’m often asked to write scripts to query information from Active Directory. Most of the time it’s for a simple list of servers or users. While this information is available through other command-line tools I like the flexibility of VBScript, and the ability to easily customize the format of the results that are returned. Here are two simple scripts that query users and servers within the domain. You can easily customize these scripts to run tasks against each computer/user object or you can customize the results that are returned for simple reports. These scripts are also available in our script reference section and I will post PowerShell examples soon. Enjoy and have a great weekend!
VBScript to Return a List of Users
VBScript to Return a List of Servers
New Script – Service Account Logon Information
Posted by Scott Horsfield - 05/12/07 at 10:12:09 amUnless you’re fortunate enough to have implemented a password management utility, planning service account password changes and migrations can be a daunting task. I’ve posted a new script that I’ve used in the past to query the service account logon information for all servers in Active Directory. You can customize the search filter and WMI properties that are queried to meet your needs.
You can find the new script here.
Powered by WordPress with [GimpStyle]
Entries and comments feeds.