# This script was originally published in the Exchange Cookbook,
# (http://www.exchangebookcook.com). Written by Paul Robichaux,
# Missy Koslosky, and Devin Ganger. Redistributed with permission
# of the publisher, O'Reilly & Associates.
# This code sets a cap on the number of recipients allowed
# on a single message
# ------ SCRIPT CONFIGURATION ------
use Win32::OLE;
$strMessageDeliveryDN = 'cn=message delivery,cn=global settings,' . 'cn=<orgName>,cn=microsoft exchange,cn=services,' . 'cn=configuration, <ForestRootDN>';
# ------ END CONFIGURATION ------
$objMessageLimit = Win32::OLE->GetObject('LDAP://' . $strMessageDeliveryDN);
$objMessageLimit->Put('msExchRecipLimit', '100');
$objMessageLimit->SetInfo();
print "Set recipient limit on $strMessageDeliveryDN to 100\n";
|