Set-ADForestMode

Set the domain functional level for an AD forest.

Syntax
      Set-ADForestMode [-Identity] ADForest
         [-ForestMode] {Windows2000Forest | Windows2003InterimForest | Windows2003Forest
                      | Windows2008Forest | Windows2008R2Forest | UnknownForest}
            [-AuthType {Negotiate | Basic}] [-Credential PSCredential] [-PassThru]
               [-Server string] [-Confirm] [-WhatIf] [CommonParameters]

Key
   -AuthType {Negotiate | Basic}
       The authentication method to use:
          Negotiate or 0
          Basic or 1
       A Secure Sockets Layer (SSL) connection is required for the Basic authentication method.

   -Credential PSCredential
       A user account that has permission to perform this action.
       The default is the current user unless the cmdlet is run from an AD PowerShell provider drive
       in which case the account associated with the drive is the default.

       "User64" or "Domain01\User64" or a PSCredential object.

   -ForestMode ADForestMode
       The forest mode for an AD forest.
       Possible values:
          Windows2000Forest   or 0
          Windows2003InterimForest or 1
          Windows2003Forest   or 2
          Windows2008Forest   or 3
          Windows2008R2Forest or 4

   -Identity ADForest
       An AD forest object:

          Fully qualified domain name
            Example: corp.SS64.com
          GUID (objectGUID)
            Example: a7ca1c0d-9a72-497b-a1c2-209104124102
          DNS host name
            Example: dns21.corp.SS64.com
          NetBIOS name
            Example: dns21

       The identifier in parentheses is the LDAP provider name for the attribute.

       The cmdlet searches the default naming context or partition to find the object.
       If the identifier given is a DN, the partition to search will be computed from that DN.
       If two or more objects are found, the cmdlet returns a non-terminating error.

       This parameter can also accept an object through the pipeline.

    -PassThru
       Returns the new or modified object.
       By default (i.e. if -PassThru is not specified), this cmdlet does not generate any output.

   -Server string
       The AD Domain Services instance to connect to, this may be a Fully qualified domain name,
       NetBIOS name, Fully qualified directory server name (with or without port number) or AD Snapshot instance.

       Examples: demo.SS64.com  demo  demoDC02.demo.ss64.com  demoDC02.demo.ss64.com:3268

   -Confirm
       Prompt for confirmation before executing the command.

    -WhatIf
       Describe what would happen if you executed the command, without actually executing the command.

Set-ADForestMode sets the domain mode for a forest. Specify the domain mode by setting the -ForestMode parameter.

You can change the forest mode to a mode with higher functionality only. For example, if the forest mode is 'Windows2000Forest', you can increase the mode to 'Windows2008R2Forest'.

The -Identity parameter specifies the AD forest to modify. Identify a domain by its fully qualified domain name (FQDN), GUID, DNS host name, or NetBIOS name. Alternatively set the -Identity parameter to a forest object variable or through the pipeline. e.g. from Get-ADForest

Set-ADForestMode will prompt for confirmation by default.

Examples

Set the ForestMode to Windows2008R2Domain in the forest SS64.com:

PS C:\> Set-ADForestMode -Identity fabrikam.com -ForestMode Windows2008R2Domain

Set the forest mode of the current logged on user's forest. The Set operation targets the Schema Master FSMO to apply the update:

PS C:\> $currentForest = Get-ADForest
PS C:\> Set-ADForestMode -Identity $currentForest -Server $currentForest.SchemaMaster -ForestMode Windows2008R2Forest

“The heart of another is a dark forest, always, no matter how close it has been to one's own” ~ Willa Sibert Cather

Related PowerShell Cmdlets

Get-adDomain - Get an AD domain.
Set-adDomainMode - Set the domain functional level for an AD domain.


 
Copyright © 1999-2024 SS64.com
Some rights reserved