Rename Computers with PowerShell

Some documentation refers to the Rename-Computer cmdlet, but according to this post, providing an invalid computer name could cause unexpected results. Since local and remote computers can already be renamed using WMI and netdom.exe, the cmdlet was removed. The MSDN documentation indicates the Rename method will not work on domain members, but I have tested this technique on Windows 7 and XP systems in a domain.

The Get-Credential cmdlet can be used to mask the password.

Remember to reboot the computer for the changes to take effect.