NOTE: This page is no longer being updated. To install the latest version of DSC Resource Kit, please use the PowerShell Gallery. If you need to report issues or would like to contribute to development, check out our GitHub Repositories.


The xOu module is a part of the ALM Ranger DevOps solutions (, which consists of code as config guidance, quick reference posters and supporting resources.

This module contains the xAdOrganizationalUnit resource. This resource allows configuration of Organizational Units (OUs) in Active Directory (AD).


All of the resources in the DSC Resource Kit are provided AS IS, and are not supported through any Microsoft standard support program or service. The ""x" in xADOrganizationalUnit stands for experimental, which means that these resources will be fix forward and monitored by the module owner(s).

Please leave comments, feature requests, and bug reports in the Q & A tab for this module.

If you would like to modify xOU module, feel free. When modifying, please update the module name, resource friendly name, and MOF class name (instructions below). As specified in the license, you may copy or modify this resource as long as they are used on the Windows Platform.

For more information about Windows PowerShell Desired State Configuration, check out the blog posts on the PowerShell Blog (this is a good starting point). There are also great community resources, such as, or PowerShell Magazine. For more information on the DSC Resource Kit, check out this blog post.


To install xOU module

To confirm installation:


This module requires the latest version of PowerShell (v4.0, which ships in Windows 8.1 or Windows Server 2012R2). The module also has a dependency on the Remote Server Administration Tools (RSAT) feature.

To easily use PowerShell 4.0 on older operating systems, install WMF 4.0. Please read the installation instructions that are present on both the download page and the release notes for WMF 4.0.

To install the RSAT, you can use the following DSC Configuration:

WindowsFeature InstallRSAT-AD-PowerShell


Ensure = "Present"

Name = "RSAT-AD-PowerShell"



The xOU module contains the xADOrganizationalUnit resource. This DSC Resource allows you to easily configure and maintain your Organizational Units in Active Directory by writing simple configurations.


xADOrganizationalUnit has the following parameters.

Renaming Requirements

When making changes to these resources, we suggest the following practice:

  1. Update the following names by replacing MSFT with your company/community name and replacing the "x" with "c" (short for "Community") or another prefix of your choice:
    • Module name (ex: xOu becomes cOU)
    • Resource folder (ex: MSFT_xADOrganizationalUnit becomes Contoso_cADOrganizationalUnit)
    • Resource Name (ex: MSFT_xADOrganizationalUnit becomes Contoso_cADOrganizationalUnit)
    • Resource Friendly Name (ex: xADOrganizationalUnit becomes cADOrganizationalUnit)
    • MOF class name (ex: MSFT_xADOrganizationalUnit becomes Contoso_cADOrganizationalUnit)
    • Filename for the <resource>.schema.mof (ex: MSFT_xADOrganizationalUnit.schema.mof becomes Contoso_cADOrganizationalUnit.schema.mof)
  2. Update module and metadata information in the module manifest
  3. Update any configuration that use these resources

We reserve resource and module names without prefixes ("x" or "c") for future use (e.g. "MSFT_ADOrganizationalUnit"). If the next version of Windows Server ships with "MSFT_ADOrganizationalUnit" resource, we don't want to break any configurations that use any community modifications. Please keep a prefix such as "c" on all community modifications.


Example: Create an Organizational Unit

This example will set the permissions for users on a specified share. The example code is located in xOuSample.PS1 in the module folder under ...\Examples.