Appendix: How to Determine DNSAdmins Account SID

The following example script reports the SID of the DNSAdmins account:

Start the script from the command prompt by typing cscript DNSAdminsGroupSID.vbs

' DNSAdminsGroupSID.vbs

'

' Usage: cscript DNSAdminsGroupSID.vbs

'

' This sample script enumerates all groups using WMI and returns the SID of the DNSAdmins group of the local Security Accounts Manager (SAM) and the domain

'

' (C) 2008 Microsoft Corporation. All Rights Reserved

'

Dim objWMIService, colAccounts, objAccount

SetLocale("en-us")

Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")

Set colAccounts = objWMIService.ExecQuery("Select * From Win32_Group Where Description = 'DNS Administrators Group'")

For Each objAccount in colAccounts

wScript.echo objAccount.Caption & " = " & objAccount.SID

Next