2017年4月8日Office 365 使用CSV文件导入邮件组

国内版

第一步:

Import-Module msonline

Connect-MsolService

输入用户名密码

第二步:

Get-MsolUser”

第三步:

Set-ExecutionPolicy unrestricted

$cred = Get-Credential

$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://partner.outlook.cn/PowerShell -Credential $cred -Authentication Basic -AllowRedirection

Import-PSSession $session

使用CSV文件导入邮件组

import-csv C:\Groupname1.csv | foreach {New-DistributionGroup -Name $_.GroupName  -PrimarySmtpAddress  $_.Distribution}

posted @ 2017-04-08 21:28  汤姆  阅读(653)  评论(0)    收藏  举报