Wednesday, 8 April 2015

Reset Password for Distribution Group users in Office365

1. Connect to Exchange Online using remote PowerShell​​

Run below command to Export users from Distribution Group:

Get-DistributionGroupMember -Identity | ​Select-Object PrimarySmtpAddress | Export-Csv E:\DL.csv -NoTypeInformation

 2. Connect to MSOL Service

Run below command once connected.

Import-Csv "E:\DL.csv" | ForEach{Set-MSOLPassword -UserPrincipalName $_.PrimarySmtpAddress -NewPassword P@ssWord

No comments:

Post a Comment

Blog Archive