4 1. Start a cloud shell on the Exchange Admin website.
6 2. The cloud shell defaults to `bash`. Change it to `PowerShell`.
8 2. Run these commands once.
10 The results of these commands will persisit in your Cloud Shell attached Azure storage.
13 Install-Module -Name PSWSMan -AcceptLicense -Confirm
14 Install-WSMan # Web services for management
15 Import-Module ExchangeOnlineManagement
18 3. Repeat these commands for each new Cloud Shell
21 Import-Module ExchangeOnlineManagement
22 Connect-ExchangeOnline
27 ### Distribution Group
29 A distribution list sends a copy of any incoming email to the inbox of every member. The list itself, has an email address, but does not have a mailbox, since a copy of every incoming message goes in the mailboxes of each list member.
31 1. Create distribution group
34 $groupname = 'loves_tacos'
35 new-distributiongroup $groupname
38 2. Add some folks to it
41 Add-DistributionGroupMember -Identity $groupname -Member bob
42 Add-DistributionGroupMember -Identity $groupname -Member larry
45 3. Verify the list is as desired
49 get-distributiongroupmember -identity $groupname
56 set-distributiongroup -identity $groupname -EmailAddresses @{add="$groupname@$domain"}
57 get-distributiongroup $groupname | Select Alias, EmailAddresses, ManagedBy, DistinguishedName | Format-List
62 ### Or create an entire shared mailbox
64 A shared mailbox is an actual separate mailbox. Messages sent to it will not be copied into the mailboxes of the members with access. Members with access to a shared mailbox may also be allowed to send email out.
66 A shared mailbox should be used if:
68 - A team of people need to send email out from the email address
69 - Each email should only be handled by one person.
71 > Warning: This recipe is likely incomplete, as I eventually decided not to use it.
73 1. Create a shared mailbox
77 $displayname = 'Loves Tacos'
78 New-Mailbox -Shared -Name "$groupname" -DisplayName $displayname
83 You can review your mailbox users with `Get-Mailbox`
88 Add-MailboxPermission -Identity $groupname -AccessRights FullAccess -User <user>
94 Get-MailboxPermission $groupname