Module 1 – Preparing to Install Exchange

Windows Server 2012 R2 Update -1

Windows Server 2012 R2 Update -2

Microsoft .NET Framework 4.6.2

Cumulative Update for Windows Server 2016 for x64-based Systems (KB3206632)

Microsoft .NET Framework 4.7.1

Unified Communications Managed API 4.0 Runtime

Exchange 2013 prerequisites (For PowerShell command)

Exchange 2016 prerequisites (For PowerShell command)

Exchange 2016 prerequisites – Windows Server 2016 (For PowerShell command)

Exchange 2013 – CU19

Exchange 2013 – CU20

Exchange 2016 – CU8

Exchange 2016 – CU9

Module 3 – Configure SSL Certificates for Exchange 2013

PowerShell Commands

Get-OutlookAnywhere | Select Server,ExternalHostname,Internalhostname

Get-OutlookAnywhere | Set-OutlookAnywhere -ExternalHostname -InternalHostname -ExternalClientsRequireSsl $true -InternalClientsRequireSsl $true -DefaultAuthenticationMethod NTLM

Get-MAPIVirtualDirectory | Set-MAPIVirtualDirectory -ExternalUrl -InternalUrl

Get-OwaVirtualDirectory | Set-OwaVirtualDirectory -ExternalUrl -InternalUrl

Get-EcpVirtualDirectory | Set-EcpVirtualDirectory -ExternalUrl -InternalUrl

Get-ActiveSyncVirtualDirectory | Set-ActiveSyncVirtualDirectory -ExternalUrl -InternalUrl

Get-WebServicesVirtualDirectory | Set-WebServicesVirtualDirectory -ExternalUrl -InternalUrl -Force

Get-OabVirtualDirectory | Set-OabVirtualDirectory -ExternalUrl -InternalUrl

Get-ClientAccessServer | Set-ClientAccessServer -AutoDiscoverServiceInternalUri

<# Better command, but does not work with Exchange 2013
Get-ClientAccessService | Set-ClientAccessService -AutoDiscoverServiceInternalUri

Get-ClientAccessService | Select Name,AutoDiscoverServiceInternalURI


Module 5 – Creating Mailboxes etc

Import-Module ActiveDirectory

$Sid = Read-Host -Prompt 'Enter your student ID (AdatumQAxxxx)'
if ($Sid -notlike 'AdatumQA????') {Throw 'Invalid student ID'}

Get-ADForest | Set-ADForest -UPNSuffixes @{Add="$"}

$OUs = 'Executive','Finance','Marketing','Operations','IT','Sales','Research'

$OUs | foreach {New-ADOrganizationalUnit $_}

$UsersCSV = `
 'FirstName,LastName,OrganizationalUnit' ,

 $Users = $UsersCSV | ConvertFrom-Csv
 $sp= 'Pa$$w0rd'| ConvertTo-SecureString -AsPlainText -Force

new-aduser -GivenName Adam -Surname Able -UserPrincipalName "Adam@adam@$" -Name 'Adam Able' -AccountPassword $sp

new-aduser -GivenName Fred -Surname Flintstone -UserPrincipalName "FredF@$sid.qaexhybrid.local" -Name 'Fred Flintstone' -AccountPassword $sp

 $testcmd = Get-Command New-Mailbox -ErrorAction SilentlyContinue
if (! $testcmd)
 Write-Verbose 'No Session Exists, connecting to Server'
 $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://QAEXHybridEX/powershell -Authentication Kerberos
 Import-PSSession $session

New-AcceptedDomain -Name "$" -DomainName "$" -DomainType 'Authoritative'

Get-EmailAddressPolicy | Set-EmailAddressPolicy -EnabledEmailAddressTemplates @("SMTP:%m@$") 

Get-EmailAddressPolicy | Update-EmailAddressPolicy

 foreach ($i in $users)
 $upn=$i.FirstName + '@' + $Sid + ''
 $name = $i.FirstName + ' ' + $i.LastName
 New-Mailbox -Password $sp -DisplayName $name -UserPri $upn -Alias $i.FirstName -Name $name -OrganizationalUnit $i.OrganizationalUnit -LastName $i.LastName -FirstName $i.FirstName

New-SendConnector -Name 'Internet Send Connector' -Usage 'Internet' -DNSRoutingEnabled:$true -AddressSpaces @('SMTP:*;1') -IsScopedConnector:$false -SourceTransportServers @('QAEXHYBRIDEX')

New-Mailbox -Name PFMailbox1 -PublicFolder -OrganizationalUnit IT

'Executive','Finance','IT','Marketing','Operations','Research','Sales' | % {New-PublicFolder -Name $_} 

Get-PublicFolder -Recurse | where name -NotLike IPM_SUBTREE | Enable-MailPublicFolder

Module 6

Office 365 Enterprise E3

Module 8 – Configuring Directory Synchronization

AD Connect

IdFix DirSync Error Remediation Tool

Module 10 – Configuring the Hybrid Configuration Wizard for a Hybrid Exchange Environment

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Set-MailContact ITStaff -RequireSenderAuthenticationEnabled $true

Module 14 – Configuring On-Premises Public Folder Access in Exchange Online

Mail-enabled Public Folders – directory sync script

PowerShell Commands

## These command are run in the Exchange Management Shell
Set-Location C:\Scripts

$Creds = Get-Credential

.\Sync-MailPublicFolders.ps1 -Credential $Creds –CsvSummaryFile C:\Scripts\sync_summary.csv

## These commands need to be run in a new PowerShell window.
$UserCredential = Get-Credential

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

Import-PSSession $Session


Set-OrganizationConfig -PublicFoldersEnabled Remote -RemotePublicFolderMailboxes PFMailbox1