rename hostname windows update powershell code example Example: powershell change hostname Rename-Computer -NewName 'SomeHostname' -Restart