PowerShell Logo Small


This is the built-in help made by Microsoft for the command 'Set-ADDomainMode', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.


Sets the domain mode for an Active Directory domain.


Set-ADDomainMode [-Identity] <ADDomain> [-DomainMode] {UnknownDomain | Windows2000Domain | Windows2003InterimDomain | Windows2003Domain | Windows2008Domain |
Windows2008R2Domain | Windows2012Domain | Windows2012R2Domain} [-AuthType {Negotiate | Basic}] [-Credential <PSCredential>] [-PassThru] [-Server <String>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Search powershellhelp.space


The Set-ADDomainMode cmdlet sets the domain mode for a domain. You specify the domain mode by setting the DomainMode parameter.

The Identity parameter specifies the Active Directory domain to modify. You can identify a domain by its distinguished name (DN), GUID, security identifier (SID), DNS domain
name, or NetBIOS name. You can also set the Identity parameter to a domain object variable such as $<localADDomainObject>, or you can pass a domain object through the
pipeline to the Identity parameter. For example, you can use the Get-ADDomain cmdlet to retrieve a domain object and then pass the object through the pipeline operator to
the Set-ADDomainMode cmdlet.

The Set-ADDomainMode cmdlet always prompts for permission unless you specify -confirm:$false.



Online Version: http://go.microsoft.com/fwlink/p/?linkid=291117




-------------------------- EXAMPLE 1 --------------------------

PS C:\> Set-ADDomainMode -Identity fabrikam.com -DomainMode Windows2003Domain

This command sets the DomainMode property of the fabrikam.com domain to Windows2003Domain.

-------------------------- EXAMPLE 2 --------------------------

PS C:\> $pdc = Get-ADDomainController -Discover -Service PrimaryDC
PS C:\> Set-ADDomainMode -Identity $pdc.Domain -Server $pdc.HostName[0] -DomainMode Windows2003Domain

This example sets the DomainMode of the current logged on user's domain to Windows2003Domain. The set operation targets the PrimaryDC FSMO to apply the update.