Set DomainObj = GetObject("WinNT://" & DomainString) tmp= DomainObj.MinPasswordLength 'verify this is a valid domain if err.number<>0 then write "<Font Color=Red> There was an error connecting to " & domainname & "</Font>!<br>" set ie=Nothing wscript.quit end if
DomainObj.Filter = Array("group") strInfo="<Table border=0 cellpadding=5><TR><TD><B><Font Size=3>组名</Font></B></TD><TD><B><Font Size=3>描述 </Font></B></TD></TR>" ie.StatusText="正在收集信息,请稍候......" For Each GroupObj In DomainObj If GroupObj.Class = "Group" Then strInfo=strInfo&"<TR><TD><B><Font Size=3>"&GroupObj.Name&"</Font></B></TD><TD><B><Font Size=3>"&GroupObj.Description&"</Font></B></TD></TR>" End If Next set DomainObj = Nothing set GroupObj = Nothing strInfo=strInfo & "</Table>" write strInfo & "<br>"
write "<font size=1><I>" & Now & "</I></Font>"
set ie=Nothing set doc=Nothing wscript.quit
'****************** sub write(str) doc.body.insertAdjacentHTML "beforeend", str end sub