Tip: You can enable or disable a Global Catalog:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
function Enable-GlobalCatalog { Param ( [string]$ComputerName ) Set-ADObject -Identity (Get-ADDomainController -Identity $ComputerName).NTDSSettingsObjectDN -Replace @{options='1'} } function Disable-GlobalCatalog { Param ( [string]$ComputerName ) Set-ADObject -Identity (Get-ADDomainController -Identity $ComputerName).NTDSSettingsObjectDN -Replace @{options='0'} } |