Skip to content

Instantly share code, notes, and snippets.

@dryliketoast
Created January 5, 2017 15:04
Show Gist options
  • Select an option

  • Save dryliketoast/53a28dab226871df9bfc8bc09327af1a to your computer and use it in GitHub Desktop.

Select an option

Save dryliketoast/53a28dab226871df9bfc8bc09327af1a to your computer and use it in GitHub Desktop.
PS C:\WINDOWS\system32> Set-ExecutionPolicy RemoteSigned
PS C:\WINDOWS\system32> $UserCredential = Get-Credential
PS C:\WINDOWS\system32> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
PS C:\WINDOWS\system32> Import-PSSession $Session
PS C:\WINDOWS\system32> New-DistributionGroup -PrimarySmtpAddress {distro_email_address} -Name "{my distro group}" -Members {list_of_recipients_email_addresses,comma,separated}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment