Hi everyone! I hope you're well.
I'm trying to write an AppleScript for migrating our users from one domain to another. I'm running into a problem though. I think it has to do with the space in our domain user group. Here's the part of my script that's failing:
display dialog "Enter the username(Short Name) you want to migrate" default answer ""
set shortName to text returned of result
do shell script "dscl . delete /Users/" & shortName & "" with administrator privileges
do shell script "chown -R " & shortName & ":DOMAIN\\Domain Users /Users/" & shortName & "" with administrator privileges
display dialog "Don't forget to move the computer to the right OU"
It's the part with DOMAINDomain Users. I've tried doing DOMAINDomain Users but I keep getting errors on that.
