Enable SSL (Perl)

This code can be found in Chapter 15 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.

# This code enables 128-bit SSL on a web site.
# ------ SCRIPT CONFIGURATION ------

use Win32::OLE;

$strComputer = '<ServerName>';
$strSiteID = '<SiteID>';

# Taken from AccessSSLFlags
#   8 = AccessSSL
#   256 = AccessSSL128
$intFlag = 8 + 256;
# ------ END CONFIGURATION ---------
$objWebSite = Win32::OLE->GetObject('IIS://' . $strComputer . '/W3SVC/' . $strSiteID);
$objWebSite->{AccessSSLFlags} = $intFlag;
$objWebSite->SetInfo();
print 'Successfully modified SSL settings for: ' . $objWebSite->ServerComment, "\n";

This code has been viewed 817 times.

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