Lab 2 - Exercise 1 – Create Mail Flow Rules
In the Set rule conditions pane, click the Show all rule conditions link (at the bottom of the pane). This will add all the options in to the drop down lists. This option only shows up on the Modify a message template.
Module 2 | Troubleshoot mail flow | Troubleshoot SMTP mail flow
Get-TransportService | Get-Queue
Module 5 | Configure organizational settings | Configure workload policies and throttling
Module 5 | Configure organizational sharing
Module 6
Module 6 | Manage administrator roles | Troubleshoot admin roles
Typo: Replace
Get-ManagementRoleEntry 'Mail Enabled Public Folders*' | Select Name
With
Get-ManagementRoleEntry 'Mail Enabled Public Folders\*' | Select Name
Lab 6
Task 4
"Diego Siciliani", "Joni Sherman", "Patti Fernandez" | Set-CASMailbox -OwaMailboxPolicy "Test OWA Policy"
Get-CASMailbox -Identity "Diego Siciliani" | fl owa*
Module 7 | Create and manage Exchange recipients | Manage permissions for recipients
You assign Send As permission by using the Add-ADPermission cmdlet (Exchange Server) or the Add-RecipientPermission cmdlet (Exchange Online).
Add-ADPermission -Identity "Aidan Delaney" -User "Amr Zaki" -ExtendedRights "Send As"
Add-RecipientPermission -Identity "Lynne Robbins" -AccessRights SendAs -Trustee "Megan Bowen"
You assign Send On Behalf permission by using the Set-Mailbox cmdlet.
Set-Mailbox -Identity "Aidan Delaney" -GrantSendOnBehalfTo "Ankur Chavda"
You assign Full Access permission by using the Add-MailboxPermission cmdlet.
Add-MailboxPermission -Identity "Aidan Delaney" -User "April Reagan" -AccessRights FullAccess
Add-MailboxPermission … -AccessRights SendAs # Generates an error.
All three of these cmdlets accept pipeline input for Identity.
Get-Mailbox -RecipientTypeDetails UserMailbox | Add-MailboxPermission -User "Archiving Service Account" -AccessRights FullAccess
Module 7 | Manage email addresses, lists, and resources | Examine email address policies
To get a list of all recipients and email addresses (note that one recipient can have more than one address - the EmailAddresses property is a collection).
Get-Recipient | Select Name, @{n=’EmailAddresses';e={[string]::join(";", ($PSItem.EmailAddresses))}} | Export-CSV "$env:HOMEPATH\EmailAddress.csv" -NoTypeInformation
Get-ExoRecipient <same as above>
The address with a capital "SMTP" is the primary address.
How to tell which recipient has a particular email address?
Get-Recipient -Filter { EmailAddresses -eq "postmaster@fourthcoffee.com" } | fl name, recipienttype*, emailaddresses
Get-ExoRecipient <same as above>
RecipientFilter demo (fits in to module 7)
On MS-20XT0X-A-LON-EX1
Demo Setup
Get-Mailbox -Identity "c*" | Set-User -City "Christchurch" -Office "Stanley Street"
Get-Mailbox -Identity "co*" | Set-User -Office "Moorhouse Ave"
A dynamic distribution group using a recipient filter
New-DynamicDistributionGroup `
-Name "Christchurch Staff" `
-Alias "ChristchurchStaff" `
-OrganizationalUnit "cn=Users,dc=Adatum,dc=com" `
-RecipientContainer "dc=Adatum,dc=com" `
-RecipientFilter { ( ( RecipientTypeDetails -eq "UserMailbox" ) -or ( RecipientTypeDetails -eq "MailUser" ) -or ( RecipientTypeDetails -eq "MailContact" ) ) -and ( City -eq "Christchurch" ) }
# To get a list of all the members of the dynamic distribution list.
$ChristchurchStaff = Get-DynamicDistributionGroup "Christchurch Staff"
Get-Recipient -RecipientPreviewFilter $ChristchurchStaff.RecipientFilter
#Or.
Get-Recipient -RecipientPreviewFilter (Get-DynamicDistributionGroup "ChristchurchStaff").RecipientFilter
Address Lists
New-AddressList `
-Name "Christchurch Staff" `
-DisplayName "Christchurch Staff" `
-RecipientContainer "dc=Adatum,dc=com" `
-RecipientFilter { ( RecipientTypeDetails -eq "UserMailbox" ) -and ( City -eq "Christchurch" ) } `
-Container "\"
New-AddressList `
-Name "Christchurch Stanley Street Staff" `
-DisplayName "Stanley Street" `
-RecipientContainer "dc=Adatum,dc=com" `
-RecipientFilter { ( RecipientTypeDetails -eq "UserMailbox" ) -and ( City -eq "Christchurch" ) `
-and ( Office -eq "Stanley Street" ) } `
-Container "Christchurch Staff"
New-AddressList `
-Name "Christchurch Moorhouse Ave Staff" `
-DisplayName "Moorhouse Ave" `
-RecipientContainer "dc=Adatum,dc=com" `
-RecipientFilter { ( RecipientTypeDetails -eq "UserMailbox" ) -and ( City -eq "Christchurch" ) `
-and ( Office -eq "Moorhouse Ave" ) } `
-Container "\Christchurch Staff"
Get-AddressList | Update-AddressList
Note that address lists do not inherit their parent container's filter - each list's filter is completely self-contained.
Lab 7, Ex 1, Task 2
On MS-20XT0X-A-LON-DC1
dnscmd /zoneadd companyca50c9.onelearndns.com /DsPrimary
On MS-20XT0X-A-LON-EX1
dnscmd /zoneadd companyca50c9.onelearndns.com /Secondary 10.0.0.4
Lab 7, Ex 1, Task 3
On MS-20XT0X-A-LON-DC1
Set-ADForest -identity adatum.com -UPNSuffixes @{replace="companyca50c9.onelearndns.com"}
Get-ADUser -Filter * -Properties SamAccountName | ForEach-Object { Set-ADUser $_ -UserPrincipalName ($_.SamAccountName + "@companyca50c9.onelearndns.com" )}
Lab 7, Ex 1, Task 4
On MS-20XT0X-A-LON-EX1
New-SendConnector -Name "To Internet" -AddressSpaces "*"
New-AcceptedDomain -DomainName "companyca50c9.onelearndns.com" -DomainType Authoritative -Name "A.Datum"
Set-EmailAddressPolicy -Identity "Default Policy" -EnabledPrimarySMTPAddressTemplate "SMTP:%m@companyca50c9.onelearndns.com"
Update-EmailAddressPolicy -Identity "Default Policy"
Set-OwaVirtualDirectory -Identity "LON-EX1\OWA (Default Web Site)" -ExternalUrl https://companyca50c9.onelearndns.com/OWA -InternalUrl https://companyca50c9.onelearndns.com/OWA
Set-EcpVirtualDirectory -Identity "LON-EX1\ECP (Default Web Site)" -ExternalUrl https://companyca50c9.onelearndns.com/ECP -InternalUrl https://companyca50c9.onelearndns.com/ECP
Set-ActivesyncVirtualDirectory -Identity "LON-EX1\Microsoft-Server-ActiveSync (Default Web Site)" -ExternalUrl https://companyca50c9.onelearndns.com/Microsoft-Server-Activesync -InternalUrl https://companyca50c9.onelearndns.com/Microsoft-Server-Activesync
Set-WebServicesVirtualDirectory -Identity "LON-EX1\EWS (Default Web Site)" -ExternalUrl https://companyca50c9.onelearndns.com/ews/exchange.asmx -InternalUrl https://companyca50c9.onelearndns.com/ews/exchange.asmx
Set-OabVirtualDirectory -Identity "LON-EX1\OAB (Default Web Site)" -ExternalUrl https://companyca50c9.onelearndns.com/OAB -InternalUrl https://companyca50c9.onelearndns.com/OAB
Set-OutlookAnywhere -Identity "LON-EX1\Rpc (Default Web Site)" -ExternalHostname companyca50c9.onelearndns.com -ExternalClientsRequireSsl $true -ExternalClientAuthenticationMethod NTLM -InternalHostname companyca50c9.onelearndns.com -InternalClientsRequireSsl $true -InternalClientAuthenticationMethod NTLM
Set-OutlookProvider EXPR -CertPrincipalName:*.onelearndns.com
Lab 7, Ex 1, Task 5
When you get to the Synchronisation Service steps, note that there are some users with deliberate errors (Ngoc Bich Tran and An Dung Dao) for an IdFix lab step that is no longer included.
Lab 7, Ex 2, Task 1
If the configure button in the Exchange Online classic EAC does not launch the wizard (it seems to have broken some time before Dec 2022) then open a new browser tab and navigate to the following.
https://aka.ms/hybridwizard
Lab 7, Ex 2, Accepted Domains
Exchange Server
M365x#######.onelearndns.com - Authoritative
M365x#######.mail.onmicrosoft.com - Internal Relay
Exchange Online
M365x#######.onelearndns.com (default domain) - Internal Relay
M365x#######.mail.onmicrosoft.com - Authoritative
M365x#######.onmicrosoft.com - Authoritative
If the Exchange Online EAC gives an error when changing the accepted domain to Internal Relay (Failed to update the accepted domain, Error: Error executing cmdlet) then use the ExchangeOnlineManagement module.
Get-AcceptedDomain -Identity "M365x#######.onelearndns.com" | Set-AcceptedDomain -DomainType InternalRelay