|
You are Exchange Server 2003,
right? From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Creamer, Mark Sent: Thursday, December 22, 2005 1:39 PM To: [email protected] Subject: RE: [ActiveDir] AD or is this Exchange task? I think I’m pretty
close on this, but am unable to get past an error. When I run the script (which
initially I configured to only tell me whether or not the various folders are
mail-enabled), I get an error 0x80041010. My research suggests this is either
because something is misspelled in the WMI query, or that the Class doesn’t even
exist in the given namespace. I tried running it on the server itself, but same
result. Then I opened Scriptomatic V2 and selected the Root/MicrosoftExchangeV2
namespace, and sure enough, Exchange_PublicFolder does not show up as a class in
that namespace. So I guess that’s why the error happens, but how do I fix it?
Script is below… Thanks! strComputerName =
"myServer"
strPubFolderPath =
"/Public Folders/All Public Folders/HR
Managers/"
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 Each folder In
targetFolder
If folder.IsMailEnabled
Then
WScript.Echo folder.Name & " is mail-enabled as " &
folder.TargetAddress
Else
WScript.Echo folder.Name & " is not
mail-enabled"
End
If
Next
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Al
Mulnick IIRC, it's Public Folders/All Public Folders/HR
Managers/HR001 Al
On 12/22/05, Creamer, Mark <[EMAIL PROTECTED]>
wrote: Thanks Tony. One
question if someone knows… Below is an excerpt
from the script. What should the syntax for the <folder path>
be? ' This code toggles the
mail-enabled status of the selected folder. ' ------ SCRIPT
CONFIGURATION ------ strComputerName = "<serverName>"
strPubFolderPath = "<folderPath>" In our Public Folder
list when I look at it in Outlook, it shows: Public Folders/All Public
Folders/HR Managers, and then under that is all the folders whose mail-enable
status I want to turn off. These are named HR001, HR002, etc.
What should the
strPublicFolderPath look like to accomplish this? Thanks
again! From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Tony Murray Another method to do
this is to use WMI. Here's sample script from the Exchange Server
Cookbook.
http://www.exchangecookbook.com/files/09-08-change-PF-mail-enable-status.txt Bear in mind that if
you are running in mixed mode then Exchange 5.5 expects all PFs to be
mail-enabled. Tony From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of joe The supported mechanism
is to use the CDOEXM maildisable method. http://msdn.microsoft.com/library/default.asp?url=""> From: [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED]] On
Behalf Of Creamer, Mark I've been asked to
write
a script to mail-DISable a bunch of public
folders. Is that accomplished by manipulating
something in AD, or Exchange or both? I haven't been able to uncover much
documentation on this topic, except for one guy's horror story. I'll tell our
Exchange dude to do it manually if this is an unusually risky
undertaking, but there are about 1000 or so to do. Thanks, Mark
This
communication, including any attachments, is confidential. If you are not the
intended recipient, you should not read it - please contact me immediately,
destroy it, and do not copy or use any part of this communication or disclose
anything about it. Thank you. Please note that this communication does not
designate an information system for the purposes of the Electronic Transactions
Act 2002.
This e-mail transmission contains information that is intended to be confidential and privileged. If you receive this e-mail and you are not a named addressee you are hereby notified that you are not authorized to read, print, retain, copy or disseminate this communication without the consent of the sender and that doing so is prohibited and may be unlawful. Please reply to the message immediately by informing the sender that the message was misdirected. After replying, please delete and otherwise erase it and any attachments from your computer system. Your assistance in correcting this error is appreciated. |
- RE: [ActiveDir] AD or is this Exchange task? Michael B. Smith
- Re: [ActiveDir] AD or is this Exchange task? Al Mulnick
- RE: [ActiveDir] AD or is this Exchange task? Creamer, Mark
- RE: [ActiveDir] AD or is this Exchange task? Michael B. Smith
