Comprehensive IT management for enterprise teams—priced per technician for predictable, scalable costs. Boost security, minimize downtime, and support employees anywhere.
Naming your computer is almost as exciting as naming your baby or new puppy. Almost. However, it shouldn’t have to be as difficult.
Whether you recently purchased a new computer, or upgraded from a previous version to Windows 10 (and the name you assigned your computer didn’t make it through the upgrade), this script will help you easily rename the computer.
Not to mention, if you’re an MSP or IT professional managing a ton of devices, renaming them in a systematic way will certainly help you keep track of all the devices you monitor and maintain on a monthly basis.
This script changes the system hostname and restarts the computer automatically. The hostname is changed both locally and over the network.
This script will work for both a local and remote computer, hopefully making your work life a little easier.
The Script:
Atera does not guarantee the integrity, availability, security, virus-free, safety, lawfulness, non-infringement, rights’ status, or functionality of the scripts. The use of the shared scripts is at your own risk. Scripts are provided “AS IS”. *
# Chanage the computer name in Windows
Rename-Computer -newname "$HQ-MikeC-PC"
# Restart the computer for rename to take effect
if ($ToRestartTypeYes -eq 'yes') {
Restart-Computer -Force
}
Script copied to clipboard
Technical Notes:
1. The computer will restart automatically for the changes to take effect.
2. This script uses a variable named $HQ-MikeC-PC to specify the computer name. If this variable does not contain a value, or is not inherited from another source, this script may produce unexpected results.
3. This script will result in changing the computer name as seen in Active Directory. This may require rejoining or other interaction from an administrator after running this script.
* Scripts are provided for your benefit. You understand and acknowledge that when downloading and/or copying and/or using the Scripts: (i) you may be exposed to Scripts from a variety of sources, (ii) Atera is not responsible and takes no liability for the accuracy, usefulness, integrity, lawfulness, title or infringement, security, functionality or Intellectual Property Rights of, or relating to, such Scripts; and (iii) the Scripts are provided “AS IS” and “AS AVAILABLE”, and may have errors, and may not be malware-free, and that your interactions with, and use of, the Scripts is at your sole risk and free will. You hereby agree to waive, and hereby do waive, any legal or equitable rights or remedies you may have against Atera with respect to the Scripts.