Skip to main content
< All Topics
Print

Change Name of Computer to Name of Logged in User

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