External, Uncategorized

Quick Ref : Active Directory Advanced Powershell

Determine the Domain and Forest Functional Levels

Get-ADDomain | select domainMode, DistinguishedName 
Get-ADForest | select forestMode

Raise the Domain Functional Level

Set-ADDomainModeidentity ad.contoso.com -DomainMode Windows2012R2Domain

Supported Modes are
  • Win2003Domain
  • Win2008Domain
  • Win2008R2Domain
  • Win2012Domain
  • Win2012R2Domain
 

Raise the Forest Functional Level

Set-ADForestMode -Identity ad.contoso.com -ForestMode Windows2008R2Forest

Supported Modes are
  • Windows2000Forest
  • Windows2003InterimForest
  • Windows2003Forest
  • Windows2008Forest
  • Windows2008R2Forest
  • Windows2012Forest
  • Windows2012R2Forest

Rename Computer

Rename-Computer -NewName "Server044" -DomainCredential Domain01\Admin01 -Restart -PassThru

Determine FSMO roles holder

Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator
Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster

Move FSMO Roles

Move-ADDirectoryServerOperationMasterRole -Identity ADC01 -OperationMasterRole 
SchemaMaster, DomainNamingMaster, PDCEmulator, RIDMaster, InfrastructureMaster

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s