1.静态组
New-DistributionGroup -Name "PingTai" -Type Distribution
2.动态组
New-DynamicDistributionGroup -Name "group" -RecipientContainer "corp.homelink.com.cn/链家网/CFO线/" -ConditionalCustomAttribute1 "经纪人" -IncludedRecipients MailboxUsers
3.批量创建动态组
import-csv C:\Users\fanyunxiao\批量新建动态邮件组.csv | foreach {New-DynamicDistributionGroup -Name $_.name -RecipientContainer $_.recipientContainer -ConditionalCustomAttribute1 $_.ConditionalCustomAttribute1 -IncludedRecipients mailboxusers}
1.静态组
import-csv C:\Users\fanyunxiao\批量添加静态组成员.csv | foreach {Add-DistributionGroupMember "group0101" -Member $_.mail}
Get-Recipient -RecipientPreviewFilter (Get-DynamicDistributionGroup -Identity demo@lianjia.com).LdapRecipientFilter -OrganizationalUnit (Get-DynamicDistributionGroup -Identity demo@lianjia.com).RecipientContainer -ResultSize unlimited
Get-ADGroupMember -Identity 'bod' -Recursive | Select-Object Name,SamAccountName | Export-Csv -Path 'C:\Users\fanyunxiao\user.csv' -NoTypeInformation -Encoding Unicode
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。