Verify ForestPrep, Domainprep & Rodcprep Result

Applies to Windows Server 2003, Windows Server 2003 R2 , Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016.

We can check the log into the DCs where Adprep has been done. Given the LOG location

SystemRoot%\Debug\adprep\logs\yyyymmddhhmmss\adprep.log

In addition use the below DSQUERY commands or PowerShell Scripts for getting the ForestPrep, Domainprep & Rodcprep result.

Schema Version

C:\schupgr
Opened Connection to NODE001
SSPI Bind succeeded
Current Schema Version is 47
ERROR: Cannot obtain schema version to upgrade to: 1
**

**

DSQUERY
Schema Version

C:\dsquery * cn=schema,cn=configuration,dc=msft,dc=net -scope base -attr Object
version
  Objectversion
  47

ForestPrep Result

C:\dsquery * CN=ActiveDirectoryUpdate,CN=ForestUpdates,cn=configuration,dc=msft,dc=net -scope base -attr revision
  revision
**  5**

RODCPrep Result

C:\dsquery * CN=ActiveDirectoryRodcUpdate,CN=ForestUpdates,cn=configuration,dc=msft,dc=net -scope base -attr revision
**  revision**
**  2**

DomainPrep Result

C:\dsquery * CN=ActiveDirectoryUpdate,CN=DomainUpdates,CN=System,dc=msft,dc=net
** -scope base -attr revision
  revision
  5**

Powershell
Verify ForestPrep, Domainprep & Rodcprep result
###------------------------------### 
### Author###Biswajit Biswas-----### 
###MCC, MCSA, MCTS, CCNA, SME----### 
###Email<bshwjt@gmail.com>-------### 
###------------------------------###
#http://technet.microsoft.com/en-us/library/dd464018%28v=ws.10%29.aspx#BKMK_WS2012
#My Blogs http://social.technet.microsoft.com/wiki/contents/articles/14580.user-page-biswajit.aspx
Import-Module ActiveDirectory
CD AD:
$Forest = Read-Host 'Put your forest name in DN format like DC=msft,DC=Net'
$Rootdomain=Get-ADForest | select RootDomain
$Schemaversion=[ADSI]"LDAP://cn=schema,cn=configuration,$Forest"
$ForsetPrep=[ADSI]"LDAP://CN=ActiveDirectoryUpdate,CN=ForestUpdates,cn=configuration,$Forest"
$RODCPrep=[ADSI]"LDAP://CN=ActiveDirectoryRodcUpdate,CN=ForestUpdates,cn=configuration,$Forest"
$domainPrep=[ADSI]"LDAP://CN=ActiveDirectoryUpdate,CN=DomainUpdates,CN=System,$Forest"
 
Write-Host "Schema Version"
$Schemaversion.Properties.objectVersion
Write-Host "ForestPrep Version"
$ForsetPrep.Properties.revision
Write-Host "RODCPrep Version"
$RODCPrep.Properties.revision
Write-Host "DomainPrep Version"
$domainPrep.Properties.revision 
sl c:

The script above has been tested on Powershell Version 2,3 & 4.

Reference for Schema ObjectVersion for each version of the Server Operating System:

https://msdn.microsoft.com/en-us/library/cc223174.aspx

http://gallery.technet.microsoft.com/scriptcenter/Verify-ForestPrep-4df59cd5

#1. Root Domain name 
#2. All Domains name  
#3. Schema Version 
#4. ForestPrep Version 
#5. DomainPrep Version 
#6. RodcPrep Version 
#7. Forest Functional Level. 
#8. Domain Functional Level. 
#9. No Manual Intervention  
#10.Does not required any special Permission 
#11.No modification is required in that Script. 
#12.Just Shoot in PS Runspace & Enjoy the journey.

Biswajit Biswas