Clint Boessen's Blog
Lots of Hints, Tips and Tricks for IT Professionals....
Tuesday, July 14, 2009
Scripting - List all user accounts in AD domain
This script lists all objects in the domain that are user objects.
Option Explicit
Dim oDomain, oObject
Set oDomain = GetObject("WinNT://domain.local")
For Each oObject in oDomain
If oObject.Class = "User" Then
WScript.Echo oObject.Name
End If
Next
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment