How to Rename Computer using Powershell

Forums: 


To find out the current machine name:

hostname

To rename computer:

rename-computer NEWCOMPUTERNAME

To rename computer remotely:

rename-computer -computername OLDCOMPUTERNAME -newname NEWCOMPUTERNAME

https://technet.microsoft.com/en-us/library/hh849792%28d=printer%29.aspx