Transcription of Microsoft Exchange Cookbook
1 Microsoft Exchange Server PowerShell CookbookThird EditionOver 120 recipes to help you manage and administrate Exchange Server 2013 Service Pack 1 with PowerShell 5 Jonas AnderssonMike PfeifferBIRMINGHAM - MUMBAIM icrosoft Exchange Server PowerShell CookbookThird EditionCopyright 2015 Packt PublishingAll rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied.
2 Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this published: July 2011 Second edition: May 2013 Third edition: July 2015 Production reference: 1240715 Published by Packt Publishing Place35 Livery StreetBirmingham B3 2PB, AnderssonMike PfeifferReviewersMark AndrewsHakim TaoussiCommissioning EditorAmarabha BanerjeeAcquisition EditorVivek AnantharamanContent Development EditorMamata WalkarTechnical EditorDhiraj ChandanshiveCopy EditorRashmi SawantProject CoordinatorSanjeet RaoProofreaderSafis EditingIndexerHemangini BariProduction CoordinatorShantanu N.
3 ZagadeCover WorkShantanu N. ZagadeAbout the AuthorsJonas Andersson is a devoted person who is constantly developing himself and his skills. He started out in the IT business in 2004 and initially worked in a support center, where he got basic knowledge of the industry. In 2007, he started his career as a Microsoft Infrastructure consultant, and from 2008 onward, his focus has been on Microsoft though his focus is on Microsoft Exchange , his interests include migrations, backup, storage, archiving, and so on. At the start of 2010, he was employed at a large outsourcing company as a messaging specialist, specializing in Microsoft Exchange . His work includes designing, implementing, and developing messaging solutions for enterprise unique knowledge makes him a key figure in large and complex migration projects, where he works on design and implementation.
4 Examples of these projects include migrations from the IBM Domino mail platform to Microsoft Exchange 2007/2010/2013 and Office 365, using Quest Software with full coexistence between the systems for mail flow, directory synchronization, and free busy 2014, he joined Microsoft Consulting Services, and from then onward, his focus has been on Office 365 but also on-premises Exchange Server. At the start of 2015, he changed his role to a deployment consultant with Microsoft 's Office 365 Global Practice EMEA writes articles on his blog ( ), Twitter, and other forms of social a reward for his work in the community, he was awarded the Microsoft Most Valuable Professional for the Microsoft Exchange Server product in 2014. He was also awarded the Microsoft Community Contributor Award in both 2011 and is my second book.
5 It's been a great experience and a great honor to once again get the opportunity to write an update of a book that Mike Pfeiffer initially wrote for Microsoft Exchange 2010. When writing this book, I've had a lot of help from my sidekicks: Hakim Taoussi, Steve Goodman, and Mark Andrews. I look forward to continuing with these kinds of side projects alongside my regular are a lot of people I would like to thank: firstly of course, my family, for the love and energy they keep giving me. Besides my family, I would like to thank Hakim Taoussi, Steve Goodman, and Mark Andrews for doing a great job on the technical reviews. I received lots of great feedback, which improved the content of this hope that you will enjoy the book and its content will help you develop your skills in the Pfeiffer is an accomplished IT architect, consultant, and conference speaker, with over 15 years of experience in the tech industry.
6 He has published books, blogs, white papers, and training courses on a variety of topics related to infrastructure architecture, deployment automation, configuration management, and more. He has a passion for technology and enjoys learning as much as writing and the ReviewersMark Andrews has had a varied career in technology. Over the last 18 years, he has held several different positions, ranging from customer service to quality assurance. Throughout all of these positions, the responsibility of configuration management and build management has always fallen either on him personally or on one of the groups that he managed. Because of his "keeping a hand in" management style, he has been closely involved with the scripting and automation framework for these areas.
7 Creating scripted frameworks that intercommunicate across machine/operating system/domain boundaries is his has worked on PowerShell Advanced Administration Handbook, Windows PowerShell for .NET Developers, and PowerShell for SQL Server Essentials, all by Packt Taoussi is passionate about technologies, more specifically, Microsoft ones. He started early in the world of Microsoft messaging systems with MS Mail and Exchange and went through all the versions to the actual ones, Exchange Server 2013/ Exchange is currently working at Nelite as a consultant/architect. He is involved in many migration and integration projects to/of Microsoft Exchange Server and Office files, eBooks, discount offers, and moreFor support files and downloads related to your book, please visit you know that Packt offers eBook versions of every book published, with PDF and ePub files available?
8 You can upgrade to the eBook version at and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at for more , you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of subscribe? fFully searchable across every book published by Packt fCopy and paste, print, and bookmark content fOn demand and accessible via a web browserFree access for Packt account holdersIf you have an account with Packt at , you can use this to access PacktLib today and view 9 entirely free books.
9 Simply use your login credentials for immediate updates on new Packt booksGet notified! Find out when new books are published by following @PacktEnterprise on Twitter or the Packt Enterprise Facebook of ContentsPreface viiChapter 1: PowerShell Key Concepts 1 Introduction 2 Using the help system 3 Understanding command syntax and parameters 7 Understanding the pipeline 12 Working with variables and objects 15 Working with arrays and hash tables 20 Looping through items 25 Creating custom objects 28 Using debugger functions 32 Understanding the new execution policy 35 Working with Desired State Configuration 38 Using the Save-Help function 43 Working with script repositories 45 Chapter 2.
10 Exchange Management Shell Common Tasks 49 Introduction 49 Manually configuring remote PowerShell connections 51 Using explicit credentials with PowerShell cmdlets 55 Transferring files through remote shell connections 57 Managing domains or an entire forest using the recipient scope 59 Exporting reports to text and CSV files 61 Sending SMTP e-mails through PowerShell 64 Scheduling scripts to run at a later time 67 Logging shell sessions to a transcript 70 Automating tasks with the scripting agent 71 Scripting an Exchange server installation 74iiTable of ContentsChapter 3: Managing Recipients 77 Introduction 77 Adding, modifying, and removing mailboxes 78 Working with contacts 82 Managing distribution groups 84 Managing resource mailboxes 87 Creating recipients in bulk using a CSV file 89 Working with recipient filters 93 Adding and removing recipient e-mail addresses 96 Hiding recipients from address lists 99 Configuring recipient moderation 100 Configuring message delivery restrictions 103 Managing automatic replies and Out of Office settings for a user 105 Adding, modifying.