The WinNT-name for a computer ends with a dollar-sign as statet by Les
(Pre Windows 200 logon Name)

If the pc and group exists, this will work

Code:

$pcname = "MyComputer"
$Group = "Mygroup"

$oPC = GetObject("WinNT://" + @Domain+ "/" + $pcname + "$$") ; Dollarsign appended to pcname

;If Exist add to group
If VarType($oPC) = 9
$oGroup = GetObject("WinNT://" + @Domain + "/" + $Group + ",group")
If VarType($oGroup) = 9
$oGroup.Add($oPC.adspath)
EndIf
EndIf



-Erik