Hi, I use the powershell to change a machine name, I use $name as variable to input a name and the follow cmd-let: $computerName.Rename($name) but it only work in a unjoined domain machine.
my script is the following:
$computerName = Get-WmiObject Win32_ComputerSystem
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null
$name = [Microsoft.VisualBasic.Interaction]::InputBox("Enter Desired Computer Name ")
$computername.rename("$name")
but I need to change the hostname of any computer joined in my domain, may be it's another command, I don't know and I can't find information seeking the web.
I don't need a remote procedure, only a local to facilitate to my servicedesk to change hostnames in different machines.
If somebody knows something I'll be pleasure to know it.