20342A_09
-
Upload
bruno-martim-pereiro-romao -
Category
Documents
-
view
12 -
download
0
description
Transcript of 20342A_09
Microsoft® Official Course
Module 9
Managing Exchange Server 2013 with Exchange Management Shell
Module Overview
Overview of Windows PowerShell 3.0
Managing Exchange Server Recipients by Using the Exchange Management Shell•Managing Exchange Server 2013 with Exchange Management Shell
Lesson 1: Overview of Windows PowerShell 3.0
What’s New in Windows PowerShell 3.0
What Is Windows PowerShell ISE?
Windows PowerShell Modules
Demonstration: Adding Exchange Management Shell to Windows PowerShell ISE
How Can You Use Windows PowerShell Remotely?•Discussion: Benefits of Using Windows PowerShell to Manage Exchange Server 2013
What’s New in Windows PowerShell 3.0
•More than 260 core cmdlets•Management of all Windows Server roles and features•Windows PowerShell Workflow•Windows PowerShell Web Access•Scheduled Jobs•Enhanced Online Help• ISE IntelliSense•Robust Session Connectivity
What Is Windows PowerShell ISE?
You can use the ISE to run commands and to design, write, test, and debug scripts in a
Windows GUI
Windows PowerShell tabs
Script pane
Console pane Add-in Tools pane
IntelliSensesuggestions
Windows PowerShell Modules
You can extend Windows PowerShell by using modules• Import modules by using the Import-Module cmdlet:
Import-Module Hyper-V
• List loaded modules by running the following command:
Get-Module
• Modules can be of the following types:• Script• Binary
Demonstration: Adding Exchange Management Shell to Windows PowerShell ISE• In this demonstration, you will use the Windows PowerShell ISE to manage Exchange Server 2013
How Can You Use Windows PowerShell Remotely?
• The purpose of Windows PowerShell remoting is to: Connect to a remote computer Run one or more commands on that computer Bring those results back to your computer
• The goals of Windows PowerShell remoting are: Single-seat administration Batch administration Lightweight administration
• The three ways to use Windows PowerShell remoting are: One-to-one remoting One-to-many (or fan-out) remoting Many-to-one (or fan-in) remoting
Local Remote
Run command
Discussion: Benefits of Using Windows PowerShell to Manage Exchange Server 2013• For what tasks might you use Windows PowerShell to manage Exchange Server 2013?• For what tasks would you not use Windows PowerShell to manage Exchange Server 2013?
Lesson 2: Managing Exchange Server Recipients by Using the Exchange Management Shell
Accessing Help in Windows PowerShell
Windows PowerShell Pipelines
Options for Formatting Windows PowerShell Output
Demonstration: Managing Exchange Recipients by Using the Exchange Management Shell
Using Windows PowerShell Variables and Loops
Creating Exchange Management Shell Scripts
Discussion: Managing Exchange Recipients with Exchange Management Shell Scripts•Demonstration: Creating an Exchange Management Shell Script
Accessing Help in Windows PowerShell
• Use Get-Help or the alias help, followed by the cmdlet name, to view Help documentation
• Use Get-Help parameters to adjust the amount of help displayed. The parameters are:• -detailed• -examples • -full• -online
• Use Update-Help to download Help documentation
• Use Get-Command, Show-Command, and Show-ExCommand to discover new cmdlets
Get-Help Get-MailboxDatabase
Get-MailboxDatabase -help
Windows PowerShell Pipelines
Get-ADUser –Filter * | New-Mailbox New-Mailbox cmdlet
New-Mailbox cmdlet
Get-ADUser cmdlet
Get-ADUser cmdlet
• The pipeline connects the output from one cmdlet to the input of another cmdlet
• The combination of the first cmdlet, the pipeline operator (|), and the second cmdlet makes a pipeline
Process
object
Process
object
Pipe
Pipe
Options for Formatting Windows PowerShell Output
Cmdlets for formatting output
Cmdlets for manipulating output
Format-Table(FT)
Format-Table(FT)
Format-Custom
(FC)
Measure-Object
(measure)
Sort-Object (sort)
Select-Object (select)
Where-Object
(where)
Format-Wide(FW)
Demonstration: Managing Exchange Recipients by Using the Exchange Management Shell• In this demonstration, you will use Windows PowerShell to manage Exchange Server recipients
Using Windows PowerShell Variables and Loops
foreach ($user in $group){
write-host $user ” is in “ $group}
if ($Today.DayOfWeek = “Monday”) {
write-host “Today is Monday”}
while ($i -ne 25) {write-host $i “is not 25”}
for ($i=1; $i < 25; $i++) {
write-host $i “is not 25”}
Creating Exchange Management Shell Scripts
• An execution policy restricts script execution• The execution policies are:
• Restricted• AllSigned• RemoteSigned• Unrestricted• Bypass
• Scripts are text files with a .ps1 extension• Scripts contain one or more commands that you want the shell to execute in order• Scripts, when run, require a relative or full path to be specified:
.\Get-MailboxSizes.ps1E:\Labfiles\Mod09\Democode\Get-MailboxSizes.ps1
Discussion: Managing Exchange Recipients with Exchange Management Shell Scripts
•What tasks do you want to you create scripts for?•Are there tasks that cannot be scripted?
Demonstration: Creating an Exchange Management Shell Script
• In this demonstration, you will use a script to create new mailboxes
Lesson 3: Managing Exchange Server 2013 with Exchange Management Shell
Overview of Exchange Management Shell Cmdlets
Demonstration: Managing Server Configuration by Using Exchange Management Shell
Overview of Exchange Server 2013 Test Cmdlets
What Are Windows PowerShell Jobs?
Introduction to Windows PowerShell Workflows
Demonstration: Managing Exchange Servers by Using Scheduled Jobs and Workflows•Monitoring Exchange Servers by Using the Exchange Management Shell
Overview of Exchange Management Shell Cmdlets
Common Verbs Examples
Get Get-AddressListGet-Queue
Set Set-AddressListSet-AcceptedDomain
New New-AcceptedDomainNew-MailboxNew-MailboxDatabase
Add Add-AdPermissionAdd-IPAllowListEntry
Test Test-ExchangeSearchTest-ReplicationHealth
Remove Remove-AcceptedDomainRemove-AddressList
Demonstration: Managing Server Configuration by Using Exchange Management Shell• In this demonstration, you will see common management tasks performed by using the Exchange Management Shell
Overview of Exchange Server 2013 Test Cmdlets
•Test cmdlets use the Test verb•There are 35 Test cmdlets available for Exchange Server 2013•Can be used to manually test health•Can be used by monitoring software or scripts to automatically test health
What Are Windows PowerShell Jobs?
Background Jobs:• Performs extended tasks in the background• Performs tasks on multiple remote servers
Scheduled Jobs:• Runs registered background jobs on a schedule• Uses triggers to define a schedule
Introduction to Windows PowerShell Workflows
• You can use Windows PowerShell Workflow to:• Automate long-running and complex activities• Automate multiple server management and application provisioning• Resume, pause, and restart processes
• To create workflows, use Windows PowerShell or Visual Studio Workflow Designer
Demonstration: Managing Exchange Servers by Using Scheduled Jobs and Workflows• In this demonstration, you will use Windows PowerShell jobs to manage Exchange servers
Monitoring Exchange Servers by Using the Exchange Management Shell
•Get-Queue Returns information about the transport queues such as:• LastError• Status• LastRetryTime• NextRetryTime• MessageCount• DeliveryType
•Get-EventLog Returns events from the event log
Lab: Managing Exchange Server 2013 by Using Exchange Management Shell
Exercise 1: Exploring the Exchange Management Shell• Exercise 2: Using Exchange Management Shell to Manage Recipients
Logon Information
Virtual machines20342A-LON-DC120342A-LON-CAS120342A-LON-MBX1
User Name Adatum\AdministratorPassword Pa$$w0rd
Estimated Time: 60 minutes
Lab Scenario
As the A. Datum organization grows in size and complexity, it is becoming increasingly apparent that some of the IT management processes need to be streamlined. This requirement includes managing the Exchange Server deployment. As A. Datum adds new branch offices and acquires other companies, it is important that recipient management is quick and efficient. Also, the server management tasks need to be more consistent and efficient.
To address these management issues, you need to be familiar with the Exchange Management Shell and how to use it to manage the Exchange Server organization. You need to understand how to run simple and complex commands and how to create scripts that automate many of the regular management tasks.
Lab Review
What happens if you try to run an Exchange Server cmdlet and do not have the Exchange Management Shell module imported?•Why do you need to specify the DeletedItemRetention property for the Format-Table cmdlet?
Module Review and Takeaways
Review Questions
Tools
Best Practice•Common Issues and Troubleshooting Tips