DSCResources/MSFT_ADOrganizationalUnit/en-US/about_ADOrganizationalUnit.help.txt

.NAME
    ADOrganizationalUnit
 
.DESCRIPTION
    The ADOrganizational Unit DSC resource will manage Organizational Units (OUs) within Active Directory. An OU is a subdivision within an Active Directory into which you can place users, groups, computers, and other organizational units.
 
    ## Requirements
 
    * Target machine must be running Windows Server 2008 R2 or later.
    * The parameter `RestoreFromRecycleBin` requires that the feature Recycle
      Bin has been enabled prior to an object is deleted. If the feature
      Recycle Bin is disabled then the property `msDS-LastKnownRDN` is not
      added the deleted object.
 
.PARAMETER Name
    Key - String
    The name of Organization Unit (OU).
 
.PARAMETER Path
    Key - String
    Specifies the X.500 path of the Organization Unit (OU) or container where the new object is created.
 
.PARAMETER Ensure
    Write - String
    Allowed values: Present, Absent
    Specifies whether the Organization Unit (OU) is present or absent. Default value is 'Present'.
 
.PARAMETER Credential
    Write - PSCredential
    The credential to be used to perform the operation on Active Directory.
 
.PARAMETER ProtectedFromAccidentalDeletion
    Write - Boolean
    Specifies if the Organization Unit (OU) container should be protected from deletion. Default value is $true.
 
.PARAMETER Description
    Write - String
    The description of the Organization Unit (OU). Default value is empty ('') description.
 
.PARAMETER RestoreFromRecycleBin
    Write - Boolean
    Try to restore the Organization Unit (OU) from the recycle bin before creating a new one.
 
.EXAMPLE 1
 
This configuration will add an Active Directory organizational unit to the
domain.
 
Configuration ADOrganizationalUnit_CreateADOU_Config
{
    param
    (
        [Parameter(Mandatory = $true)]
        [System.String]
        $Name,
 
        [Parameter(Mandatory = $true)]
        [System.String]
        $Path,
 
        [Parameter()]
        [System.Boolean]
        $ProtectedFromAccidentalDeletion = $true,
 
        [Parameter()]
        [ValidateNotNull()]
        [System.String]
        $Description = ''
    )
 
    Import-DscResource -Module ActiveDirectoryDsc
 
    Node localhost
    {
        ADOrganizationalUnit 'ExampleOU'
        {
            Name = $Name
            Path = $Path
            ProtectedFromAccidentalDeletion = $ProtectedFromAccidentalDeletion
            Description = $Description
            Ensure = 'Present'
        }
    }
}