Hello,
Your script is awesome and will save us a lot of works for our migration. Thanks a lot for sharing it with us.
I had to modify something to get it work.
When OS language is different from english, the administrators group isn't the same so instead of using an hardcoded group name I got it with the sid which is always the same
$AdminGroup=(get-wmiobject win32_group -Filter "SID='S-1-5-32-544'" | Select Name)
Add-LocalGroupMember -Group $AdminGroup -Member $UserName}