0% found this document useful (0 votes)
3 views4 pages

Module 4 Managing Microsoft Exchange Server and Recipient Objects by Using Exchange Management Shell

The document outlines a lab scenario for managing Microsoft Exchange Server and recipient objects using the Exchange Management Shell. It details objectives, setup instructions, and exercises for efficiently managing Exchange recipients and server configurations through various PowerShell commands and scripting. The lab aims to enhance IT management processes at A. Datum organization as it grows in complexity.

Uploaded by

surafel amare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

Module 4 Managing Microsoft Exchange Server and Recipient Objects by Using Exchange Management Shell

The document outlines a lab scenario for managing Microsoft Exchange Server and recipient objects using the Exchange Management Shell. It details objectives, setup instructions, and exercises for efficiently managing Exchange recipients and server configurations through various PowerShell commands and scripting. The lab aims to enhance IT management processes at A. Datum organization as it grows in complexity.

Uploaded by

surafel amare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Module 4: Managing Microsoft Exchange Server and recipient

objects by using Exchange Management Shell


Lab: Managing Exchange Server and recipient objects by using Exchange
Management Shell
Scenario
As the A. Datum organization grows in size and complexity, it is becoming increasingly
apparent that you need to streamline some of the IT management processes. This
requirement includes managing the Exchange Server deployment. As A. Datum adds new
branch offices or acquires other companies, it is important that recipient management is
quick and efficient. Additionally, the server-management tasks need to be more consistent
and efficient.
You are the administrator at A. Datum, so to address these management issues, you must
be very familiar with the Exchange Management Shell and its use in managing the Exchange
Server organization. You need to understand how to run simple and complex commands,
and how to create scripts that automate many of your regular management tasks.

Objectives
After completing this lab, you will be able to:
 Manage Exchange recipients by using Exchange Management Shell.
 Manage and monitor Exchange Server by using Exchange Management Shell.

Lab Setup
For this lab, you will use the available virtual machine environment. Before you begin the
lab, complete the following steps:
1. On the host computer, click Start, point to Administrative Tools, and then click
Hyper-V Manager.
2. In Microsoft Hyper-V Manager, click EXC19-LON-DC1, and then in the Actions pane,
click Start.
3. In the Actions pane, click Connect. Wait until the virtual machine starts.
4. Sign in by using the following credentials:
 User name: Adatum\Administrator
 Password: Pa55w.rd
5. Repeat steps 2 and 3 for virtual machine EXC19-LON-EX1.

Exercise 1: Using Exchange Management Shell to manage recipients

One of the primary goals in adopting Exchange Management Shell is to manage recipients
more efficiently. You will explore the various Exchange Management Shell options for
managing recipient objects.
The main tasks for this exercise are as follows:
1. Import the Exchange Management Shell module into Windows PowerShell ISE
2. Explore the recipient-management cmdlets
3. Format the output of Exchange Management Shell
4. Use pipelining to manage multiple objects
5. Use variables and loops
6. Create a script for bulk-recipient management

 Task 1: Import the Exchange Management Shell module into Windows PowerShell ISE
1. Sign in to the LON-EX1 virtual machine with the user name Adatum\Administrator
and the password Pa55w.rd.
2. On the Start screen, type Windows PowerShell ISE, right-click Windows PowerShell
ISE, and then click Run as administrator.
3. In the console pane, type the following command, and then press Enter (To use the EMS
commands in powershell)

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapInc
Or
Import-Module 'C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1'; Connect-
ExchangeServer -auto -ClientApplication:ManagementShell
4. In the console pane, type the following command, and then press Enter to verify that
Exchange Management Shell cmdlets are available:
Get-ExCommand
 Task 2: Explore the recipient-management cmdlets
1. On LON-EX1, in the Windows PowerShell ISE console pane, type the following command,
and then press Enter (To list all cmdlets that include the term mailbox)
Get-Command *-Mailbox
2. To List all of the current mailboxes in the Exchange Server organization on the console
pane, type the following command, and then press Enter:
Get-Mailbox
3. To get Use Get-Help to list examples for how to use the Enable-Mailbox cmdlet.
In the console pane, type the following command, and then press Enter:

Get-Help Enable-Mailbox -Examples

Select No if prompted with Do you want to run Update-Help?


4. To Enable a mailbox for existing user account Holly Dickson, type the following
command, and then press Enter:
Enable-Mailbox ‘Holly Dickson’
 Task 3: Format the output of Exchange Management Shell
1. On LON-EX1, in the Windows PowerShell ISE console pane, type the following command,
and then press Enter to Use Measure-Object cmdlets to determine the number of mail user
objects in AD DS :
Get-Mailbox | Measure-Object
2. To return the Name, SamAccountName, and Department properties of all AD DS
mail objects
formatted as a table, type the following command, and then press Enter:
Get-Mailbox | Format-Table –Property Name,SamAccountName,Department -AutoSize
3. To Return the Name, SamAccountName, and Department properties of all AD Ds user
objects
formatted as a table, sorted alphabetically (A-Z) by Department, type the following
command, and then press Enter:
Get-Mailbox | Sort-Object Department | Format-Table –Property Name,SamAccountName,Department -
AutoSize
4. To Export the Name, SamAccountName, and Department properties of all AD DS user
objects to a .csv file. Save the file to C:\Get-User.csv, type the following command, and then
press Enter:

