# ---------------------------------------------------------------
# rdo :
#      "Windows Server 2003 i Windows 2000. Receptury"
# Wydawca : HELION
# ISBN: 83-246-0063-9
# Adres: ftp://ftp.helion.pl/przyklady/ WSW2RE.zip
# ---------------------------------------------------------------

use Win32::OLE;
$Win32::OLE::Warn = 3;

# ------ KONFIGURACJA SKRYPTU ------
$strForestRootDN = '<ForestRootDN>'; # e.g. dc=rallencorp,dc=com
# ------ KONIEC KONFIGURACJI ---------
$objCont = Win32::OLE->GetObject('LDAP://CN=DhcpRoot,CN=NetServices,CN=Services,' . 'CN=Configuration,' . $strForestRootDN);
$colDHCPServers = $objCont->GetEx('dhcpServers');
foreach my $strDHCPServer (@{$colDHCPServers}) {
    print "$strDHCPServer\n";
}
