Monday, January 26, 2009
Using a GPO to configure RPC over HTTPS Setting Continued
While there is an Outlook administrative template for Office 2007 that can be tweaked in order to set the RPC over HTTPS setting, these same settings won't have any effect on Outlook 2003 users even after changing the registry locations to reflect Outlook 2003.
As a workaround, you can use the following script and a .prf file to make the changes to Outlook's RPC over HTTPS settings (or any other settings for that matter)
First I check to see if the file OUTPRF.SET exist in the Outlook application directory. If it doesn't then I flag Outlook to import the .prf file from the specified location before finally creating the OUTPRF.SET file in the application directory so that it won't import the settings again next time Outlook is opened.
'Script to set RPC over HTTPs setting for Outlook 2003 users
'By Derek W. Aude
'01/26/2009
Dim wShell, objFSO, strFolder, objFile
Set wShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFolder = wShell.ExpandEnvironmentStrings("%AppData%\Microsoft\Outlook")
If Not objFSO.FileExists(strFolder & "\OUTPRF.SET") Then
wShell.RegWrite "HKCU\Software\Microsoft\Office\11.0\Outlook\Setup\First-Run", CLng(0), "REG_BINARY"
wShell.RegWrite "HKCU\Software\Microsoft\Office\11.0\Outlook\Setup\ImportPrf","\\Your\Network\\Location", "REG_SZ"
wShell.Run "%comspec% /c" & chr(34) & "Completed Successfully >" & chr(34) & "%appdata%\Microsoft\OUTLOOK\OUTPRF.SET" & chr(34),0,False
End If
Save this as a .vbs file on a network share and run it as a call it from a GPO as a log on script.
As a workaround, you can use the following script and a .prf file to make the changes to Outlook's RPC over HTTPS settings (or any other settings for that matter)
First I check to see if the file OUTPRF.SET exist in the Outlook application directory. If it doesn't then I flag Outlook to import the .prf file from the specified location before finally creating the OUTPRF.SET file in the application directory so that it won't import the settings again next time Outlook is opened.
'Script to set RPC over HTTPs setting for Outlook 2003 users
'By Derek W. Aude
'01/26/2009
Dim wShell, objFSO, strFolder, objFile
Set wShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFolder = wShell.ExpandEnvironmentStrings("%AppData%\Microsoft\Outlook")
If Not objFSO.FileExists(strFolder & "\OUTPRF.SET") Then
wShell.RegWrite "HKCU\Software\Microsoft\Office\11.0\Outlook\Setup\First-Run", CLng(0), "REG_BINARY"
wShell.RegWrite "HKCU\Software\Microsoft\Office\11.0\Outlook\Setup\ImportPrf","\\Your\Network\\Location", "REG_SZ"
wShell.Run "%comspec% /c" & chr(34) & "Completed Successfully >" & chr(34) & "%appdata%\Microsoft\OUTLOOK\OUTPRF.SET" & chr(34),0,False
End If
Save this as a .vbs file on a network share and run it as a call it from a GPO as a log on script.
Tuesday, January 20, 2009
Using a GPO to Configure RPC over HTTPS Settings
You download the Office 2007 Administrative Template files (http://www.microsoft.com/downloads/details.aspx?FamilyID=92d8519a-e143-4aee-8f7a-e4bbaeba13e7&displaylang=en) hoping to be able to configure RPC over https in Outlook 2007 but quickly realize that it isn't an option.
With some quick customization of your Outlook ADM file (Outlk12.adm) you can still get it done.
http://support.microsoft.com/kb/961112
With some quick customization of your Outlook ADM file (Outlk12.adm) you can still get it done.
http://support.microsoft.com/kb/961112
Exchange 2003 Memory Leak
Here are three setttings that should be adjusted in order to correct a memory leak caused by specific issues with how Exchange was handling a high volume of messages on the bridgeheads:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters]"EnableAggressiveMemoryUsage"=dword:00000001[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\InetInfo\Parameters]"FileCacheLifeTimeSeconds"=dword:0000012c"FileCacheMaxHandles"=dword:00000258[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMTPSVC\Queuing]"MsgHandleThreshold"=dword:00001388"MsgHandleAsyncThreshold"=dword:00001388
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters]"EnableAggressiveMemoryUsage"=dword:00000001[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\InetInfo\Parameters]"FileCacheLifeTimeSeconds"=dword:0000012c"FileCacheMaxHandles"=dword:00000258[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMTPSVC\Queuing]"MsgHandleThreshold"=dword:00001388"MsgHandleAsyncThreshold"=dword:00001388
Poolmon Logging Instructions
Use PoolMon3VBS.zip which allows you to capture what is consuming Paged and NonPaged pool memory.
If the SRV/2019 or SRV/2020 is occurring now or we are very close to the next occurrence we should examine the handle count in Task Manager Processes tab for each process. To add the Handle column to the Processes tab click "View" then "Select Columns...".
A high handle count (larger than 5,000) may indicate the offending process without any further troubleshooting. Stop the process or service if it is not necessary and observe Kernel Page and Nonpaged memory usage under Task Manager Performance tab. Else, complete the remaining steps to start data gathering. Sometimes a memory dump is required in addition to the output files generated by running _LogPool-as-a-service.CMD or LogPool.cmd
1) Collecting the Poolmondata:
- Rename PoolMon3VBS.ZIx to PoolMon3VBS.ZIP and extract its contents C:\POOLMON3
- Double click _LogPool-as-a-service.CMD to have Poolmon running as a service so that you do not have to restart LogPool.CMD each time you reboot or close the command window running LogPool.cmd.
- To be notified of a 2019, 2020, 2021, 2022 event in the system event log double click the corresponding 2019Mon.CMD, 2020Mon.CMD, 2021Mon.CMD or 2022Mon.CMD (requires another CMD instance)
When the issue reoccurs zip up the "C:\POOLMON3\Poolmon-Output" folder and save the zip file for review. For the next few days zip up the TXT files, the .CSV file and save the zip files at the start of each day even if the issue has not occurred. Often times you can determine abnormal consumption of pool memory resources before the issue occurs.
Starting with WinXP you can right click a folder and select "Send To" then "Compressed (zipped) Folder". After the issue is resolved you can remove the Poolmon service by double clicking on RemovePoolmon3service.cmd
If the SRV/2019 or SRV/2020 is occurring now or we are very close to the next occurrence we should examine the handle count in Task Manager Processes tab for each process. To add the Handle column to the Processes tab click "View" then "Select Columns...".
A high handle count (larger than 5,000) may indicate the offending process without any further troubleshooting. Stop the process or service if it is not necessary and observe Kernel Page and Nonpaged memory usage under Task Manager Performance tab. Else, complete the remaining steps to start data gathering. Sometimes a memory dump is required in addition to the output files generated by running _LogPool-as-a-service.CMD or LogPool.cmd
1) Collecting the Poolmondata:
- Rename PoolMon3VBS.ZIx to PoolMon3VBS.ZIP and extract its contents C:\POOLMON3
- Double click _LogPool-as-a-service.CMD to have Poolmon running as a service so that you do not have to restart LogPool.CMD each time you reboot or close the command window running LogPool.cmd.
- To be notified of a 2019, 2020, 2021, 2022 event in the system event log double click the corresponding 2019Mon.CMD, 2020Mon.CMD, 2021Mon.CMD or 2022Mon.CMD (requires another CMD instance)
When the issue reoccurs zip up the "C:\POOLMON3\Poolmon-Output" folder and save the zip file for review. For the next few days zip up the TXT files, the .CSV file and save the zip files at the start of each day even if the issue has not occurred. Often times you can determine abnormal consumption of pool memory resources before the issue occurs.
Starting with WinXP you can right click a folder and select "Send To" then "Compressed (zipped) Folder". After the issue is resolved you can remove the Poolmon service by double clicking on RemovePoolmon3service.cmd
Thursday, January 15, 2009
Simple VB Script to Email File
Creating an email and sending it with an attachment via VB is pretty simple. You can just adjust the following and use however you wish.
set objEmail = CreateObject("CDO.Message")
objEmail.From = "someone@somewhere.com"
objEmail.To = "someone@somewhere.com"
objEmail.Subject = "Subject Here"
objEmail.TextBody = "Message Here"
objEmail.AddAttachment "C:\someFile.zip"
objEmail.Configuration.Fields("http://schemas.microsoft.com/cdo/ configuration/sendusing") = 2
objEmail.Configuration.Fields("http://schemas.microsoft.com/cdo/ configuration/smtpserver") = "server" objEmail.Configuration.Fields.Update objEmail.Send
Exchange MTA Rewriting Message Bodies
So I got hit up pretty hard by a guy who was quite upset by that fact that we claim to be handling Internet RFC[12]822 e-mail when somewhere along the line, messages were being turned into HTMLified MIME documents. (He even verified by hex dumping his local mail spool)
He claimed that our MTA's were rewriting message bodies and it was a major problem for him that needed to be addressed immediately. He was testing this phenomenon using Mutt as his email client...
From my understanding, by design, once a message reaches an Exchange server it does not preserve the original MIME of the message. When the message gets delivered into Exchange mailbox database it is converted to MAPI format. Then, when MIME is requested for the message from a non-MAPI client the MIME content is regenerated from the new Exchange (MAPI) representation.
He claimed that our MTA's were rewriting message bodies and it was a major problem for him that needed to be addressed immediately. He was testing this phenomenon using Mutt as his email client...
From my understanding, by design, once a message reaches an Exchange server it does not preserve the original MIME of the message. When the message gets delivered into Exchange mailbox database it is converted to MAPI format. Then, when MIME is requested for the message from a non-MAPI client the MIME content is regenerated from the new Exchange (MAPI) representation.
Exchange Powershell Multiple Mailbox Moves
Move-Mailbox has a switch you can set to throttle the number of threads.
- MaxThreads (http://technet.microsoft.com/en-us/library/aa997599.aspx )
Subscribe to:
Posts (Atom)