]> apps.delaporte.us Git - dotfiles.git/blob - doc/exchange_online.md
Add Exchange Online shared mailbox or distribution group
[dotfiles.git] / doc / exchange_online.md
1
2 ## Setup
3
4 1. LOL. It defaults to `bash`. Change that.
5
6 2. Probably one-time install
7
8 ```powershell
9 Install-Module -Name PSWSMan -AcceptLicense -Confirm
10 Install-WSMan # Web services for management
11 Import-Module ExchangeOnlineManagement
12 ```
13
14 3. Probably per session:
15
16 ```powershell
17 Import-Module ExchangeOnlineManagement
18 Connect-ExchangeOnline
19 ```
20
21 ## Tasks
22
23 ### Distribution Group
24
25 Seems like this is an older way to do it.
26
27 1. Create distribution group
28
29 ```powershell
30 $groupname = 'loves_tacos'
31 new-distributiongroup $groupname
32 ```
33
34 2. Add some folks to it
35
36 ```powershell
37 Add-DistributionGroupMember -Identity $groupname -Member bob
38 Add-DistributionGroupMember -Identity $groupname -Member larry
39 ```
40
41 3. Verify the list is as desired
42
43
44 ```powershell
45 get-distributiongroupmember -identity $groupname
46 ```
47
48 4. Add an email alias
49
50 ```powershell
51 $domain = 'tacos.net'
52 set-distributiongroup -identity $groupname -EmailAddresses @{add="$groupname@$domain"}
53 get-distributiongroup $groupname | Select Alias, EmailAddresses, ManagedBy, DistinguishedName | Format-List
54 ```
55
56
57
58 ### Or create an entire shared mailbox
59
60 1. Create a shared mailbox
61
62 ```powershell
63 $groupname = 'tacos'
64 $displayname = 'Loves Tacos'
65 New-Mailbox -Shared -Name "$groupname" -DisplayName $displayname
66 ```
67
68 2. Decide who to add.
69
70 You can review your mailbox users with `Get-Mailbox`
71
72 3. Add people
73
74 ```powershell
75 Add-MailboxPermission -Identity $groupname -AccessRights FullAccess -User <user>
76 ```
77
78 4. Review
79
80 ```powershell
81 Get-MailboxPermission $groupname
82 ```