PacktLib: Microsoft Exchange 2010 PowerShell Cookbook

Microsoft Exchange 2010 PowerShell Cookbook


About the Author

About the Reviewers


PowerShell Key Concepts


Understanding command syntax and parameters

Using the help system

Understanding the pipeline

Working with variables and objects

Formatting output

Working with arrays and hash tables

Looping through items

Using flow control statements

Creating custom objects

Creating PowerShell functions

Creating and running scripts

Setting up a profile

Exchange Management Shell Common Tasks


Using command discovery through the Exchange Management Console

Manually configuring remote PowerShell connections

Transferring files through remote shell connections

Dealing with concurrent pipelines in remote PowerShell

Managing domains or an entire forest using recipient scope

Using explicit credentials with PowerShell cmdlets

Exporting reports to text and CSV files

Sending SMTP e-mails through PowerShell

Scheduling scripts to run at a later time

Logging shell sessions to a transcript

Automating tasks with the scripting agent

Scripting an Exchange server Installation

Managing Recipients


Adding, modifying, and removing mailboxes

Working with contacts

Managing distribution groups

Managing resource mailboxes

Creating recipients in bulk using a CSV file

Working with recipient filters

Adding and removing recipient e-mail addresses

Hiding recipients from address lists

Configuring recipient moderation

Configuring message delivery restrictions

Managing automatic replies and out of office settings for a user

Adding, modifying, and removing server-side inbox rules

Managing mailbox folder permissions

Importing user photos into Active Directory

Managing Mailboxes


Performing some basic steps

Reporting on the mailbox size

Working with move requests and performing mailbox moves

Importing and exporting mailboxes

Deleting messages from mailboxes

Managing disconnected mailboxes

Generating mailbox folder reports

Reporting on mailbox creation time

Checking mailbox logon statistics

Setting storage quotas for mailboxes

Finding inactive mailboxes

Detecting and fixing corrupt mailboxes

Restoring deleted items from mailboxes

Distribution Groups and Address Lists


Reporting on distribution group membership

Adding members to a distribution group from an external file

Previewing dynamic distribution group membership

Excluding hidden recipients from a dynamic distribution group

Converting and upgrading distribution groups

Allowing managers to modify group membership

Removing disabled user accounts from distribution groups

Working with distribution group naming policies

Working with distribution group membership approval

Creating address lists

Exporting address list membership to a CSV file

Configuring hierarchical address books

Mailbox and Public Folder Databases


Managing the mailbox and the public folder databases

Moving databases and logs to another location

Configuring the mailbox and public folder database limits

Reporting on mailbox database size

Finding the total number of mailboxes in a database

Determining the average mailbox size per database

Reporting on database backup status

Restoring data from a recovery database

Configuring public folder replication

Managing user access to public folders

Reporting on public folder statistics

Managing Client Access


Creating an RPC Client Access array

Configuring the CAS server used by RPC clients

Configuring RPC encryption requirements

Managing ActiveSync, OWA, POP3, and IMAP4 mailbox settings

Setting internal and external CAS URLs

Managing Outlook Anywhere settings

Blocking Outlook clients from connecting to Exchange

Reporting on active OWA and RPC connections

Controlling ActiveSync device access

Reporting on ActiveSync devices

Managing Transport Servers


Managing connectors

Configuring transport limits

Allowing application servers to relay mail

Managing transport rules

Working with custom DSN messages

Managing connectivity and protocol logs

Message tracking logs

Working with messages in transport queues

Searching anti-spam agent logs

Implementing a header firewall

High Availability


Building a Windows NLB cluster for CAS servers

Creating a Database Availability Group

Adding mailbox servers to a Database Availability Group

Configuring Database Availability Group network settings

Adding mailbox copies to a Database Availability Group

Activating mailbox database copies

Working with lagged database copies

Reseeding a database copy

Performing maintenance on Database Availability Group members

Reporting on database status, redundancy, and replication

Exchange Security


Granting users full access permissions to mailboxes

Finding users with full access to mailboxes

Sending e-mail messages as another user or group

Working with Role Based Access Control (RBAC)

Creating a custom RBAC role for administrators

Creating a custom RBAC role for end users

Troubleshooting Role Based Access Control

Generating a certificate request

Installing certificates and enabling services

Importing certificates on multiple exchange servers

Compliance and Audit Logging


Managing archive mailboxes

Configuring archive mailbox quotas

Creating retention tags and policies

Applying retention policies to mailboxes

Placing mailboxes on retention hold

Performing a discovery search

Placing mailboxes on litigation hold

Enabling mailbox audit logging

Generating mailbox audit log reports

Configuring Administrator Audit Logging

Searching administrator audit logs

Server Monitoring and Troubleshooting


Managing and monitoring services

Verifying server connectivity

Working with the event logs

Reporting on disk usage

Checking CPU utilization

Monitoring memory utilization

Reporting on Exchange Server uptime

Troubleshooting the Mailbox role

Troubleshooting the Client Access Server role

Troubleshooting Transport servers

Verifying certificate health

Scripting with the Exchange Web Services Managed API


Performing some basic steps

Getting connected to EWS

Sending e-mail messages with EWS

Working with impersonation

Searching mailboxes

Retrieving the headers of an e-mail message

Deleting e-mail items from a mailbox

Creating calendar items

Exporting attachments from a mailbox

Exchange Management Shell reference

Exchange Management Shell reference

Exchange Management Shell reference

Exchange Management Shell reference

Exchange Management Shell reference

Exchange Management Shell reference

Advanced Query Syntax

Advanced Query Syntax

Advanced Query Syntax

Advanced Query Syntax

Advanced Query Syntax