You are previewing Microsoft Exchange Server PowerShell Essentials.
O'Reilly logo
Microsoft Exchange Server PowerShell Essentials

Book Description

Leverage the power of basic Windows PowerShell scripts to manage your Exchange messaging environment

About This Book

  • Get to grips with Windows PowerShell and how it can be used to manage various aspects of the operating system and applications

  • Become proficient in PowerShell and apply it to manage Exchange infrastructure on-premise or via Exchange Online as part of Office 365

  • Learn to create Windows PowerShell scripts to do administrative tasks with this step-by-step, easy-to-follow guide

  • Who This Book Is For

    This book is for administrators with a basic or limited understanding of Windows PowerShell and who want to increase their skill set in managing both the Exchange On Premise and Online environments.

    What You Will Learn

  • Deep dive into the Windows PowerShell basics

  • Create and manage Recipients and permissions

  • Manage Distribution Group members, permissions, and group types

  • Understand Certificates and Role-Based Access Control using real-world examples

  • Review the usage of email address, address book, and retention policies with examples

  • Learn to manage Exchange Client Access and Mailbox Server roles

  • Use PowerShell for auditing and risk management in your Exchange organization

  • Manage a highly available Exchange environment using PowerShell

  • Interact with Exchange through the use of the Exchange Web Services-managed API

  • In Detail

    PowerShell has become one of the most important skills in an Exchange administrator's armory. PowerShell has proved its mettle so widely that, if you're not already starting to learn PowerShell, then you're falling behind the industry. It isn't difficult to learn PowerShell at all. In fact, if you've ever run commands from a CMD prompt, then you'll be able to start using PowerShell straightaway.

    This book will walk you through the essentials of PowerShell in Microsoft Exchange Server and make sure you understand its nitty gritty effectively.

    You will first walk through the core concepts of PowerShell and their applications. This book discusses ways to automate tasks and activities that are performed by Exchange administrators and that otherwise take a lot of manual effort.

    Microsoft Exchange PowerShell Essentials will provide all the required details for Active Directory, System, and Exchange administrators to help them understand Windows PowerShell and build the required scripts to manage the Exchange Infrastructure.

    Style and approach

    This book is written with its target audience in mind; concepts are explained and followed by real-life examples. A comprehensive script is provided in each chapter to give you hands-on practice with all the major commands used in it.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the code file.

    Table of Contents

    1. Microsoft Exchange Server PowerShell Essentials
      1. Table of Contents
      2. Microsoft Exchange Server PowerShell Essentials
      3. Credits
      4. About the Author
      5. About the Reviewer
        1. eBooks, discount offers, and more
          1. Why subscribe?
          2. Instant updates on new Packt books
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      8. 1. Getting Started with PowerShell
        1. Introducing Windows PowerShell
        2. Understanding PowerShell syntax
        3. Understanding the help system
          1. The Help parameter (?)
          2. The Get-Help cmdlet
        4. Understanding Logging and Transcripts
        5. Using variables
          1. Assignment operators
          2. Comparison operators
        6. Using pipelines
        7. Using loops
          1. The Do loop
          2. ForEach loops
          3. While loops
        8. Using arrays
          1. Retrieving values from an array
        9. Using filters and exporting data
        10. Using If statements
        11. Switch statements
        12. Writing a basic script
        13. Summary
      9. 2. Learning Recipient Management
        1. Managing users
          1. Creating a Mailbox for a new user
          2. Creating a new user in Active Directory and a new mailbox for the user
          3. Enabling mailbox for an existing user in Active directory
        2. Managing permissions
          1. Manage Full Access permissions
          2. Manage Send As permission
          3. Manage Send On Behalf permission
        3. Managing folder/calendar permission
        4. Managing room mailboxes
        5. Import export of objects
          1. Import user accounts in bulk using a CSV file
          2. Import external contacts in bulk using a CSV file
          3. Exporting objects to a CSV file
        6. Connecting from Remote computers
          1. Connecting to a remote Exchange 2013/2016 Server
          2. Connecting to Exchange online
          3. Troubleshooting Remote PowerShell session connectivity
        7. Mailbox reporting
        8. Automation with scripting agents
          1. Scenario 1
          2. Scenario 2
        9. Writing a basic script
          1. Scheduling your task
        10. Summary
      10. 3. Handling Distribution Groups
        1. Introducing distribution groups
        2. Managing distribution groups
          1. Distribution Group naming policy
          2. Creating Distribution Groups
          3. Changing Distribution Group properties
        3. Managing distribution group permissions
          1. Scenario
        4. Managing distribution group members
        5. Converting group types
        6. Automation with dynamic Distribution groups
          1. Dynamic Distribution group properties
        7. Writing an advance script
        8. Summary
      11. 4. Exchange Security
        1. Components of Role Based Access Control
        2. Managing Role Based Access Control
          1. Where (scope)
          2. What (role)
          3. Who (Role Group)
          4. Role assignment
        3. Managing exchange certificates
          1. Types of Certificates
          2. Steps to manage certificates
            1. Step 1 – generating a certificate
            2. Step 2 – importing the certificate
            3. Step 3 – assigning services to the new certificate
        4. Managing Application Relaying emails
        5. Managing External access of Exchange Admin Center
        6. Writing a basic script
        7. Summary
      12. 5. Everything about Microsoft Exchange Policies
        1. Introducing Exchange Policies
        2. Creating and managing E-mail Address Policies
        3. Creating and managing Address Book policies
        4. Creating and managing Retention Policies
        5. Writing a basic script
        6. Summary
      13. 6. Handling Exchange Server Roles
        1. Configuring POP, IMAP, ActiveSync, and Outlook Anywhere
          1. Configuring ActiveSync
          2. Configuring Outlook Anywhere
        2. Managing Client Access Servers
        3. Managing transport connectors
          1. Send connector
          2. Receive connector
        4. Managing DSN Messages
        5. Managing Message tracking logs
        6. Managing transport queues
          1. Examples
        7. Managing Public Folder Mailboxes
        8. Writing a basic script
        9. Summary
      14. 7. Auditing and E-Discovery
        1. New features in Exchange 2016
        2. The In-Place hold
        3. Retrieving and exporting e-mails for Auditing using In-Place E-discovery
        4. Retrieving content using KQL queries
        5. Searching and removing e-mails from the server
        6. Enable Auditing and understanding its usage
          1. Administrator audit logs
          2. Mailbox audit logs
        7. Writing a basic script
        8. Summary
      15. 8. Managing High Availability
        1. Managing Database Availability Groups
          1. DAG Quorum model
          2. Creating DAG and adding/removing members
          3. DAG networks
          4. Adding/removing Database copies
        2. Managing Database Copies
          1. Suspending/resuming Database copies
          2. Database Seeding
          3. Retrieving and setting Database configuration
        3. Controlling high availability failover mechanisms
        4. Database Availability Group health checks
        5. Database Availability Group Maintenance tasks
        6. Writing a basic script
        7. Summary
      16. 9. Exploring EWS Managed API
        1. Introducing Exchange Web Services
        2. Understanding the EWS managed API
        3. Writing basic EWS managed API code
        4. Creating custom folders in Mailboxes
        5. Writing a basic script
        6. Summary
      17. 10. Common Administration Tasks
        1. Managing Active Sync devices
        2. Managing Databases
        3. Managing Transport rules and adding disclaimers
        4. Managing Non-Delivery Reports
        5. Managing Active Directory Attributes
        6. Removing old log files
        7. Health check commands
          1. Test-ActiveSyncConnectivity
          2. Test-ReplicationHealth
          3. Test-OutlookWebServices
          4. Get-Server Health
        8. Summary
      18. Index