PowerShell Tip: Fix All Failed Exchange Database Content Indexes

Failed content indexes can easily go unnoticed when everything else is working fine however they will eventually begin to cause problems for you, for example by preventing database switchovers.

Fixing a single failed content index is easy, but if there are multiple failed indexes you can speed things up a little by fixing them all with a single PowerShell command.

To demonstrate, display all database copies (on all mailbox servers) that have a content index in a failed state.
Get-MailboxServer | Get-MailboxDatabaseCopyStatus | `
where {$_.ContentIndexState -eq "Failed"}

To fix databases that have a content index in a failed state, pipe the output of this command into the Update-MailboxDatabaseCopy cmdlet with the -CatalogOnly switch.
#Get-MailboxServer | Get-MailboxDatabaseCopyStatus | `
where {$_.ContentIndexState -eq "Failed"} | Update-MailboxDatabaseCopy -CatalogOnly

Exam 70-663: Designing and Deploying Messaging Solutions with Microsoft Exchange Server 2010

General preparation material

Skills Measured (Microsoft Learning)
TechEd NA 2014: Exam Prep: 70-410
Windows Server 2012 Training: Technical Overview
Microsoft Practice Exam for 70-410 MSCert: Installing and Configuring Windows Server 2012 R2

Install and configure servers (15–20%)

1.1 Install Servers
Plan for a Server Installation (TechNet Library)
Plan for Server Roles (TechNet Library) Familiarize available Server Roles
Plan for a Server Upgrade (TechNet Library)
Server Core Overview (TechNet Library)
Install Server Core (TechNet Library)
Configure Features on Demand (TechNet Library)
Migrate Roles from Previous Versions of Windows Server (TechNet Library) Familiarize Server Migration Tools
Install, Use and Remove Windows Server Migration Tools (Whitepaper)
Demo: Installing Server Migration Tools (TechNet Library)

1.2 Configure servers
Configure Server Core (TechNet Library)
Delegate Administration (TechNet Library)
Add and Remove Server Roles and Features (TechNet Library)
Convert Server Core to/from Full "Server with GUI" (TechNet Library)
Configure Services (TechNet Library)
Step-by-Step: Automated Server Self-Provisioning and Remediation with DSC (Keith Mayer) (R2)

1.3 Configure local storage
Windows Server 2012 "Early Experts" Challenge - Exam 70-410 - Storage Spaces (Blog - IT Pros ROCK! at Microsoft Keith Mayer)
Configure Storage Pools and Disk Pools (TechNet Library)
Deploy and Manage Storage Spaces with PowerShell (TechNet Library)
How to Configure a Clustered Storage Space in Windows Server 2012 (TechNet Library)
Implementing Disk Management (TechNet Library)
Overview of Storage Spaces (Blog - Building Windows Blog)
Windows Server 2012 Storage Spaces: Is it for you? Could be… (TechNet Library)
Thin Provisioning and Trim Provisioning Overview (TechNet Library)
Step-by-Step: Automated Tiered Storage with Windows Server 2012 R2 (Keith Mayer) (R2)

Configure server roles and features (15–20%)

2.1 Configure file and share access
NTFS Shared Folders in Windows Server 2012 (TechNet Library)
Improve File Server Resiliency with ReFS in Windows Server 2012 (TechNet Library)
Volume Shadow Copy Service (VSS) Technical Reference (TechNet Library)
Disk Quotas Technical Reference (TechNet Library)
Step-by-Step: Creating a Work Folders Test Lab Deployment (Canadian IT Pro) (R2)
2.2 Configure Print and Document Services
Simplified Printing with Windows 8 and Windows Server 2012 (TechNet Library)
Print and Document Services Overview (TechNet Library)
Install Print and Document Services (TechNet Library)
Configure Print and Document Services (TechNet Library)
Branch Office Direct Printing Overview (TechNet Library)
Migrate Print and Document Services to Windows Server 2012 (TechNet Library)
Install and Configure High Availability Printing (TechNet Library)
2.3 Configure servers for remote management
Using the Windows Server 2012 Server Manager for Remote and Multi-Server Management (Session Wale Martins @ TechEd North America 2012)
Configure Remote Management in Server Manager (TechNet Library)
Configure Remote Management on Server Core (TechNet Library)
Managing Windows Server 2008 SP2 and R2 from Windows Server 2012 Server Manager (TechNet Library)
Add Servers to Server Manager (TechNet Library)
Create and Manage Server Groups (TechNet Library)
View and Configure Performance, Event, and Service Data (TechNet Library)
Filter, Sort, and Query Data in Server Manager Tiles (TechNet Library)
Run Best Practices Analyzer Scans and Manage Scan Results (TechNet Library)
Install or Uninstall Roles, Role Services or Features (TechNet Library)
Connecting to a Non-Domain Server with RSAT for Windows 8 (R2)

