BESadmin and ‘Send As’ Right |
|
Posted Friday, 27 June 2008 by Michael Khanin If you are working with BES (BlackBerry Enterprise Server) you can get a problem, when users cannot send emails from their Blackberry. And, I guess you already familiar with a “Send As Permission” problem :). So, I created a script, that allows set all neccesasry right to the BESADMIN account. When you run script, you should provide an OU, where the particular user exist and user’s email address. NOTE: In my script I used linex.exe and dsacls.exe. Just use Google to download those very POWERFUL tools @echo off
SET Tools=C:\Tools SET TEMP=C:\TMP SET SOU=
DSQUERY OU domainroot > %TEMP%\ou.txt
SET /p SOU=”Please type # of OU where the user located: “
FOR /F “TOKENS=* delims==,OU” %%a in (’%Tools%\LINEX -l %SOU% ^<%TEMP%\OU.txt’) do set ou4user=%%~a FOR /F “TOKENS=2 delims==,” %%a in (’dsquery * “%ou4user%” -attr mail distinguishedName^|find /i “%BES%”‘) do set BES-USER=%%~a @echo “%BES-USER%”
dsacls “CN=%BES-USER%,%ou4user%” /G “%USERDOMAIN%\BESADMIN:GR”
|