Forest and domain modes
We can find the forest and domain modes using the following commands
Get-ADDomain -Identity grayson | select DomainMode
Get-ADForest grayson | select forestmode
The modes can be set from the GUI as normal or
Set-ADDomainMode -Identity grayson -DomainMode Windows2008R2Domain
Set-ADForestMode -Identity grayson -ForestMode Windows2008R2Forest
Not that you will be using these cmdlets very often

Read the complete post at http://richardsiddaway.spaces.live.com/Blog/cns!43CFA46A74CF3E96!2238.entry