the script is quite simple:
$oComputerSystem = Get-WmiObject win32_computersystem
$oComputerSystem.Rename( "newname" )
some times this works, simetimes it doesn't. I haven't figured out yet exactly what is the reason for this. When it does not work I get returnvalue 5. What does this mean? I cannot find any documentation of the possible return values and their meening.