Configure Hyper-V (15–20%)

3.1 Create and configure virtual machine settings
Hyper-V Dynamic Memory Overview (TechNet Library)
Hyper-V Dynamic Memory Configuration Guide‎ (Intended for Windows Server 2008 R2 but conceptually applies to) (TechNet Library)
Windows Server 2012 Hyper-V Dynamic Memory Changes (Blog - Hyper-V MVP Aidan Finn)
Hyper-V Resource Metering Overview (TechNet Library)
Hyper-V Resource Metering in Windows server 2012 “Server 8 Beta” (Blog - Team blog of MCS @ Middle East and Africa)
I notice Windows Server 2012 virtual machines have a Smart Paging File Location–what is the Smart Paging File? (Article - Windows IT Pro)
Configuring Pass-through Disks in Hyper-V (TechNet Library)
Windows Server 2012 Hyper-V Storage (Session: Senthil Rajaram, Taylor Brown @ TechEd North America 2012)
What’s New in Hyper-V in Windows Server 2012 (TechNet Library)
See the storage related items on this page.
Hyper-V Scalability in Windows Server 2012 (TechNet Library)
See the storage related items on this page.
Support for Large Sector Disks Overview (TechNet Library)
Hyper-V Virtual Hard Disk Format Overview (TechNet Library)
Planning Virtual Disks and Storage (TechNet Library)
Configuring Virtual Disks and Storage (TechNet Library)
Connecting a Physical Hard Disk to a Virtual Machine (TechNet Library)
Virtual Fibre Channel Overview (TechNet Library)
Virtual Machine Storage Migration (TechNet Library)
Using Virtual Machine Snapshots, Pausing and Saving (TechNet Library)
Live Storage Migration (TechNet Wiki)
Create and Configure Generation 2 VMs (TechNet Library) (R2)
Configure and Use Enhanced Session Mode (TechNet Library) (R2)
3.2 Create and configure virtual machine storage
Configuring Pass-through Disks in Hyper-V (TechNet Library)
Windows Server 2012 Hyper-V Storage (Session: Senthil Rajaram, Taylor Brown @ TechEd North America 2012)
What’s New in Hyper-V in Windows Server 2012 (TechNet Library)
Hyper-V Scalability in Windows Server 2012 (TechNet Library)
Support for Large Sector Disks Overview (TechNet Library)
Hyper-V Virtual Hard Disk Format Overview (TechNet Library)
Planning Virtual Disks and Storage (TechNet Library)
Configuring Virtual Disks and Storage (TechNet Library)
Connecting a Physical Hard Disk to a Virtual Machine (TechNet Library)
Virtual Fibre Channel Overview (TechNet Library)
Virtual Machine Storage Migration (TechNet Library)
Using Virtual Machine Snapshots, Pausing and Saving (TechNet Library)
Live Storage Migration (TechNet Wiki)
Manage checkpoints – VM “Checkpoints” are the same as VM “Snapshots” in prior releases of Hyper-V
Configure Storage Quality of Service (QoS) (TechNet Library) (R2)
3.3 Create and configure virtual networks
Hyper-V Network Virtualization Overview (TechNet Library)
Hyper-V Virtual Switch Overview (TechNet Library)
Understand and Troubleshoot Hyper-V Virtual Network Switch-Whitepaper
What’s New in the Hyper-V Virtual Network Switch? (TechNet Library)
Hyper-V Virtual Network Switch Types Explained – External, Internal and Private (Blog - John Howard - Senior Program Manager Hyper-V Team)
Configuring Hyper-V Virtual Networks (TechNet Library)
Implementing Hyper-V Network Virtualization (Blog - IT Pros ROCK! at Microsoft Keith Mayer)
Q’s Common Configurations (TechNet Library)
Configure NIC Teaming in VMs (TechNet Library) (R2)

