登录名中的Active Directory用户名 [英] Active Directory User Name from Logon Name
问题描述
大家好,
我想获得给定其networkID的用户名,是这个
Active Directory对它有用吗?(对于内网用户) )
如果是这样,你能指点一些示例代码/示例吗?
提前致谢,
亚瑟
<她写道:
我想得到给定用户的名字他们的networkID,是这个
Active Directory对什么有用?(对于内部网用户)
如果是这样,你能指点我一些示例代码/示例吗? br />
先谢谢,
我相信你想确定用户的公共名称(价值
cn属性)来自sAMAccountName属性的值(
"用户的Windows 2000之前的登录名)。您可以使用NameTranslate
对象。我在此链接上有VBScript示例:
http:// www.rlmueller.net/NameTranslateFAQ.htm
-
Richard
Microsoft MVP脚本和ADSI
Hilltop Lab - http://www.rlmueller.net
Richard,
非常感谢您的回复。这可能听起来无知,但是对于NameTranslate类,是否有任何特定的命名空间?$ $ $ $ b我无法在
System.DirectoryServices下找到它。是否有可能发布一些样本C#代码?
非常感谢,
Arthur
Richard Mueller写道:
Arthur写道:
我想获得给定网络ID的用户名,是这样的/>
Active Directory对什么有用?(对于内联网用户)
如果是这样,你能指点我一些示例代码/示例吗?
在此先感谢,
我相信你想要确定用户的公共名称(
cn属性的值) sAMAccountName属性的值(
"用户的Windows 2000之前的登录名)。您可以使用NameTranslate
对象。我在此链接上有VBScript示例:
http:// www.rlmueller.net/NameTranslateFAQ.htm
-
Richard
Microsoft MVP脚本和ADSI
Hilltop Lab - http://www.rlmueller.net
在vb.net中我向Active DS Type Library添加一个COM引用(activeds.tlb)。
此外,这里是链接:
http://windowssdk.msdn.microsoft.com...60(VS.80).aspx
-
Richard
Microsoft MVP脚本和ADSI
Hilltop Lab - http://www.rlmueller.net
亚瑟 < sk **** @ yahoo.comWrote in message
news:11 ********************** @ m73g2000cwd.googlegr oups.com ...
Richard,
非常感谢您的回复。这可能听起来无知,但是对于NameTranslate类,是否有任何特定的命名空间?$ $ $ $ b我无法在
System.DirectoryServices下找到它。是否有可能发布一些样本C#代码?
非常感谢,
Arthur
Richard Mueller写道:
> Arthur写道:
我想获得给定其networkID的用户名,这是
Active Directory对什么有用?(对于内联网用户)
如果是这样,你能指点我一些示例代码/示例吗?
提前谢谢,
我相信你想从sAMAccountName属性的值中确定用户的公共名称(
cn属性的值)(
用户的Windows 2000之前的登录名。您可以使用NameTranslate
对象。我在此链接上有VBScript示例:
http:// www.rlmueller.net/NameTranslateFAQ.htm
-
Richard
Microsoft MVP脚本和ADSI
Hilltop Lab - http://www.rlmueller.net
Hi All,
I would like to get the name of the user given their networkID, is this
something Active Directory would be useful for?(For intranet users)
If so, can you please point me to some sample code/examples?
Thanks in advance,
Arthur
Arthur wrote:
I would like to get the name of the user given their networkID, is this
something Active Directory would be useful for?(For intranet users)
If so, can you please point me to some sample code/examples?
Thanks in advance,I believe you want to determine the Common Name of the user (the value of
the cn attribute) from the value of the sAMAccountName attribute (the
"pre-Windows 2000 logon name" of the user). You can use the NameTranslate
object for this. I have VBScript examples at this link:
http://www.rlmueller.net/NameTranslateFAQ.htm
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
Richard,
Thanks a lot for responding. This might sound ignorant, but is there
any specific namespace for NameTranslate class ? I cant find it under
System.DirectoryServices. Is it possible to post some sample C# code?
Thanks a lot,
Arthur
Richard Mueller wrote:Arthur wrote:
I would like to get the name of the user given their networkID, is this
something Active Directory would be useful for?(For intranet users)
If so, can you please point me to some sample code/examples?
Thanks in advance,
I believe you want to determine the Common Name of the user (the value of
the cn attribute) from the value of the sAMAccountName attribute (the
"pre-Windows 2000 logon name" of the user). You can use the NameTranslate
object for this. I have VBScript examples at this link:
http://www.rlmueller.net/NameTranslateFAQ.htm
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
In vb.net I add a COM reference to Active DS Type Library (activeds.tlb).
Also, here is a link:
http://windowssdk.msdn.microsoft.com...60(VS.80).aspx
Someone else my respond with C# code.
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
"Arthur" <sk****@yahoo.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...Richard,
Thanks a lot for responding. This might sound ignorant, but is there
any specific namespace for NameTranslate class ? I cant find it under
System.DirectoryServices. Is it possible to post some sample C# code?
Thanks a lot,
Arthur
Richard Mueller wrote:>Arthur wrote:
I would like to get the name of the user given their networkID, is this
something Active Directory would be useful for?(For intranet users)
If so, can you please point me to some sample code/examples?
Thanks in advance,
I believe you want to determine the Common Name of the user (the value of
the cn attribute) from the value of the sAMAccountName attribute (the
"pre-Windows 2000 logon name" of the user). You can use the NameTranslate
object for this. I have VBScript examples at this link:
http://www.rlmueller.net/NameTranslateFAQ.htm
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
这篇关于登录名中的Active Directory用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!