Are Exchange and AD cmdlets compatible?

This is one of the questions I get asked a lot: When and how would you use Exchange 2007 and AD cmdlets together?

The short answer is that the libraries are perfectly compatible and you can mix and match the cmdlets on one machine using the Exchange ones to manage Exchange-related objects/attributes and AD cmdlets for the rest.

For example, AD cmdlets don’t have all the mailbox data, but I can get this from Exchange cmdlets:

Get-QADUser DSotnikov | ForEach { Get-Mailbox $_.DN }

The opposite example would be when I need to reset a password for a mailbox owner – this is something I cannot do with Exchange cmdlets but can do with the QAD stuff:

Get-Mailbox DSotnikov | ForEach { Set-QADUser $_.Identity -UserPassword "M%NewP@ssw0rd" }

Note that instead of piping in the cmdlets directlyI am joining them with ForEach and using DN from AD, or Identity from Exchange to do the match.

System Requirements would be:

  1. Exchange 2007 management tools installed on the local computer (it does not have to be an Exchange server – just a computer with the Exchange 2007 Management Console).
  2. AD cmdlets (again, just the cmdlets installed locally – not necessarily on a DC.)
  3. Have both registered in the same PowerShell console. This can be done by running the following commands in the PowerShell prompt:

PS:\> Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
PS:\> Add-PSSnapin Quest.ActiveRoles.ADManagement

You obviously need to run just one of them if you are using a PowerShell console shipping with either of the cmdlet libraries so you simply add the other library.

If you want more information about Exchange 2007 cmdlets I would highly recommend to subscribe to Evan Dodd’s blog at http://blogs.technet.com/evand (and if you are at a conference with him presenting – make sure you attend the session or chalk-talk – I saw him at this TechEd and he was great!)

Tags: , , , , ,

About these ads

1 Response to “Are Exchange and AD cmdlets compatible?”



  1. 1 Weekend reading - subject: exchange Trackback on June 29, 2007 at 5:43 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




My Recent Tweets

Legal

The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

June 2007
M T W T F S S
« May   Jul »
 123
45678910
11121314151617
18192021222324
252627282930  

Follow

Get every new post delivered to your Inbox.

Join 2,329 other followers

%d bloggers like this: