Exchange 365 Remote Power Shell - Dynamic Distribution Groups

run PS as an admin

Set-ExecutionPolicy RemoteSigned

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

to disconnect:
Remove-PSSession $Session

Get-DistributionGroupMember -Identity groupname

Changing primary SMTP e-mail address in Hybrid Configuration


  • hybrid configuration (MS Ex 2010 and Exchange 365), Windows Azure AD Sync tool
  • user created in AD on-premises, license assigned and mailbox automatically created in Office 365
  • user's primary SMTP e-mail address is, and you can't change it to user@domain.topdomain because it needs to be done in AD on-premises


Exchange 2010 OWA is not authenticating users

MS Echange 2010

Logon screen is fine but when you enter your credentials you receive the message:


Detailed info says that your pahe has been moved or it is no longer available.


Login to the server where Exchange is installed, open services and check the status of the "Microsoft Exchange Forms Based Authentication service" status, restart it, start it if it is not on. If the service is not started Outlook Web App will not authenticate users.

Exporting universal or dynamic distribution-group members list

Mail Universal Distribution Group

[PS] C:\windows\system32>Get-DistributionGroupMember -Identity "group-name" | sort -Property DisplayName | select DisplayName, primarysmtpaddress | Export-Csv C:\Users\"user_profile"\Desktop\"something".csv

Listing members of dynamic distribution group and therir e-mail addresses

$variable-name = Get-DynamicDistributionGroup ""

Subscribe to Exchange