Synopsis
Description
The domain mode can be set to the following values that are listed in order of functionality from lowest to highest.
Windows2000Domain
Windows2003InterimDomain
Windows2003Domain
Windows2008Domain
Windows2008R2Domain
You can change the domain mode to a mode with higher functionality only. For example, if the domain mode for a domain is set to Windows 2003, you can use this cmdlet to change the mode to Windows 2008. However, in the same situation, you cannot use this cmdlet to change the domain mode from Windows 2003 to Windows 2000.
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 $, 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 to the Set-ADDomainMode cmdlet.
The Set-ADDomainMode always prompts for permission unless you specify -confirm:$false.
Parameters
-AuthType
Specifies the authentication method to use. Possible values for this parameter include:
Required? false
Position? named
Default value Microsoft.ActiveDirectory.Management.AuthType.Negotiate
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Specifies the user account credentials to use to perform this task. The default credentials are the credentials of the currently logged on user unless the cmdlet is run from an Active Directory PowerShell provider drive. If the cmdlet is run from such a provider drive, the account associated with the drive is the default.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DomainMode <ADDomainMode>
Specifies the domain mode for an Active Directory domain. You can set the domain mode to one of the following values that are listed in order of functionality from least to most.
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Identity <ADDomain>
Specifies an Active Directory domain object by providing one of the following property values. The identifier in parentheses is the LDAP display name for the attribute. All values are for the domainDNS object that represents the domain.
Required? true
Position? 1
Default value
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-PassThru <SwitchParameter>
Returns the new or modified object. By default (i.e. if -PassThru is not specified), this cmdlet does not generate any output.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Server <String>
Specifies the Active Directory Domain Services instance to connect to, by providing one of the following values for a corresponding domain name or directory server. The service may be any of the following: Active Directory Lightweight Domain Services, Active Directory Domain Services or Active Directory Snapshot instance.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm <SwitchParameter>
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf <SwitchParameter>
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
Syntax
Set-ADDomainMode [-WhatIf] [-Confirm] [-AuthType <ADAuthType>] [-Credential <PSCredential>] [-DomainMode] <ADDomainMode> [-Identity] <ADDomain> [-PassThru] [-Server <String>] [<CommonParameters>]
This cmdlet does not work with AD LDS.
C:\PS>Set-ADDomainMode -Identity TOSSolution.com -DomainMode Windows2003Domain
Set the DomainMode property of the TOSSolution.com domain to Windows2003Domain.
C:\PS>$pdc = Get-ADDomainController -Discover -Service PrimaryDC
Set-ADDomainMode -Identity $pdc.Domain -Server $pdc.HostName[0] -DomainMode Windows2003Domain
Set the DomainMode of the current logged on user’s domain to Windows2003Domain. The Set operation targets the PrimaryDC FSMO to apply the update.
Get-Command Set-ADDomainMode
. Get-ADDomain