This one took longer than I care to admit to work out… Get-ADUser was returning blank values for EmployeeID/EmployeeNumber for all users. Very strange. Run PowerShell as Administrator to fix this.
There's no commenting functionality here. If you'd like to comment, please either mention me (@[email protected]) on Mastodon or email me. I don't have any logging or analytics running on this website, so if you found something useful or interesting it would mean a lot to hear from you.