Get the VBS version of the user group list script on the server
Source: Internet
Author: User
' Groups.vbs
' Time: 2001.2.5
' Version: 1.0
' Author: The Sea Laughs
' Other: This script was written by the original author in early 2000, the sea after use is not very useful.
' It turns out to be a WSH method, often to display multiple screens and not to save results
I changed it to IE display method, it is easier to use.:)
On Error Resume Next
' Dim Wshell
Dim Ie,doc
Set ie = CreateObject ("Internetexplorer.application")
Ie.navigate "About:blank"
Ie.visible = True
Set doc = Ie.document
CRLF=CHR (+CHR) (10)
Domainstring =inputbox ("Please enter a domain name:")
MsgBox "Domain name is:" &domainstring
Write "<table border=1 cellpadding=4 width=90% bgcolor=ffffcc><tr align=center><td valign=top> <B ><font
List of all groups in Size=5 color=blue> "&ucase (domainstring) &" </b></font></td></tr></ Table> "
Doc.title=ucase (domainstring) & "-Group"
Set domainobj = GetObject ("winnt://" & domainstring)
tmp= domainobj.minpasswordlength ' Verify ' is a valid domain
If Err.number<>0 Then
Write "<font color=red> There was a 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> Group name </font></ B></td><td><b><font size=3> Description
</Font></B></TD></TR> "
Ie. statustext= "Collecting information, please wait ..."
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
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service