如何使用vbscript从Active Directory(LDAP)获取电子邮件 [英] how to fetch email from active directory (LDAP) using vbscript

查看:73
本文介绍了如何使用vbscript从Active Directory(LDAP)获取电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用vbscript从LDAP获取电子邮件地址。任何人都可以帮我理解如何找到它吗?

我尝试使用下面的代码但没有运气。



Dim objSysInfo,objUser

Dim strEmail

设置objSysInfo = CreateObject(ADSystemInfo)

设置objUser = GetObject(LDAP:// RootDSE&objSysInfo。 UserName)

strEmail = objUser.mail

I am trying to fetch email address from LDAP using vbscript. Can any one help me to understand how to find it?
I tried with the below code but no luck.

Dim objSysInfo, objUser
Dim strEmail
Set objSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://RootDSE" & objSysInfo.UserName)
strEmail = objUser.mail

推荐答案

请详细解释一下吗?


这篇关于如何使用vbscript从Active Directory(LDAP)获取电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