9.8. Mail-Enabling or Mail-Disabling a Public Folder
Problem
You want to mail-enable or mail-disable a public folder.
Solution
Using a graphical user interface
Launch the Exchange System Manager (Exchange System Manager.msc).
In the left pane, expand the appropriate Administrative Groups container.
Expand the Folders node.
Right-click the target folder and select All Tasks and either Mail Enable or Mail Disable.
If you want the public folder to be able to receive mail sent from the Internet directly to its SMTP address, you have some additional work to do:
Right-click the target folder and select Properties.
Click the Permissions tab, then click the Client permissions button.
Verify that the Anonymous user has Contributor permission. If not, use the Add button to grant that permission. Click OK to dismiss the Client Permissions dialog.
Click OK to close the properties dialog.
Using VBScript
' This code toggles the mail-enabled status of the selected folder. ' ------ SCRIPT CONFIGURATION ------ strComputerName = "<serverName>" ' e.g., "cyclone" strPubFolderPath = "<folderPath>" ' e.g., "/Some Folder/" ' ------ END CONFIGURATION --------- strE2K3WMIQuery = "winmgmts://" & strComputerName &_ "/root/MicrosoftExchangeV2" ' query for the specific folder we want Set wmiService = GetObject(strE2K3WMIQuery) query = "Select * From Exchange_PublicFolder" & " Where Path='" & _ strPubFolderPath & "'" Set targetFolder = wmiService.ExecQuery(query) ' report on the mail-enabled status, then toggle it For ...