Things are slow today !

I "ripped" this from a WSH script I found on the Internet somewhere (sorry). I like the look & feel of this puppy !


code:

break on


$title = "KiXtart/ADSI"
$crlf = chr(10) + chr(13)


$message = "GroupInfo.Kix: " + $crlf + $crlf +
"Example of getting domain groups using KiX/ADSI" + $crlf +
"This may take a moment depending on the size " + $crlf +
"and speed of your network."


$rs = messagebox ( "$message", "$title", 0 )


$message = "User:" + $crlf + "@ldomain\@userid" + $crlf + $crlf + "Groups:"


$user = olegetobject ( 0, "WinNT://@ldomain/@userid" )
$groups = val ( "&" + olecallfunc ( $user, "groups" ) )


$enum = oleenumobject ( $groups )


while @error = 0


$group = oleenumobject ( $groups, $enum )


if @error = 0


$message = $message + $crlf + olegetproperty ( $group, "name" )


endif


loop


$rs = messagebox ( "$message", "$title", 0 )


exit


Shawn.