Problem

Need a script that automatically changes the Windows computer name to match it’s Dell Service Tag. Dell Service Tags are pretty unique and many people use them for asset tracking.

Solution

Here is a Powershell script to rename and reboot the machine:

Run as Administrator obviously.