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.
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.