简体   繁体   English

如何在用户的Active Directory中添加分散组?

[英]How to add the distrubtion group in Active Directory for a user?

How to add the distrubtion group from Powershell in Active Directory ? 如何在Active Directory中从Powershell添加分散组?

I have user in active directory and i want to add the user into particular group rather than going and server because that part is going to be outsourced. 我在活动目录中有用户,我想将用户添加到特定的组中,而不是添加到服务器中,因为这部分将要外包。

so how to add the distrubution group for particular user. 因此如何为特定用户添加发布组。

Here's the basic code: 这是基本代码:

$group = [adsi]"LDAP://CN=Group1,OU=Groups,DC=domain,DC=com" $group.member.Add('CN=User1,OU=Users,DC=domain,DC=com') $ group = [adsi]“ LDAP:// CN = Group1,OU = Groups,DC = domain,DC = com” $ group.member.Add('CN = User1,OU = Users,DC = domain,DC = com ')
$group.SetInfo() $ group.SetInfo()

'Add-ADGroupMember' is useful here if you have ActiveDirectory module available. 如果您有ActiveDirectory模块可用,则“ Add-ADGroupMember”在这里很有用。 Powershell 3.0 and later have it available by default. Powershell 3.0和更高版本默认情况下可用。 Use Get-Help for syntax. 使用Get-Help语法。

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

相关问题 如何将用户添加到Active Directory中的特定域 - How to add user to a specific domain in Active Directory Active Directory用户条目和组条目 - Active Directory user entry, and group entry 一旦我在Active Directory中获得用户组,如何获取组的SID? - How to get SID of a group once i get groups of a user in Active Directory? 从 C++ 应用程序中,如何检查 Active Directory 中的特定用户是否属于特定安全组? - From a C++ application, how can I check if a specific user in Active Directory is part of a particular security group? 从Active Directory获取用户的组成员身份 - Get a user's group memberships from Active Directory Active Directory:如何获取属于另一个域的组信息? - Active Directory : How to get Group information that belongs to another domain? 查找Active Directory组的所有者 - Finding the Owner of An Active Directory Group 在活动目录域中使用User.IsInRole()检查组成员身份 - using User.IsInRole() across active directory domains to check for group membership 如何覆盖我的Active Directory组的默认数据库 - How to override the default database of my Active Directory group 如何从Active Directory获取用户密码的到期日期? - How to get user password expiration date from Active Directory?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM