PineMail11 wrote:
If I would know how to write scripts, I wouldn't have written to you.
hope to see this in next version!
Hi Zhang,
We have made script to get the global address book contacts, but we need to make a link in control panel, so that we can download it from control panel.
Kindly advice how the script can be called from control Panel.
Script:
ldapsearch -LLLL -x -D "cn=Manager,dc=test,dc=com" -h mail.test.com -b "ou=Users,domainName=test1.com,o=domains,dc=test,dc=com" -w xxxx cn=* sAMAccountName cn sn=*-S sn=* sAMAccountName sn mail=*@* -S mail=*@* sAMAccountName mail | egrep 'mail:'>file1
ldapsearch -LLLL -x -D "cn=Manager,dc=test,dc=com" -h mail.test.com -b "ou=Users,domainName=test1.com,o=domains,dc=test,dc=com" -w xxxx cn=* sAMAccountName cn sn=*-S sn=* sAMAccountName sn mail=*@* -S mail=*@* sAMAccountName mail | egrep 'cn:'>file2
paste file1.txt file2.txt | sed 's/\t/,/g'>/home/abc.csv
Thanks,
Regards,
Pinemail11