Change Name of Computer to Name of Logged in User
- Open Powershell in Administrative mode.
- Run the Script: Paste and run the following PowerShell commands, one by one, to get the username and set it as computer name:
$temp = Get-WmiObject -Class Win32_ComputerSystem | Select-Object -ExpandProperty username $UserName =$temp -replace ".*\\", "" Set-ItemProperty -Path"HKLM:\Software\MMSOFT Design\PC Monitor\" -Name ComputerName -Value "$UserName"- Reboot the System: A system restart is required for the change to take full effect.