IT Security

Deep Audit: Listing Nested Active Directory Group Members via VBScript | Lazy Admin Blog

Posted on Updated on

Have you ever looked at a “Domain Admins” group and thought it looked suspiciously small? The culprit is usually nesting. Standard AD queries often fail to “recurse,” meaning they show you the subgroup but not the people inside it.

This script, ListGroupMembers_IncludingNested.vbs, uses a recursive function to dive into every sub-group and extract the actual users, ensuring your security audits are 100% accurate.

The Script: How it Works

The script utilizes a Dictionary Object to keep track of groups it has already scanned. This is a critical “Lazy Admin” safety feature—it prevents the script from getting stuck in an infinite loop if two groups are members of each other.

Usage Instructions

  1. Copy the code below into Notepad.
  2. Edit the StrGroupName variable to match your target group.
  3. Save the file as ListGroupMembers.vbs.
  4. Run it from the command prompt using cscript ListGroupMembers.vbs.
VBScript
' -- Save as ListGroupMembers_IncludingNested.vbs
Option Explicit
Dim ObjRootDSE, ObjConn, ObjRS, ObjCustom
Dim StrDomainName, StrGroupName, StrSQL, StrGroupDN, StrEmptySpace
Set ObjRootDSE = GetObject("LDAP://RootDSE")
StrDomainName = Trim(ObjRootDSE.Get("DefaultNamingContext"))
' -- Edit the line below with your Group Name
StrGroupName = "YourGroupNameHere"
StrSQL = "Select ADsPath From 'LDAP://" & StrDomainName & "' Where ObjectCategory = 'Group' AND Name = '" & StrGroupName & "'"
Set ObjConn = CreateObject("ADODB.Connection")
ObjConn.Provider = "ADsDSOObject": ObjConn.Open "Active Directory Provider"
Set ObjRS = ObjConn.Execute(StrSQL)
If ObjRS.EOF Then
WScript.Echo "Group not found: " & StrGroupName
Else
StrGroupDN = Trim(ObjRS.Fields("ADsPath").Value)
Set ObjCustom = CreateObject("Scripting.Dictionary")
GetAllNestedMembers StrGroupDN, " ", ObjCustom
End If

Why VBScript in 2026?

While PowerShell is the modern standard, many legacy environments and automated scheduled tasks still rely on VBScript because it requires zero execution policy changes and runs natively on every Windows machine since Server 2000. It is the “Old Reliable” of the AD world.

Key Features of this Script

  • Recursive Discovery: It doesn’t just stop at the first layer.
  • Class Identification: Clearly marks if a member is a User, Computer, or another Group.
  • Loop Protection: Uses the Scripting.Dictionary to escape circular nesting traps.

#ActiveDirectory #WindowsServer #CyberSecurity #SysAdmin #ITAudit #VBScript #Automation #LazyAdmin #TechArchive

The Master List: VMware ESXi Release and Build Number History (Updated 2026) | Lazy Admin Blog

Posted on Updated on

Is your host up to date? Checking the “About” section in your vSphere Client is step one, but cross-referencing that number against this list is how you confirm if you’re on a General Availability (GA) release, an Update, or an Express Patch.

vSphere ESXi 9.0 (Latest)

The new generation of the hypervisor, optimized for AI workloads and DPUs.

NameVersionRelease DateBuild Number
VMware ESXi 9.0.29.0.22026-01-2025148080
VMware ESXi 9.0.19.0.12025-09-2924957450
VMware ESXi 9.0 GA9.0 GA2025-06-1724755225

vSphere ESXi 8.0

The enterprise workhorse for 2024-2026.

NameVersionRelease DateBuild Number
VMware ESXi 8.0 Update 38.0 U32024-06-2524022510
VMware ESXi 8.0 Update 28.0 U22023-09-2122380479
VMware ESXi 8.0 Update 18.0 U12023-04-1821495797
VMware ESXi 8.0 GA8.0 GA2022-10-1120513097

vSphere ESXi 7.0

Note: This version introduced the new Lifecycle Manager (vLCM).

NameVersionRelease DateBuild Number
VMware ESXi 7.0 Update 3w7.0 U3w2025-09-2924927030
VMware ESXi 7.0 Update 37.0 U32021-10-0518644231
VMware ESXi 7.0 GA7.0 GA2020-04-0215843807

vSphere ESXi 6.x Legacy (Archive)

NameVersionRelease DateBuild Number
VMware ESXi 6.7 Update 36.7 U32019-08-2014320388
VMware ESXi 6.5 Update 36.5 U32019-07-0213932383
VMware ESXi 6.0 Update 1a6.0 U1a2015-10-063073146
VMware ESXi 6.0 GA6.0 GA2015-03-122494585

How to Verify Your Build Number

If you aren’t at your desk and only have SSH access to the host, you can find your build number instantly with this command:

vmware -v

Example Output:

VMware ESXi 8.0.0 build-20513097

Lazy Admin Tip 💡

Always remember the vCenter Interoperability Rule: Your vCenter Server must always be at a build version equal to or higher than your ESXi hosts. If you patch your hosts to vSphere 9.0 while vCenter is still on 8.0, your hosts will show as “Not Responding” or “Disconnected.”

#VMware #vSphere9 #ESXi #SysAdmin #Virtualization #PatchManagement #DataCenter #LazyAdmin #BuildNumbers #ITOperations