I just wrote a new version of my old code and it works fine for about 90% of my machines... but some of them cough up error 1219

 Code:

	$newname = 'NewName'

	$objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" + $strComputer + "\root\cimv2")
	$colComputers = $objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
	For Each $objComputer in $colComputers
		$err = $objComputer.Rename($NewName, $password, $user)
		If $err
			 $nul = sendmessage(@wksta, "Failed Renaming "+@wksta+" to "+$NewName + @crlf + $err)
		else
			$nul = sendmessage(@wksta, "Updates to this PC require the computer to reboot. Please reboot at your earliest convenience.")
		endif
	Next
_________________________
How to ask questions the smart way <-----------> Before you ask