# Kod tworzy stref wyszukiwania do przodu lub wstecznego, zintegrowan z usug Active Directory

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

# ------ KONFIGURACJA SKRYPTU ------
$strServer = '<NazwaSerwera>'; # np. dns01.rallencorp.com
$strNewZone = '<NazwaStrefy>'; # np. othercorp.com or 8.10.192.in-addr.arpa.
# ------ KONIEC KONFIGURACJI ---------
$objDNS = Win32::OLE->GetObject('winMgmts:\\\\' . $strServer . '\\root\\MicrosoftDNS');
$objDNSZone = $objDNS->Get('MicrosoftDNS_Zone');
$strNull = $objDNSZone->CreateZone($strNewZone, 0, 1);
print "Utworzono stref $strNewZone\n";
