有没有办法通过UserPrincipal类设置一个新用户的域后缀? [英] Is there a way to set a new user's domain suffix through the UserPrincipal class?
问题描述
通过UserPrincipal I类可以设置的UserPrincipalName并且因此当我的用户创建用户登录名的第一部分被填充:
through the UserPrincipal Class I can set the UserPrincipalName and thus when my user is created the first part of the User logon name is populated:
up.UserPrincipalName =ryan.anthony3;
将产生以下结果:
这是下拉是空的,除非我选择的选项之一,通过该接口
however that drop down is empty unless I choose one of the options through the interface
我想以编程方式使用此UserPrincipal类,如果可能的...是可以设置的可用选项之一?
I'd like to set one of the available options programmatically using this UserPrincipal class if possible... is that possible?
我没有看到一个设置为在这里:<一href="http://msdn.microsoft.com/en-us/library/system.directoryservices.accountmanagement.userprincipal%28v=vs.110%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.directoryservices.accountmanagement.userprincipal%28v=vs.110%29.aspx
I am not seeing a setter for it here: http://msdn.microsoft.com/en-us/library/system.directoryservices.accountmanagement.userprincipal%28v=vs.110%29.aspx
推荐答案
的UserPrincipalName是你要找的是什么
UserPrincipalName is what you're looking for.
使用 up.UserPrincipalName =ryan.anthony3@yourDomain.Com;
这篇关于有没有办法通过UserPrincipal类设置一个新用户的域后缀?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!