July 27, 2022

Move bulk computer objects listed in TXT file to specific OU in Active Directory

  • List down the servers you want to move in a file named "server.txt".
  • Then find the correct OU where you want to move all computer objects.
    • Note: We assume we need to move the computer accounts in Servers OU under the nilabh.com domain.
    • Run the following script to move all computer objects listed in the notepad file to the required OU.
$Servers = Get-Content "C:\servers.txt"

$TargetOU = "OU=Servers,DC=nilabh,DC=com"

ForEach( $Computer in $Servers ) {

Get-ADComputer $Computer | Move-ADObject -TargetPath $TargetOU

}

July 23, 2022

Upgrade the Exchange Server Schema to the latest version

Download the latest schema update from the below links:

Exchange Server 2019
Exchange Server 2016

Check the adequate build numbers of effective Cumulative Updates after the upgrade from the below links:

Exchange 2019 Active Directory versions
Exchange 2016 Active Directory versions
Exchange 2013 Active Directory versions

Upgrade steps:
  • Copy and paste the latest exchange setup in the Schema Master domain controller.
  • Mount the ISO image to the server.
  • Open PowerShell as Administrator. Navigate to the DVD disk drive and run the following commands:
Setup.EXE /IAcceptExchangeServerLicenseTerms_DiagnosticDataOFF /PrepareSchema

Force the AD replication - repadmin /syncall /AdePS

Setup.EXE /IAcceptExchangeServerLicenseTerms_DiagnosticDataOFF /PrepareAD /OrganizationName:"MESSAGING"

Note: Change the Organization Name according to your organization. If you are not sure, check with the Exchange Administrator.

Force the AD replication - repadmin /syncall /AdePS

Setup.EXE /IAcceptExchangeServerLicenseTerms_DiagnosticDataOFF /PrepareAllDomains

Force the AD replication - repadmin /syncall /AdePS

Once the Schema has been upgraded, validate the latest version from this script.

Note: The value will depend upon the CU version. Check the same in the links provided above.