Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft Exchange Server Powershell Cookbook (Update)

You're reading from   Microsoft Exchange Server Powershell Cookbook (Update) Over 120 recipes to help you manage and administrate Exchange Server 2013 Service Pack 1 with PowerShell 5

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher
ISBN-13 9781785288074
Length 464 pages
Edition 1st Edition
Arrow right icon
Toc

Table of Contents (16) Chapters Close

Preface 1. PowerShell Key Concepts FREE CHAPTER 2. Exchange Management Shell Common Tasks 3. Managing Recipients 4. Managing Mailboxes 5. Distribution Groups and Address Lists 6. Mailbox Database Management 7. Managing Client Access 8. Managing Transport Servers 9. High Availability 10. Exchange Security 11. Compliance and Audit Logging 12. Scripting with the Exchange Web Services Managed API A. Common Shell Information B. Query Syntaxes Index

Introduction

So, your organization has decided to move to Exchange Server 2013 to take advantage of the many exciting new features, such as integrated e-mail archiving, discovery capabilities, and high availability functionality. Like it or not, you've realized that PowerShell is now an integral part of Exchange Server management, and you need to learn the basics to have a point of reference to build your own scripts. That's what this book is all about. In this chapter, we'll cover some core PowerShell concepts that will provide you with a foundation of knowledge to use the remaining examples in this book. If you are already familiar with PowerShell, you may want to use this chapter as a review or as a reference for later use after you've started writing scripts.

If you're completely new to PowerShell, its concept may be familiar if you've worked with UNIX command shells. Like UNIX-based shells, PowerShell allows you to string multiple commands together on one line using a technique called pipelining. This means that the output of one command becomes the input for another. However, unlike UNIX shells that pass the text output from one command to another, PowerShell uses an object model based on the .NET Framework, and objects are passed between commands in a pipeline, as opposed to plain text. From an Exchange perspective, working with objects gives us the ability to access very detailed information about servers, mailboxes, databases, and more. For example, every mailbox you manage within the shell is an object with multiple properties, such as an e-mail address, database location, or send and receive limits. The ability to access this type of information through simple commands means that we can build powerful scripts that generate reports, make configuration changes, and perform maintenance tasks with ease.

Tip

This book is based on the Windows Management Framework (WMF) 5.0 preview that was released in November 2014. Since this is a preview, the functionality may change in RTM and over time.

During the writing of this book, WMF 5.0 was not supported for Exchange 2013. This will probably change when the RTM gets released.

Performing some basic steps

To work with the code samples in this chapter, follow these steps to launch the Exchange Management Shell:

  1. Log on to a workstation or server with the Exchange Management Tools installed.
  2. You can connect using remote PowerShell, if you for some reason you don't have the Exchange Management Tools installed. Use the following command:
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange 
    -ConnectionUri http://tlex01/PowerShell/ 
    -Authentication Kerberos
    Import-PSSession $Session
    
  3. Open the Exchange Management Shell by navigating to Start | All Programs | Microsoft Exchange Server 2013. Or if you're using Windows Server 2012 R2, it can be found in the Apps list by clicking on the Start button and the arrow.
  4. Click on the Exchange Management Shell shortcut.

Tip

Remember to start the Exchange Management Shell using Run as administrator to avoid permission problems.

In the chapter, notice that in the examples of cmdlets, I used the back tick (`) character for breaking up long commands into multiple lines. The purpose is to make it easier to read. The back ticks are not required and should only be used if needed. Notice that the Exchange variables, such as $exscripts, are not available when using the preceding method.

You have been reading a chapter from
Microsoft Exchange Server Powershell Cookbook (Update)
Published in: Jul 2015
Publisher:
ISBN-13: 9781785288074
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image