Enable Do Not Use Recursion settng (Perl)

This code can be found in Chapter 12 of Windows Server 2003 Security Cookbook

Purchase XP Cookbook or Networking Recipes for only $25 plus shipping! While supplies last.

Find out how to download all of the Perl code from this site.

# Thise code enables the Do Not Use Recursion setting for Forwarders

use Win32::OLE;

$objDNS = Win32::OLE->GetObject('winMgmts:root\\MicrosoftDNS');
$objDNSServer = $objDNS->Get('MicrosoftDNS_Server.Name="."');
$objDNSServer->{DoNotUseRecursion} = 1;
$objDNSServer->Put();

This code has been viewed 744 times.

New from the creators of TechTasks.com: StatSheet.com