mtniehaus / RenameComputer

Rename a Hybrid AADJ computer after an Autopilot deployment
MIT License
56 stars 18 forks source link

Request: Add computer name verification #4

Closed manojmisal closed 7 months ago

manojmisal commented 2 years ago

This is a genuinely nice script. :) May I request you to amend one more check along with AD connectivity & domain join status check, script should check the computer name as well. If a computer's name matches, then only rename the computer.

If computer name starts with "XYZ-*" then only rename the computer.

Just a loud thought if I deploy this script to all existing devices (converting devices to autopilot) should not rename these devices. So, to avoid this requesting change.

Many thanks.

mtniehaus commented 7 months ago

I added a new -Prefix switch to the script -- if the current computer name doesn't match the value specified (if you specify one) it will bail out.