How to revert the forest functional level in Windows Server 2008 R2 using command line ?

note: Windows Server 2008 R2 introduces the ability to revert to an earlier forest or domain functional level.

On a Domain Controller, open a Powershell prompt and (assuming you don’t already have it) import the Active Directory Powershell module.

Import-module ActiveDirectory

Show the current Domain Functional Level

get-addomain | format-list domainmode

 

Show the current Forest Functional Level

get-adforest | format-list forestmode

Set the Forest Functional Level to Windows 2008 R2 (Forest Functional Level 4)

set-adforestmode -identity mydomain.toto.com -forestmode windows2008R2forest

Show the current Forest Functional Level

get-adforest | format-list forestmode

 

Revert the Forest Functional Level to Windows 2008 (Forest Functional Level 3)

set-adforestmode -identity mydomain.toto.com -forestmode windows2008forest

Show the current Forest Functional Level

get-adforest | format-list forestmode

You should see that the functional level has reverted successfully.

Note that after raising the functional level certain subsequent operations prevent you from reverting.  One of these operations is enabling the AD Recycle Bin, as shown below.

Enable-ADOptionalFeature 'Recycle Bin Feature' -Scope ForestOrConfigurationSet -Target mydomain.toto.com

After enabling the AD Recycle Bin you will receive the error below if you try to revert the functional level.

Another limitation is that you can currently only revert from Windows Server 2008 R2 functional level to Windows Server 2008 functional level.  In other words, the feature has not be retro-fitted to support earlier functional levels.