Get-User –RecipientTypeDetails User | Select Name,SamAccountName,Department | Export-


Csv C:\Get-User.csv -NoTypeInformation

 Task 5: Create a script for bulk-recipient management


1. On LON-EX1, select File, and then select New from the Windows PowerShell ISE menu
bar.
2. On line 1 of the new script tab, type the following:
Import-Module 'C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1'; Connect-
ExchangeServer -auto -ClientApplication:ManagementShell
3. On line 2 of the new script tab, type the following:
$csvdata = Import-Csv C:\Users\Administrator.ADATUM\Get-User.csv
4. On lines 3 through 8 of the new script ta
b, type the following(If the RecipientTypeDetails property of the $user object equals User and the department equals
Managers and the FirstName starts with the letter b, then enable a mailbox for that user account.)

foreach ($csvrow in $csvdata) {


$user = Get-User $csvrow.Name
if (($user.RecipientTypeDetails -eq 'User') -and ($user.Department -eq 'Managers') -and
($user.FirstName -like 'B*')) {
$user | Enable-Mailbox
}
}
5. Click File, and then click Save As.
6. Go to C:\.
7. In the File name text box, type Enable-Mailbox.ps1, and then click Save.
8. Click File, and then click Exit to exit Windows PowerShell ISE.
9. On the taskbar, right-click the Windows PowerShell icon, and then select Run as
Administrator.
10. Type the following command at the command prompt, and then press Enter( Copy all CSV
files from the root into the current folder.)
Copy c:\*.csv
11. Type the following command at the command prompt, and then press Enter:
. 'C:\Enable-Mailbox.ps1'
12. Close Windows PowerShell by typing the following command, and then pressing Enter:
exit

Results: After completing this exercise, you should have used the Exchange Management Shell
and performed basic recipient-management tasks.

Exercise 2: Using the Exchange Management Shell to manage Exchange Server


Exercise Scenario
You want to make server management more efficient by using the Exchange Management
Shell. You will explore the various Exchange Management Shell options to manage server
configuration.

The main tasks for this exercise are as follows:


1. Configure Exchange Server by using Exchange Management Shell
2. Test and monitor Exchange Server by using Exchange Management Shell
3. Create a script for database management
4. Prepare for the next module

 Task 1: Configure Exchange Server by using Exchange Management Shell


1. On LON-EX1,on the Start screen, type Windows PowerShell ISE, right-click Windows
PowerShell ISE, and then click Run as administrator.
2. In the console pane, type the following command, and then press Enter:
Import-Module 'C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1'; Connect-
ExchangeServer -auto -ClientApplication:ManagementShell
3. In the console pane, type the following command, and then press Enter:
New-MailboxDatabase –Server LON-EX1 –Name ‘Managers’
4. In the console pane, type the following command, and then press Enter:
Mount-Database ‘Managers’
5. In the console pane, type the following command, and then press Enter:
Restart-Service MSExchangeIS
6. In the console pane, type the following command, and then press Enter:
Get-MailboxDatabaseCopyStatus
 Task 2: Test and monitor Exchange Server by using Exchange Management Shell
1. On LON-EX1, in the Windows PowerShell ISE console pane, type the following command,
and then press Enter:
Test-ServiceHealth
Verify that RequiredServicesRunning is True for all roles.
2. In the console pane, type the following command, and then press Enter:
Stop-Service MSExchangeIS
3. In the console pane, type the following command, and then press Enter:
Test-ServiceHealth
Verify that RequiredServicesRunning is False for the Mailbox Server Role.
4. In the console pane, type the following command, and then press Enter:
Start-Service MSExchangeIS
5. In the console pane, type the following command, and then press Enter:
Test-ServiceHealth
Verify that RequiredServicesRunning is True for all roles.
 Task 3: Create a script for database management
1. On LON-EX1, in Windows PowerShell ISE, select File, and then click New.
2. On line 1 of the new script tab, type the following:
Import-Module 'C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1'; Connect-
ExchangeServer -auto -ClientApplication:ManagementShell
3. On line 2 of the new script tab, type the following:
Get-MailboxDatabase –Server LON-EX1 | Set-MailboxDatabase –DeletedItemRetention 30.00:00:00
4. Click File, and then click Save As.
5. Go to C:\.
6. In the File name text box, type Set-MailboxDatabase.ps1, and then click Save.
7. Click File, and then click Exit to exit Windows PowerShell ISE.
8. On the taskbar, right-click the Windows PowerShell icon, and then select Run as
Administrator.
9. Type the following command at the command prompt, and then press Enter:
. 'C:\Set-MailboxDatabase.ps1'
10. Close Windows PowerShell by typing the following command, and then pressing Enter:
exit
 Task 4: Prepare for the next module
When you finish the lab, revert the virtual machines to their initial state. To do this, perform
the following steps:
1. On the host computer, start Hyper-V Manager.
2. In the Virtual Machines list, right-click EXC19-LON-DC1, and then click Revert.
3. In the Revert Virtual Machine dialog box, click Revert.
4. Repeat steps 2 to 3 for EXC19-LON-EX1.

Results: After completing this exercise, you should have used the Exchange Management Shell
and performed basic server configuration tasks.

You might also like