I am trying to create a batch file for use to bulk scripting but am running into issues with getting it to work properly.
1. admodcmd -dn " OU = Users,
" -s -custom userPrincipalName %'sAMAccountNameemail@example.com
When upn.bat is run, it set the upn field new value in AD to “@domain.com".
2. admodcmd -dn "OU = Users,
OU=MyOU,DC=domain,DC=com " -s –custom displayName "%'sn'%, %'givenName'%"
When run name.bat, it sets the display name new value in AD to “ , “.
It is strange as if I open cmd.exe, copy and paste the exact line it work perfectly.