List all you OUs with Windows Powershell

Was asked how to do this today, and here you go ……

$search = [System.DirectoryServices.DirectorySearcher]([adsi]””)
$search.Filter = “(objectClass=organizationalUnit)”
$search.Findall() | ForEach{$}

This will list all the DN’s of the OUs in your AD

Now if you want to get clever, the resulting data lists the path, and then a set of properties:


So this was a tweak to my earlier script to find out if an OU had “Include inheritable permissions from this objects parent” checked. So it looks like this now:

Function Get-Ou ($xOU){
    Write-Host $ -Foregroundcolor Red -NoNewLine
    Write-Host ” : ” -NoNewLine
    $yOU = $xOU.Path
    $yOUPath = $yOU.ToString()
    $zOU = [ADSI]”$yOUPath”

$search = [System.DirectoryServices.DirectorySearcher]([adsi]””)
$search.Filter = “(objectClass=organizationalUnit)”
$ALLOUs = $search.Findall()
ForEach($xOu in $ALLOUs){Get-OU $xOU}


Exchange 2010 TechNet Webcasts

Check these babies out!


Monday, June 01, 2009: TechNet Webcast: Exchange 2010 High Availability (Level 300) 
Welcome to the future!  The future of Exchange high availability, that is.  In this webcast, we reveal the changes and improvements to the built-in high availability platform in Exchange Server 2010.  Exchange 2010 includes a unified framework for high availability and disaster recovery that is quick to deploy and easy to manage. Learn about all of the new features in Exchange 2010 that make it the most resilient, highly available version of Exchange ever.

Wednesday, June 03, 2009: TechNet Webcast: Exchange 2010 Overview (Level 200)
This webcast will introduce you to Exchange Server 2010, reviewing the major areas of investment for this release and highlighting marquee features.
Monday, June 08, 2009: TechNet Webcast: Exchange 2010 Management Tools (Level 300) 
Exchange 2010 includes new capabilities that make the operation of your Exchange environment more efficient.   Learn how we’ve made the Exchange Management Console more powerful, extended the reach of PowerShell, and made it easier to delegate management tasks.

Wednesday, June 10, 2009: TechNet Webcast: Exchange 2010 Archiving and Retention (Level 300)
This webcast will introduce new ways to address archiving and retention with Exchange Server 2010.

Monday, June 15, 2009: TechNet Webcast: Exchange 2010 Outlook Web Access (Level 200) 
Exchange 2010 brings new features and functionality to Outlook Web Access. See product demonstrations of the latest capabilities and understand how browser-based communication and collaboration gets better than ever in Exchange 2010.

Wednesday, June 17, 2009: TechNet Webcast: Exchange 2010 Architecture (Level 300) 
This webcast describes the overall architecture of Exchange 2010 and key considerations for the scalability and performance of each server role. This webcast will provide the background and framework for the other Exchange 2010 webcasts, serving as a bridge between the overview session and drill-downs in each product area. This session is a recommended pre-requisite for the Exchange 2010 deployment and migration webcast.

Monday, June 22, 2009: TechNet Webcast: Federation in Exchange 2010 (Level 300)
Federation is a key part of the architecture of Exchange 2010, powering new organization-to-organization sharing scenarios.  Learn how federation enhances the capabilities of Exchange 2010 and enables advanced coexistence between Exchange Server and Exchange Online.

Wednesday, June 24, 2009: TechNet Webcast: Exchange 2010 Voice Mail enabled by Unified Messaging (Level 300)
Exchange 2010 Unified Messaging is Microsoft’s second generation unified messaging and voice mail solution. In this webcast, learn about the features, benefits, and architecture of  Unified Messaging in Exchange 2010.

Monday, June 29, 2009: TechNet Webcast: Exchange 2010 Information Protection and Control (Level 300)
This webcast will introduce you to new ways to address information protection and control with Exchange Server 2010. A discussion of the use of encryption and rights management in parallel with Exchange will be included as well as an introduction to new functionality in Exchange that supports information protection scenarios.

Wednesday, July 01, 2009: TechNet Webcast: Exchange 2010 Transition and Deployment (Level 300)
In this session we will cover the migration planning and deployment path to move an organization from Exchange 2003 or Exchange 2007 to Exchange 2010.