Originally Posted By: Glenn Barnas
Well Halle-freain'-leulla!!! Someone who understands separation of privilege! \:D I applaud you and your efforts!!


Thank you \:\)

 Originally Posted By: Glenn Barnas
Check the Kixtart UDF Library on my web site and grab the AtoU UDF. It's actually a pair of UDFs that do simple ASCII/Unicode translations. They might be of help in your situation. If not directly useful, they might provide some ideas for your specific need. The AtoU UDF was developed when we needed to query AD to perform Exchange to Archive data migrations, so it might just be what you need.


I browsed the library on your website and found some interesting stuff!
Did a quick try with:

 Code:
Break On
$Username = "fbosse"
$UserAccountOU = GetUserOU($UserName+"@@emcobp.com") 
? $UserAccountOU
$UserOU = SubStr($UserAccountOU, Len("LDAP://")+1, Len($UserAccountOU)-Len("LDAP://")) ; remove "LDAP://" from string	
? $UserOU
$CmdLine = 'dsquery user -name ' + chr(34) + $UserName + chr(34) + ' ' + chr(34) + $UserOU + chr(34) + ' '
? $CmdLine
? UtoA($CmdLine)
? AtoU($CmdLine)
Quit


The result:

 Code:
C:\temp>kix32 test.kix
LDAP://CN=Francis Bossé,OU=LAPTOP,OU=LASALLE,OU=BP_USERS,DC=emcobp,DC=com
CN=Francis Bossé,OU=LAPTOP,OU=LASALLE,OU=BP_USERS,DC=emcobp,DC=com
dsquery user -name "fbosse" "CN=Francis Bossé,OU=LAPTOP,OU=LASALLE,OU=BP_USERS,DC=emcobp,DC=com"
♫ű☼♀♂
♀♀♀
64007300710075006500720079002000750073006500720020002d006e0061006d00650020002200660062006f0073007300000043003d0063006f006d0022002000
C:\temp>


I don't understand the results!
So I have some work to do \:\)