Active Directory and MYSQL


hi,

i have following requirement

1. select usernames table in mysql donot have email ids populated. output in output file

select username `mantis_user_table` email = 'no email' or email = '' outfile "c:/temp/test1.txt"

2. have usernames in text file now.

3. run command email ids active directory

for /f %i in (test1.txt) @dsquery user -samid %i|dsget user -empid -email>>c:/temp/user-email.txt

4. how can suppress or avoid empid email , dsget succeeded in generated text file??

5. once step 4 achieved, how can update email ids of users in mysql dbase.

please me this.

many in advance.

use adfind (joeware.net) instead - can manipulate output via number of output option switches (-csv, -csvnoq, -nodn, nocsvheader, etc.) in following:

for /f %i in (test1.txt) @adfind -gc -f "&(objectcategory=person)(objectclass=user)(samaccountname=%i)" proxyaddresses employeenumber -csv -csvnoq -nodn -nocsvheader

hth
marcin



Windows Server  >  Directory Services



Comments

Popular posts from this blog

WIMMount (HSM) causing cluster storage to go redirected (2012r2 DC)

Failed to delete the test record dcdiag-test-record in zone test.com

Azure MFA with Azure AD and RDS