Enable or disable the global catalog on a DC

Powershell Global Catalog enable disable

With the help of Powershell we can activate or deactivate the Global Catalog on a DC.

-Replace @ {options = '0'} = disable
-Replace @ {options = '1'} = enable

That's how it works:

nltest / server: DC02 /dsgetdc:ndsedv.de

nltest dsgetdc

Get-ADDomainController server DC02

NTDSSettingsObjectDN

Set-ADObject -Identity "CN = NTDS Settings, CN = DC02, CN = Servers, CN = Food, CN = Sites, CN = Configuration, DC = ndsedv, DC = de" -Replace @ {options = '0'}

Disable Global Catalog from DC with Powershell

Set-ADObject -Identity "CN = NTDS Settings, CN = DC02, CN = Servers, CN = Food, CN = Sites, CN = Configuration, DC = ndsedv, DC = de" -Replace @ {options = '1'}

Enable Global Catalog from DC with Powershell

nltest / server: DC02 /dsgetdc:ndsedv.de

Remove the global catalog from a domain controller