Created
August 12, 2016 17:23
-
-
Save tonejito/c02b0f7fa602ea18595177f9fb9a3954 to your computer and use it in GitHub Desktop.
Rename Windows PC via PowerShell and WMI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Rename Windows PC via PowerShell and WMI | |
| # http://social.technet.microsoft.com/wiki/contents/articles/7824.set-computer-name-using-powershell.aspx | |
| # https://technet.microsoft.com/en-us/library/hh849792(v=wps.620).aspx | |
| $ComputerName = Get-WmiObject Win32_ComputerSystem | |
| $ComputerName.Rename($name) | |
| Restart-Computer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment