When You are using the WinNT object the name of a computer has an added $-sign in its name (WinNT name).

So Your line in the starting post:
$Computer = GetObject("WinNT://" + $DomainName + "/" + $ComputerName + ",computer")

Should be changed to:
$Computer = GetObject("WinNT://" + $DomainName + "/" + $ComputerName + "$$",computer")

-Erik


Edited by kholm (2008-11-11 12:45 AM)