PowerShell Scripts – Rename Local computer name and restart

This script  will take affect after restart

[sourcecode language="powershell"]
$ComputerInfo = Get-WmiObject -Class Win32_ComputerSystem

Comments (1)
  1. Vikas Shah says:

    after i ran the command i got the error message ReturnValue: 5. the user is added in local administrator group.

Comments are closed.

Skip to main content