附錄:如何判定 DNSAdmins 帳戶 SID

適用於: Operations Manager 2007

下列範例指令碼會報告 DNSAdmins 帳戶的 SID:

藉由輸入 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

社群新增項目

顯示: