# Kod uaktywnia lub wycza wykaz globalny dla okrelonego kontrolera domeny

# ------ KONFIGURACJA SKRYPTU ------
my $strDC = "<NazwaKontroleraDomeny>";   # np. dc01.rallencorp.com
my $strGCEnable = 1;                    # 1 = wczenie, 0 = wyczenie
# ------ KONIEC KONFIGURACJI ---------
use Win32::OLE;
$Win32::OLE::Warn = 3;
my $objRootDSE = Win32::OLE->GetObject("LDAP://$strDC/RootDSE");
$objNTDS = Win32::OLE->GetObject("LDAP://$strDC/" . $objRootDSE->Get("dSServiceName"));
$objNTDS->Put("options", $strGCEnable);
$objNTDS->SetInfo;
