标签:powershell
一、创建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
标签:powershell
原文地址:http://blog.51cto.com/fandecorator/2086735