Deploy and configure core network services (15–20%)

4.1 Configure IPv4 and IPv6 addressing
IPv6 Bootcamp: Get Up to Speed Quickly (Session: Edward Horley @ TechEd North America 2012)
IPv4 – Core Network Guide (TechNet Library)
IPv6 Technology Overview (TechNet Library)
IPv6 Addressing At-A-Glance (TechNet Library)
Using Windows Tools to obtain IPv6 Configuration Information (TechNet Library)
Best Current Operational Practices on IPv6 Subnetting (TechNet Library)
Introduction to IPv6 Transition Technologies (TechNet Library)
Using IPv6 and Teredo (TechNet Library)
Intra-site Automatic Tunnel Addressing Protocol (ISATAP) Deployment Guide (Whitepaper)
Test Lab Guide – Implementing IPv6 (Test Lab Guide)
4.2 Deploy and configure Dynamic Host Configuration Protocol (DHCP) service
What is DHCP? (TechNet Library)
How DHCP Works (TechNet Library)
Authorize a DHCP Server (TechNet Library)
Create and configure scopes (TechNet Library)
Configure a DHCP reservation (TechNet Library)
Configure DHCP options (TechNet Library)
Configure a Client and Server for PXE Boot (BOOTP) (TechNet Library)
Configure IPv4 DHCP Relay Agent (TechNet Library)
New in Windows Server 2012 – DHCP Failover (Blog - IT Pros ROCK! at Microsoft Keith Mayer)
What’s New in DHCP in Windows Server 2012? (TechNet Library)
Configure DHCP for Failover (Blog - IT Pros ROCK! at Microsoft Keith Mayer)
Step-by-Step: Configure DHCP and Policy-based Assignment (TechNet Library)
Step-by-Step: Configure DHCP for Failover (TechNet Library)
4.3 Deploy and Configure DNS Service
How the Domain Name System (DNS) works (YouTube - Series/playlist by Barry Brown)
DNS Overview (TechNet Library)
What's New in DNS (TechNet Library)

Install and administer Active Directory (15–20%)

What's new in Active Directory Domain Services ( ADDS ) Installation (TechNet Library)
Install Active Directory Domain Services ( ADDS ) (TechNet Library)
Install a Domain Controller in an Existing Domain (TechNet Library)
Demoting Domain Controllers and Domains (TechNet Library)
Upgrading Domain Controllers to Windows Server 2012 (TechNet Library)
Virtualization-safe Technology and Domain Controller Cloning (Blog - IT Pros ROCK! at Microsoft Keith Mayer)
Step-by-Step: Install Active Directory Domain Services ( ADDS ) (Whitepaper)
Options for Building Active Directory in the Cloud with Windows Azure (Keith Mayer) (R2)
Active Directory & Windows Azure
Early Experts “Cloud Quest” with Windows Server Active Directory
Step-by-Step: Get Started with Windows Azure Active Directory (Keith Mayer) (R2)
5.2 Create and manage Active Directory users and computers
Overview of Active Directory Simplified Administration (TechNet Library)
Using the updated Active Directory Administration Center ( ADAC ) (TechNet Library)
5.3 Create and Manage Active Directory Groups and Organizational Units
Overview of Active Directory Simplified Administration (TechNet Library)
Using the updated Active Directory Administration Center ( ADAC ) (TechNet Library)

