|
|
 |
« Reply #1 on: November 29, 2010, 04:12:32 PM » |
|
You can create a vbs file like this (check syntax and options, but the idea is this):
Set objWMI = GetObject("winmgmts:root\directory\LDAP")
Set colObjets = objWMI.ExecQuery _ (-U "DOMAIN\user"%MyPassword //AD-DC1 "Select ds_mail From ds_user WHERE ds_samaccountname='userID'")
For Each objObjet in colObjets WScript.Echo (objObjet.ds_mail) Next
Save it like mail.vbs and test if it works (gives your desired output) with
cscript //Nologo mail.vbs
Then, add an exec module like:
module_begin module_name Mail module_type generic_data_string module_exec cscript //Nologo mail.vbs module_description Mail module_end
Of course, change at will.
cscript //Nologo mail.vbs
|