TestimoX

API Reference

Command

Move-ADXOrganizationalUnit

Namespace ADPlayground.PowerShell
Outputs
ADPlayground.DirectoryMutationResult

Moves an Active Directory organizational unit.

Examples

Authored help example

Example 1: Preview moving an OU into the managed branch


Move-ADXOrganizationalUnit -Identity 'OU=SQL-Production,OU=Servers,DC=contoso,DC=com' -TargetParentDistinguishedName 'OU=Managed,OU=Servers,DC=contoso,DC=com' -WhatIf
        

Example 2: Move and rename a branch-office workstation OU


Move-ADXOrganizationalUnit -Identity 'OU=Workstations-KRK,OU=Endpoints,DC=contoso,DC=com' -TargetParentDistinguishedName 'OU=Poland,OU=Branches,DC=contoso,DC=com' -NewName 'Workstations-Krakow'
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Move-ADXOrganizationalUnit -Identity <string> -TargetParentDistinguishedName <string> [-Domain <string>] [-NewName <string>] [<CommonParameters>]
#

Parameters

Identity string requiredposition: 0pipeline: falsealiases: DistinguishedName, DN, Name, OU
Gets or sets OU identity (DN, ou, or name).
TargetParentDistinguishedName string requiredposition: 1pipeline: false
Gets or sets the destination parent OU distinguished name.
Domain string optionalposition: namedpipeline: falsealiases: DomainName
Gets or sets the optional domain DNS name.
NewName string optionalposition: namedpipeline: false
Gets or sets optional new OU name.

Outputs

ADPlayground.DirectoryMutationResult