QADEXHE

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 AdatumQAxxxx.QAExHybrid.com -InternalHostname AdatumQAxxxx.QAExHybrid.com -ExternalClientsRequireSsl $true -InternalClientsRequireSsl $true -DefaultAuthenticationMethod NTLM

Get-MAPIVirtualDirectory | Set-MAPIVirtualDirectory -ExternalUrl https://AdatumQAxxxx.QAExHybrid.com/mapi -InternalUrl https://AdatumQAxxxx.QAExHybrid.com/mapi

Get-OwaVirtualDirectory | Set-OwaVirtualDirectory -ExternalUrl https://AdatumQAxxxx.QAExHybrid.com/owa -InternalUrl https://AdatumQAxxxx.QAExHybrid.com/owa

Get-EcpVirtualDirectory | Set-EcpVirtualDirectory -ExternalUrl https://AdatumQAxxxx.QAExHybrid.com/ecp -InternalUrl https://AdatumQAxxxx.QAExHybrid.com/ecp

Get-ActiveSyncVirtualDirectory | Set-ActiveSyncVirtualDirectory -ExternalUrl https://AdatumQAxxxx.QAExHybrid.com/Microsoft-Server-ActiveSync -InternalUrl https://AdatumQAxxxx.QAExHybrid.com/Microsoft-Server-ActiveSync

Get-WebServicesVirtualDirectory | Set-WebServicesVirtualDirectory -ExternalUrl https://AdatumQAxxxx.QAExHybrid.com/EWS/Exchange.asmx -InternalUrl https://AdatumQAxxxx.QAExHybrid.com/EWS/Exchange.asmx -Force

Get-OabVirtualDirectory | Set-OabVirtualDirectory -ExternalUrl https://AdatumQAxxxx.QAExHybrid.com/OAB -InternalUrl https://AdatumQAxxxx.QAExHybrid.com/OAB

Get-ClientAccessServer | Set-ClientAccessServer -AutoDiscoverServiceInternalUri https://AdatumQAxxxx.QAExHybrid.com/Autodiscover/Autodiscover.xml

<# Better command, but does not work with Exchange 2013
Get-ClientAccessService | Set-ClientAccessService -AutoDiscoverServiceInternalUri https://AdatumQAxxxx.QAExHybrid.com/Autodiscover/Autodiscover.xml
#>

Get-ClientAccessService | Select Name,AutoDiscoverServiceInternalURI

IISReset

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="$Sid.QAExHybrid.com"}


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

$OUs | foreach {New-ADOrganizationalUnit $_}

$UsersCSV = `
 'FirstName,LastName,OrganizationalUnit' ,
 'Kim,Abercrombie,Executive',
 'Josh,Barnhill,Executive',
 'David,Campbell,Executive',
 'Brenda,Diaz,Finance',
 'Micheal,Emanuel,Finance',
 'Charles,Fitzgerald,Finance',
 'Jon,Ganio,Marketing',
 'Don,Hall,Marketing',
 'Lisa,Jacobson,Marketing',
 'John,Kelly,Marketing',
 'Jolie,Lenehan,Finance',
 'Sandra,Martinez,IT',
 'Lorraine,Nay,IT',
 'Harrold,Ortiz,IT',
 'Jeff,Price,IT',
 'Randy,Reeves,Sales',
 'Megan,Sherman,Sales',
 'Danielle,Tiedt,Sales',
 'Garrett,Vargas,Research',
 'Bryan,Walton,Research',
 'Tom,Young,Research'

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


new-aduser -GivenName Adam -Surname Able -UserPrincipalName "Adam@adam@$sid.qaexhybrid.com" -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 "$Sid.QAExHybrid.com" -DomainName "$Sid.QAExHybrid.com" -DomainType 'Authoritative'

Get-EmailAddressPolicy | Set-EmailAddressPolicy -EnabledEmailAddressTemplates @("SMTP:%m@$sid.QAExHybrid.com") 

Get-EmailAddressPolicy | Update-EmailAddressPolicy

 foreach ($i in $users)
{
 $upn=$i.FirstName + '@' + $Sid + '.QAExHybrid.com'
 $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 https://outlook.office365.com/powershell-liveid/ -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 https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

Get-MailPublicFolder

Set-OrganizationConfig -PublicFoldersEnabled Remote -RemotePublicFolderMailboxes PFMailbox1