简体   繁体   English

Active Directory VBScript问题

[英]Active Directory VBScript Issue

I'm creating a script to assign a Active Directory user to a group but I want to use a text box input instead of predefining the username. 我正在创建将Active Directory用户分配给组的脚本,但我想使用文本框输入而不是预定义用户名。 I know I'm doing something stupid here but strUserName is a predefined dim value at the top of the code. 我知道我在这里做一些愚蠢的事情,但是strUserName是代码顶部的预定义的dim值。

userPath = "LDAP://cn=users" & "cn=" & strUserName) & "cn=users,dc=domain......."

cn=users名前有一个伪造的cn=users ,用户名后有一个伪造的括号,并且所有路径段之间必须有逗号。

userPath = "LDAP://cn=" & strUserName & ",cn=users,dc=example,dc=org"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM