Erhm, there's two kinds of accounts - user and computer with different things in 'em of course - and then there's groups, that can contain accounts :). Shouldn't be a biggie to add a computer instead of user scriptwise.

Am I wrong?

 Code:
;accountname = computer or user
;groupname = name of group to add account to
$ldap = GetObject("LDAP://OU=SomeSubOU,OU=SomeOU,DC=SomeDomain,DC=SomeDomainExtention")
$ldap.Add("[accountname]","[groupname]")


Just 'translated' from vbs;
 Code:
$strDomain="Workgroup"
$strComp="jdoe"
$strGroupName ="Administrators"

$oDomain = GetObject("WinNT://" + $strDomain)
$oGroup = $oDomain.GetObject("Group", $strGroupName)
$oGroup.Add ("WinNT://" + $strDomain + "/" + $strComp)


Edited by Björn (2007-07-05 10:12 AM)
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!