Create and manage Group Policy (15–20%)

What’s New in Group Policy in Windows Server 2012 (TechNet Library)
Group Policy Setting Reference for Windows 8 and Windows Server 2012 (TechNet Library)
Group Policy Cmdlets in Windows PowerShell 3.0 (TechNet Library)
Getting the Most Out of the Power of Group Policy (Session: Jeremy Moskowitz @ TechEd North America 2012)
Planning and Deploying Group Policy (TechNet Library)
Deploying and Managing OS and Application Settings with Group Policy Preferences (TechNet Library)
Planning and Deploying AppLocker via Active Directory Group Policy (TechNet Library)
Step-by-Step Guide: Deploying Windows Firewall via Active Directory Group Policy (TechNet Library)
Best Practices for Designing Group Policy for Performance and Security (Session: Darren Mar-Elia @ TechEd North America 2012)
Group Policy Analysis and Troubleshooting (TechNet Library)
Group Policy Update Utility (GPUPDATE) (TechNet Library)
Group Policy Resultant Set of Policy (RSoP) Utility (GPRESULT) (TechNet Library)
Group Policy Domain Fixup Utility (GPFIXUP) (TechNet Library)
Group Policy Reporting and Analysis with Windows PowerShell (Session: Jeffery Hicks, Jeremy Moskowitz @ TechEd North America 2012)
Total Desktop Lockdown: Your Action Plan (Session: Jeremy Moskowitz @ TechEd North America 2012)
Configuring Firewall Port Requirements for Group Policy (TechNet Library)
Configure an Internet Explorer 10 Item via Group Policy (TechNet Library)

https://borntolearn.mslearn.net/certification/server/w/wiki/491.410-installing-and-configuring-windows-server-2012

WMF 5.0 Preview now available

Continuing with the approach of regular updates to PowerShell V5, the PowerShell team recently published a new version. You can read about the version in the PowerShell team blog.

The download can be found at the Microsoft Download Center.

As noted in the team blog – this new version is only installable on Server 2012, Server 2012 R2 and Windows 8.1.

The download site has three .MSU files (one for each of the OS's mentioned) plus a set of release notes.

POWERSHELL - Message Dialog Box Function

<#
.SYNOPSIS
    This script creates a function to display a message
    in a message block and then demonstrates this function.
.DESCRIPTION
    This script uses Windows Forms to generate a message
    box containing text and a window title passed as 
    parameters
.NOTES
    File Name  : Pop-Message.ps1
    Author     : Jeremy Thompson
    Requires   : PowerShell Version 3.0
.LINK
    This script posted to:
        http://sysadmeanderings.blogspot.com/
.EXAMPLE
     C:\> .\Pop-Message.ps1
#>

Function Pop-Message {

 [CmdletBinding()]
 Param ( 
    [Parameter(Mandatory=$True, 
      HelpMessage="Content of Message box")]
    [string]$Message ,

    [Parameter(Mandatory=$False,
     HelpMessage="Title for Message box")]
    [string]$BoxTitle = "Message"
 )          

 # in case, load the relevant assembly
 $v1 = [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")

 # use the messagebox class to display the message
 [Windows.Forms.MessageBox]::Show($Message, $BoxTitle, 
     [Windows.Forms.MessageBoxButtons]::OK , 
     [Windows.Forms.MessageBoxIcon]::Information) 

 } # End of Pop-Message function

# call Pop-Message function
Pop-Message 'Hello World!' 'IMA Message Box'

POWERSHELL: Get infomation about email queue message counts

Quik check of all active Hub Transport queues:
$HubTransports=Get-ExchangeServer | Where {$_.ServerRole -like "*Hub*"}
$HubTransports| foreach {
 Get-Queue|ft }

Quik check of all active Hub Transport queues with a message count of 5 or more:
$HubTransports=Get-ExchangeServer | Where {$_.ServerRole -like "*Hub*"}
$HubTransports | foreach {
 Get-Queue -Filter {MessageCount -ge 5}}