Change Name PC on windows 11 with error “the following error occurred validating the name”

  • Open Windows PowerShell in Admin mode. To do that, search for “powershell” in the Windows Search bar and select “Run as administrator“.
How to Change Your Computer’s Name in Windows 11
  • Now copy+paste the following command and press Enter: Rename-Computer -NewName "xyz". Restart your PC for the change to take effect.
How to Change Your Computer Name in Windows 11 rename windows 11 pc

Note: Like the Command Prompt method, replace “xyz” with the name of your choice.