No joy with the ADSI.

But this may work for you. It is not as clean as I would like but...
Code:
Function InstallSMS()
; Create global groups in each OU using the naming format "OUname_NO_SMS"
; Add computers to these groups that do not get SMS

Dim $Install_SMS
$Install_SMS = 1

$oComputer = GetObject("WinNT://domain/" + @wksta + "$" + ",user")
$GrpArray = $oComputer.Groups
For Each $grp In $GrpArray
if Right($grp,6) = "NO_SMS"
$Install_SMS = 0
endif
Next

If $Install_SMS
;do something...
Endif
Endfunction



Fixed blatant screwup in object names.


Edited by Howard Bullock (2005-05-05 04:02 PM)
_________________________
Home page: http://www.kixhelp.com/hb/