Practice 1
This guide shows you how to configure Exchange Server with PowerShell - Option 1
10-15 min
Practice 1
Objectives
- Configure Exchange Server with PowerShell
- Create and manage mailboxes
- Configure transport rules
- Implement high availability
Prerequisites
- An installed Exchange Server 2019 server
- A functioning domain controller
- Exchange administrator rights
Exercises
1. Initial configuration
# Créer une base de données de boîtes aux lettres
New-MailboxDatabase -Name "DB01" -EdbFilePath "C:\Exchange\DB01\DB01.edb" -LogFolderPath "C:\Exchange\DB01\Logs"
Mount-Database -Identity "DB01"
# Créer des boîtes aux lettres utilisateurs
$Users = @(
@{Name="John Doe"; Alias="john.doe"; Email="john.doe@lab.lan"},
@{Name="Jane Smith"; Alias="jane.smith"; Email="jane.smith@lab.lan"},
@{Name="Bob Wilson"; Alias="bob.wilson"; Email="bob.wilson@lab.lan"}
)
foreach ($User in $Users) {
New-Mailbox -UserPrincipalName $User.Email -Alias $User.Alias -Database "DB01" -Name $User.Name -FirstName $User.Name.Split(" ")[0] -LastName $User.Name.Split(" ")[1] -DisplayName $User.Name -Password (ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force)
}