<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Clint Huffman&amp;#39;s Windows Troubleshooting in the Field Blog</title><subtitle type="html">Clint Huffman is a Microsoft Premier Field Engineer (PFE) who has been with Microsoft for over 10 years. This blog documents the challenges he faces week to week in hopes that these experiences will help others.</subtitle><id>http://blogs.technet.com/b/clinth/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/clinth/" /><link rel="self" type="application/atom+xml" href="http://blogs.technet.com/b/clinth/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2011-03-28T12:01:52Z</updated><entry><title>PAL processing, processors, and threads</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/clinth/archive/2013/01/14/pal-processing-processors-and-threads.aspx" /><id>http://blogs.technet.com/b/clinth/archive/2013/01/14/pal-processing-processors-and-threads.aspx</id><published>2013-01-14T19:32:52Z</published><updated>2013-01-14T19:32:52Z</updated><content type="html">&lt;p&gt;I commonly get questioned on what response should be given to the NumberOfProcessors question variable in the PAL tool, so I thought I might try to explain it a bit…&lt;/p&gt;  &lt;p&gt;PAL is designed to be a stand-alone tool where the analysis of a performance counter log can be analyzed on a workstation where an administrator can analyze counter logs of other computers with no connectivity. For example, customers regularly send me counter logs (*.blg) files to me and I analyze them from my home office or when I am at a hotel. I use PAL on my laptop to do the analysis. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/7433.image_5F00_502A606A.png"&gt;&lt;img title="image" style="display: inline;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/0160.image_5F00_thumb_5F00_73E38804.png" width="244" height="196" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;When you reach the Questions tab in the PAL Wizard, these questions are in regards to the computer(s) in which the performance counter log was captured. The number of processors refers to the number of logical processors that would be seen in Task Manager of that computer. With this in mind, I will change the wording of the question to be more specific. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/4300.image_5F00_1AB19E45.png"&gt;&lt;img title="image" style="display: inline;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/8103.image_5F00_thumb_5F00_4832BE08.png" width="244" height="196" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;At the end of the PAL Wizard on the Execute tab, it asks how many threads to use during analysis. This is asking how many threads can the PAL tool use on the local computer (workstation) to use for analysis. PAL is very processor intensive, so I recommend 1 minus the number of processors of the local workstation. For example, if you have a 4 processor workstation, then use no more than 3 threads. Otherwise, your workstation might become sluggish and hot due to the long-term, high processor usage.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3545765" width="1" height="1"&gt;</content><author><name>Clint Huffman</name><uri>http://blogs.technet.com/clinth_4000_microsoft.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>PAL collector script – PalCollector.ps1</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/clinth/archive/2013/01/08/pal-collector-script-palcollector-ps1.aspx" /><id>http://blogs.technet.com/b/clinth/archive/2013/01/08/pal-collector-script-palcollector-ps1.aspx</id><published>2013-01-09T07:45:32Z</published><updated>2013-01-09T07:45:32Z</updated><content type="html">&lt;p&gt;One of the top questions I get with the &lt;a href="http://pal.codeplex.com/"&gt;PAL tool&lt;/a&gt; is what data to collect. As many of you know, the PAL tool only analyze existing counter logs. It is up to you to create the counter log. To help with this problem, I created a PowerShell script called PalCollector.ps1. This script will query your local computer’s performance counters and will find a PAL threshold file that best matches your computer, then it creates a data collector set called, “PalCollector” using the counter paths from the best matching threshold file. It creates the data collector as a 200 MB binary circular log which means that it will continuously collect data every 15 seconds and will never get over 200 MB in size – roughly 24 hours of data. Once you are done collecting data, analyze the counter log (*.blg) using the PAL tool as you normally would.&lt;/p&gt;  &lt;h2&gt;Instructions&lt;/h2&gt;  &lt;ol&gt;   &lt;li&gt;Download PalCollector.zip from &lt;a title="http://sdrv.ms/10dZBNb" href="http://sdrv.ms/10dZBNb"&gt;http://sdrv.ms/10dZBNb&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;Extract the zip file to a folder such as your Desktop or somewhere under your “My Documents” folder.&lt;/li&gt;    &lt;li&gt;In Windows Explorer, find PalCollector.ps1, go to Properties of the file and click the Unblock button. This will allow the script to run on your system.&lt;/li&gt;    &lt;li&gt;With administrator rights (required) open an elevated PowerShell session.&lt;/li&gt;    &lt;li&gt;If your execution policy is not set to RemoteSigned or Unrestricted, then do so now by running:     &lt;br /&gt;Get-ExecutionPolicy      &lt;br /&gt;Set-ExecutionPolicy RemoteSigned&lt;/li&gt;    &lt;li&gt;Change directory to the location where you extracted the zip file.&lt;/li&gt;    &lt;li&gt;Run “.\PalCollector.ps1”&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Please let me know your thoughts on how it is working for you and any recommendations on improvement.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3544849" width="1" height="1"&gt;</content><author><name>Clint Huffman</name><uri>http://blogs.technet.com/clinth_4000_microsoft.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>How to create a threshold file for the PAL tool</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/clinth/archive/2013/01/08/how-to-create-a-threshold-file-for-the-pal-tool.aspx" /><id>http://blogs.technet.com/b/clinth/archive/2013/01/08/how-to-create-a-threshold-file-for-the-pal-tool.aspx</id><published>2013-01-08T08:49:59Z</published><updated>2013-01-08T08:49:59Z</updated><content type="html">&lt;p&gt;The Performance Analysis of Logs (PAL) tool is an open source project at &lt;a href="http://pal.codeplex.com"&gt;http://pal.codeplex.com&lt;/a&gt; that analyzes performance counter logs. It has thresholds for performance counters written by experts in their respective areas spanning nearly all of the major Microsoft Server products, some Citrix XenApp,, VMware. and others. The number of products covered is limited to only those willing to create a threshold file to define it. It’s my hope that this article will help enable you to create your own threshold file and together we can create prescriptive guidance on all of the performance counters.&lt;/p&gt;  &lt;p&gt;First, open the PAL Wizard as you normally would to analyze a counter log and navigate to the Threshold File tab and click “Edit…”. It doesn’t matter which threshold file is selected at this time. The PAL Editor will show.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/6052.image_5F00_3665369B.png"&gt;&lt;img title="image" style="margin-right: auto; margin-left: auto; float: none; display: block;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/6457.image_5F00_thumb_5F00_6E377ABE.png" width="603" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 1: The Threshold File tab in the PAL Wizard.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In the PAL Editor, go to the upper left and click File, New. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/2251.image_5F00_4DB03B0C.png"&gt;&lt;img title="image" style="margin-right: auto; margin-left: auto; float: none; display: block;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/8182.image_5F00_thumb_5F00_3B67744A.png" width="644" height="401" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 2: The PAL editor after clearing it with File, New.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This clears the editor, but hasn’t created a new threshold file just yet. We will get to that. For now, lets create a new analysis by clicking the New button at the lower left of the editor. This will show the counter New Analysis dialog box. An analysis is the primary container for one or more data source counters that you want to analyze, the thresholds that are applied to the “counter to analyze”, and the charts generated for the data source counters.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/8105.image_5F00_5B164E12.png"&gt;&lt;img title="image" style="display: inline;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/2742.image_5F00_thumb_5F00_53F7119A.png" width="220" height="244" /&gt;&lt;/a&gt; &lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/6136.image_5F00_7AC527DA.png"&gt;&lt;img title="image" style="display: inline;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/0272.image_5F00_thumb_5F00_73A5EB62.png" width="244" height="221" /&gt;&lt;/a&gt; &lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/0172.image_5F00_336FD1E8.png"&gt;&lt;img title="image" style="display: inline;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/5875.image_5F00_thumb_5F00_5A3DE828.png" width="222" height="244" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Figure 3: The New Analysis and Add Counters dialog boxes showing the buttons to click to add new counters to a new analysis.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Click the Browse Counters button and this will open the Add Counters dialog box. This interface allows you to connect to a computer either local or remotely that has the performance counter that you want to add. It’s important to the PAL tool connects to computer that has the counter to ensure that the counter path is exact. Click Close or OK to all of the open dialog boxes to continue.&lt;/p&gt;  &lt;p&gt;Once at the main editor again, notice that many of the fields have been populated with data from the selected counter. This is a good opportunity to update the description of the analysis to tell the end users the purpose of this analysis, what is being checked and why, and what do to if the thresholds are exceeded. The description field supports the use of HTML tags and the rendered HTML can be previewed on the right pane. The text in the description will always show in the PAL report with this analysis. Once finished with editing the description, click the Update Analysis button to set the change and click File, Save to permanently save the changes to the threshold file.&lt;/p&gt;  &lt;p&gt;In this case, I am adding all of the instances of the &lt;strong&gt;\Power Meter(*)\Power &lt;/strong&gt;performance counter. Once I click OK, you are returned to the main PAL editor and should now see the performance counter that you added on the left pane.&lt;/p&gt;  &lt;h2&gt;Excluding counter instances&lt;/h2&gt;  &lt;p&gt;In some cases, it is necessary to exclude specific instances of a performance counter. For example, the _Total counter instance of the LogicalDisk counter object is commonly excluded because the _Total instance sums all of the logical disk counter values together which is typically not helpful when trying to analyze each disk. To exclude a counter instance, select the data source counter to edit, then click the Edit button.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/6445.image_5F00_1A07CEAE.png"&gt;&lt;img title="image" style="margin-right: auto; margin-left: auto; float: none; display: block;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/7534.image_5F00_thumb_5F00_79ECC1F0.png" width="244" height="218" /&gt;&lt;/a&gt;&lt;strong&gt;Figure 4: The Edit DataSource Counter form in the PAL editor.&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;The Edit DataSource Counter form will show. Click the Add button and specify the counter instance to exclude. Repeat as many times as necessary to define all of the counter instances to exclue. In this case, I excluded the _Total instance. Click OK when finished.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/8270.image_5F00_39B6A876.png"&gt;&lt;img title="image" style="margin-right: auto; margin-left: auto; float: none; display: block;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/0763.image_5F00_thumb_5F00_5965823E.png" width="644" height="399" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 5: The PAL editor with a new analysis.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Now is the time to save the work as a new threshold file. At the top left, click File, Save As. This opens the Save As dialog box that will allow you to save the work you’ve done so far to an XML file that is the new threshold file. Navigate to a folder that you have write permissions to such as your Desktop or a location under your My Document folder. In the File Name field, type in a file name that you want the threshold file to have and click Save. Once saved, move the file to the folder where PAL is installed. This typically requires elevated privileges. The default installation folder for PAL is &lt;strong&gt;C:\Program Files\PAL\PAL&lt;/strong&gt;. Saving files directly to this folder is typically prevented by Windows unless you use elevated privileges. In this case, I saved the threshold file as PowerStates.xml and I saved it to the PAL installation folder.&lt;/p&gt;  &lt;p&gt;Next, let’s give the threshold file a name and other information. Click the &lt;strong&gt;Edit Threshold File Properties…&lt;/strong&gt; button. In the &lt;strong&gt;Threshold File Properties&lt;/strong&gt; dialog, change the Title field to a more presentable name. In this case, I named mine, “Windows power states”. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Title:&lt;/strong&gt; This is the name of your threshold file that will be shown. This must be a unique name relative to the other threshold file names. A title with the name of the manufacturer, product, and product version that the threshold file focuses on such as &lt;strong&gt;Microsoft IIS8&lt;/strong&gt; is recommended.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Version:&lt;/strong&gt; This starts off as 1.0. Increment the major and/or minor version numbers when significant changes are made to your threshold file.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Content owner(s):&lt;/strong&gt; You are the content owner… the one who’s reputation is behind this threshold file. Put your name and names of other contributors in this field.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Feedback email addresses:&lt;/strong&gt; Put your email address or addresses separated by semicolons (;) that you would like users to contact you for support or questions.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Threshold file description:&lt;/strong&gt; This is a sentence or two describing purpose of the threshold file.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Threshold file inheritance order:&lt;/strong&gt; There is no need to recreate all of the thresholds of the other threshold files. Simply inherit from all of the threshold files that you want. I generally recommend inheriting from at least the Quick System Overview threshold file because it contains all of the threshold for the core operating system. For example, Microsoft BizTalk Server depends on SQL Server and IIS, so it inherits from the SQL Server and IIS threshold files. When a change is made to any of the inherited threshold files, your threshold file automatically gets those changes allowing your threshold file to evolve with the other threshold files.       &lt;br /&gt;      &lt;br /&gt;The order that the threshold files are listed is used to resolve conflicts where the two or more threshold files have an analysis with the same name or same identifier (in the XML only – not exposed by the editor). Your threshold file is always applied last meaning it will always win conflicts. This means that if you don’t agree with the logical disk latency thresholds defined in the Quick System Overview, then all you have to do is defined an analysis with the same name and create your own thresholds which will override the inheritance. This is what the Microsoft Exchange Server threshold files do because they have more restrictive threshold for disk latency than what the Quick System Overview threshold has defined. With that said, the Exchange Server threshold file still gets all of the other thresholds defined in the Quick System Overview threshold file.      &lt;br /&gt;      &lt;br /&gt;To add a threshold file to inherit from, click the Add button, browse to the PAL installation folder, and select one of the threshold files listed there, then click Open. You should see the threshold file name listed in the inheritance order. If necessary use the Move up and Move down buttons to change the order in which the threshold files are applied. Remember, your threshold file will be applied last allowing it to win any conflicts in analysis names.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/6433.image_5F00_79145C06.png"&gt;&lt;img title="image" style="margin-right: auto; margin-left: auto; float: none; display: block;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/4863.image_5F00_thumb_5F00_31BF0614.png" width="360" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 6: The Threshold File Properties dialog box.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In my case, I added the QuickSystemOverview.xml file. Click OK when finished. For good measure, save your work so far by clicking File, Save in the main PAL editor.&lt;/p&gt;  &lt;p&gt;At this point, the threshold file is usable and you should find it in the drop down menu on the PAL Wizard, but when no thresholds are defined, the counter will only show a chart and statistics only.&lt;/p&gt;  &lt;p&gt;Next, let’s add question variables to the threshold files.&lt;/p&gt;  &lt;h2&gt;Question variables (optional)&lt;/h2&gt;  &lt;p&gt;Question variables allow you to ask the end user more information about the computer system(s) where the counter log was captured that cannot be retrieved by any other means. The answer provided by the user can by used by thresholds in your threshold file for a more thorough analysis. For example, you could ask the user what phase of the moon it was when the counter log was captured.&lt;/p&gt;  &lt;p&gt;To add a question variable, click the Edit Questions button on the main PAL editor. Edit Questions will show. Click Add and “-Needs Updated-“ will show. Click “-Needs Updated-“ and replace the default data on the right as appropriate.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Question Variable Name:&lt;/strong&gt; This is the variable name that will be used in the threshold code. Ensure that the name meets the variable naming requirements of PowerShell such as no spaces in the name.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt; This is the question that is presented to the end user.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;DataType:&lt;/strong&gt; Choose Boolean or String. Boolean provides a True or False value type for the variable. String provides a text value type for the variable.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Default Answer:&lt;/strong&gt; If no answer is provided by the end user, then this is the default response to the question.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/7610.image_5F00_03658067.png"&gt;&lt;img title="image" style="margin-right: auto; margin-left: auto; float: none; display: block;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/8688.image_5F00_thumb_5F00_2A3396A7.png" width="220" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p align="center"&gt;&lt;strong&gt;Figure 7: The Edit Questions form&lt;/strong&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Click Update, then OK when finished and do another File, Save for good measure.&lt;/p&gt;  &lt;h2&gt;Adding a threshold (optional)&lt;/h2&gt;  &lt;p&gt;To add a new threshold to an analysis, click the Add button in the Thresholds group. This will open the Add Threshold Properties.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; This is the name of the threshold and is the text that shows with all alerts generated by this threshold. Make this a concise description.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Condition:&lt;/strong&gt; Choose Warning or Critical. Use Warning to alert the user that a critical threshold is near, there might be an ambiguous condition that could lead to a larger problem, or when the threshold is experimental. Use Critical when it is clear that there is a problem or a condition that the user must be made aware of. Notice that when the condition is changed, the priority changes. This is because Critical conditions are more important than Warning conditions.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Color:&lt;/strong&gt; This will always be yellow for Warning or red for Critical conditions.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Priority:&lt;/strong&gt; You can add as many thresholds as you want to an analysis, but if more than one threshold is broken, then only one threshold will win to produce an alert. When multiple thresholds in an analysis are broken, the threshold with the highest priority will win – meaning the name, condition, and color of the “winning” threshold will be used in the alert generated from the broken threshold(s).&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Variables:&lt;/strong&gt; This is a list of variables and descriptions of those variables that can be used in the PowerShell Threshold Code. These could be question variables such as the $PhaseOfTheMoon variable that I created earlier.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;PowerShell Threshold Code:&lt;/strong&gt; This is where nearly any PowerShell code can be added towards analyzing the “counter to analyze” data source counter. It can be as simple or as advanced as you prefer. By default, PAL provides a “ready to use” threshold by automatically adding the appropriate arguments to the StaticThreshold function. It defaults with a threshold of greater than 10. All of the lines that precede with “#//” are comments and can be removed. They are there only to provide as help.      &lt;br /&gt;      &lt;br /&gt;&lt;em&gt;Note: Please keep in mind that the threshold code can be much more advanced than the standard StaticThreshold. For examples of advanced threshold code, explore the Process Private Bytes analysis of the System Overview threshold file.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;em&gt;StaticThreshold: &lt;/em&gt;&lt;/strong&gt;This is a function inside of PAL.ps1 that will automatically compare the operator and threshold arguments to the values of the “counter to analyze” counter and will generate an alert each time the threshold is exceeded.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;em&gt;CollectionOfCounterInstances:&lt;/em&gt;&lt;/strong&gt; This value must be the variable that contains all of the instances of the “counter to analyze” counter which is automatically named and provided.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;em&gt;Operator:&lt;/em&gt;&lt;/strong&gt; This is a string type that accepts less than ‘lt’, less than or equal to ‘le’, greater than ‘gt’, or greater than or equal to ‘ge’.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;em&gt;Threshold:&lt;/em&gt;&lt;/strong&gt; This must be an integer or double type that will be compared against the values of the “counter to analyze” counter.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/3731.image_5F00_3C102A74.png"&gt;&lt;img title="image" style="margin-right: auto; margin-left: auto; float: none; display: block;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/2816.image_5F00_thumb_5F00_5B52D147.png" width="644" height="428" /&gt;&lt;/a&gt;&lt;strong&gt;Figure 8: The Add Threshold Properties form.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Click OK when finished and the threshold should appear in the Thresholds section of the main PAL editor. Click the Update Analysis button on the lower right of the PAL editor, then click File and Save to save your changes.&lt;/p&gt;  &lt;p&gt;At this point, the threshold file can be used and if any of the thresholds are exceeded, then they will throw an alert with the corresponding conditions of the threshold.&lt;/p&gt;  &lt;h2&gt;Adding visual thresholds to the chart (optional)&lt;/h2&gt;  &lt;p&gt;If you are adding thresholds to an analysis, then it is highly recommended to add corresponding visual thresholds into the chart or charts generated for the analysis. On the main PAL editor form, click the Edit Chart button on the upper right.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/4786.image_5F00_0F86FA8E.png"&gt;&lt;img title="image" style="margin-right: auto; margin-left: auto; float: none; display: block;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/3731.image_5F00_thumb_5F00_1A4451E3.png" width="644" height="400" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Figure 9: The main PAL editor form highlighting the Edit Chart button.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This will show a new form that allows you to create a Warning threshold and/or a Critical threshold into the chart or charts generated for this analysis. These thresholds will show as yellow and red gradients with the ranges specified in this form. Like the counter thresholds, by default, the visual chrart thresholds of Warning and Critical are automatically generated and usable. You can enable one or both of them by clicking the Enabled combo box next to the respective threshold.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/1323.image_5F00_20F75B66.png"&gt;&lt;img title="image" style="margin-right: auto; margin-left: auto; float: none; display: block;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/4382.image_5F00_thumb_5F00_4E787B29.png" width="623" height="484" /&gt;&lt;/a&gt;&lt;strong&gt;Figure 10: The Edit Chart form in the PAL editor.&lt;/strong&gt;&amp;#160;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;StaticChartThreshold:&lt;/strong&gt; This is a function in PAL.ps1 that can be called to create the visual thresholds seen as gradients on the analysis charts.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;CollectionOfCounterInstances:&lt;/strong&gt; This argument requires the variable that contains all of the counter instances of the “counter to analyze”. It is recommended to only use the variable already provided.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;MinThreshold:&lt;/strong&gt; This is the lowest value of the respective Warning and/or Critical chart threshold.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;MaxThreshold:&lt;/strong&gt; This is the highest value of the respective Warning and/or Critical chart threshold. If the maximum value of Critical or Warning (if Warning is the only threshold) is 30 and if none of the counter values reach 30, then the chart will automatically expand to 35 which makes the placement of the gradient seem off. Therefore, consider using a value ending in .999 such as 29.999 to represent 30.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;IsOperatorGreaterThan:&lt;/strong&gt; This is a Boolean (true|false) argument. If True, then it is assumed that the greater the counter value, the worse the condition leading from yellow [Warning] to red [Critical] as the value increases. If False, then the effect is inverted – meaning lower values are considered a worse condition leading from yellow to red in a downward view.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;UseMaxValue:&lt;/strong&gt; This is a Boolean (true|false) argument. If True, then if this chart threshold is exceeded by the counter value, then this chart threshold is increased automatically to match the counter value. If False, then the chart threshold values will not change on the chart. When using both Warning and Critical chart thresholds, it is recommended to set the Warning chart threshold to False and set the Critical chart threshold to True allowing the Warning threshold to stay in place and the Critical threshold to continue to increase matching the counter value if it had exceeded the MaxThreshold value for Critical.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Once finished, click OK to return to the main PAL editor, click Update Analysis on the lower right, then File, Save to permanently save your changes to the threshold file.&lt;/p&gt;  &lt;p&gt;At this point, the analysis should be relatively complete and should be tested. When working with many analyses within a threshold file, consider using the Enabled combo box near the top of the analysis to enable or disable the analysis. This is helpful when needing to test some, but not all of the analyses in your threshold file.&lt;/p&gt;  &lt;h2&gt;Generated counters (optional)&lt;/h2&gt;  &lt;p&gt;The PAL tool has the unique ability to create fake counters that don’t normally exist in a performance counter log, but can be analyzed, charted, and processed with thresholds exactly like normal performance counters. Unfortunately, the PAL editor does not provide a way to create a generated performance counter. It must be created by manually editing the XML code of the threshold file using a text or XML editor.&lt;/p&gt;  &lt;p&gt;The Network Interface % Network Utilization analysis is an example of a generated counter. In this example, the values of the counters \Network Interface(*)\Bytes Total/sec and \Network Interface(*)\Current Bandwidth are put through a formula that produces a percentage value of the amount of network bandwidth used based on the amount of data passing through compared to the current bandwidth of the network interface. In the PAL report, the % Network Utilization performance counter appears as if it was a real performance counter.&lt;/p&gt;  &lt;p&gt;The technique of creating generated counters based on other counters was also used in the SQL Server threshold file to compare full scans/sec to batch requests/sec in a ratio. Once the generated ratio counter was created, it is easy to add thresholds and chart thresholds for it.&lt;/p&gt;  &lt;p&gt;Examine the XML code of the analyses mentioned above as examples of creating your own generated performance counters.&lt;/p&gt;  &lt;h2&gt;Conclusion&lt;/h2&gt;  &lt;p&gt;I know this guide on creating your own threshold files for PAL is very much over due, but I hope you find it useful. If you create a threshold file, then I am happy to include it in the next release of the PAL tool. Just ping me on Twitter @ClintH or post your questions on the PAL forums at &lt;a href="http://pal.codeplex.com"&gt;http://pal.codeplex.com&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3544625" width="1" height="1"&gt;</content><author><name>Clint Huffman</name><uri>http://blogs.technet.com/clinth_4000_microsoft.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Page Frame Number (PFN) database</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/clinth/archive/2013/01/06/page-frame-number-pfn-database.aspx" /><id>http://blogs.technet.com/b/clinth/archive/2013/01/06/page-frame-number-pfn-database.aspx</id><published>2013-01-07T07:33:38Z</published><updated>2013-01-07T07:33:38Z</updated><content type="html">&lt;p&gt;I just finished writing an article on the public, wiki, PFE PerfGuide on the subject of the Page Frame Number database in Microsoft Windows and Windows Server. This little known database is used by the operating system to keep track of the physical memory of the system. Please check it out and update it if necessary. &lt;/p&gt;  &lt;p&gt;&lt;a title="http://social.technet.microsoft.com/wiki/contents/articles/15259.page-frame-number-pfn-database.aspx" href="http://social.technet.microsoft.com/wiki/contents/articles/15259.page-frame-number-pfn-database.aspx"&gt;http://social.technet.microsoft.com/wiki/contents/articles/15259.page-frame-number-pfn-database.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3544398" width="1" height="1"&gt;</content><author><name>Clint Huffman</name><uri>http://blogs.technet.com/clinth_4000_microsoft.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Memory combining in Windows 8 and Windows Server 2012</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/clinth/archive/2012/11/29/memory-combining-in-windows-8-and-windows-server-2012.aspx" /><id>http://blogs.technet.com/b/clinth/archive/2012/11/29/memory-combining-in-windows-8-and-windows-server-2012.aspx</id><published>2012-11-29T22:23:35Z</published><updated>2012-11-29T22:23:35Z</updated><content type="html">&lt;p&gt;I’ve spent that last few weeks studying the memory architecture of Windows 8 and Windows Server 2012. &lt;/p&gt;  &lt;p&gt;Windows and Windows Server has always had sharable memory where portions of DLLs and EXEs will have a single copy in physical memory (synonymous with RAM) and all of the applications that need them will simply reference the page already in physical memory. This is still counted in their working sets, but overall the operating system saves on physical memory usage.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/8585.image_5F00_0930403C.png"&gt;&lt;img title="image" style="border: 0px currentcolor; display: inline;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/3113.image_5F00_thumb_5F00_48FA26C1.png" width="314" height="405" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;One of the interesting features of Windows 8 and Windows Server 2012 is how process private page-able memory is periodically combined further saving on physical memory usage. This was mentioned in Bill Karagounis’s blog, &lt;a href="http://blogs.msdn.com/b/b8/archive/2011/10/07/reducing-runtime-memory-in-windows-8.aspx"&gt;Reducing runtime memory in Windows 8&lt;/a&gt;. The savings on physical memory usage could be dramatic, but possibly have some overhead from the system needing to search for duplicate pages of memory. I can only speculate at best right now.&lt;/p&gt;  &lt;p&gt;An important distinction is that Windows 8 has memory [page] combining enabled by default, but Windows Server 2012 does not.&lt;/p&gt;  &lt;p&gt;To check if your computer has page combining enabled or not, open an elevated Powershell session and type the following command:&lt;/p&gt;  &lt;p&gt;Get-MMAgent&lt;/p&gt;  &lt;p&gt;You should see output similar to this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/3125.image_5F00_41DAEA49.png"&gt;&lt;img title="image" style="display: inline;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/7411.image_5F00_thumb_5F00_3ABBADD1.png" width="291" height="113" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To enable page combining on Windows Server 2012, run the following command:&lt;/p&gt;  &lt;p&gt;Enable-MMAgent –PageCombining&lt;/p&gt;  &lt;p&gt;Get-MMAgent&lt;/p&gt;  &lt;p&gt;You should see output similar to this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/5367.image_5F00_339C7159.png"&gt;&lt;img title="image" style="display: inline;" border="0" alt="image" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/6837.image_5F00_thumb_5F00_1381649C.png" width="415" height="135" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I did not get a prompt to reboot, so I assume this is working now.&lt;/p&gt;  &lt;p&gt;If you enable this feature, then please let me know what kind of impact it has on your solution. I am particularly interested in the value of the counter &lt;strong&gt;\Memory\Available MBytes&lt;/strong&gt; before and after testing or real world load. Keep in mind that I suspect that the &lt;strong&gt;\Process(*)\Working Set&lt;/strong&gt; sizes will remain the same simply because the physical page in RAM will be counted in the working sets normally, but physically have only one real page in RAM.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3535579" width="1" height="1"&gt;</content><author><name>Clint Huffman</name><uri>http://blogs.technet.com/clinth_4000_microsoft.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Can a process be limited on how much physical memory it uses?</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/clinth/archive/2012/10/11/can-a-process-be-limited-on-how-much-physical-memory-it-uses.aspx" /><id>http://blogs.technet.com/b/clinth/archive/2012/10/11/can-a-process-be-limited-on-how-much-physical-memory-it-uses.aspx</id><published>2012-10-11T16:43:00Z</published><updated>2012-10-11T16:43:00Z</updated><content type="html">&lt;p&gt;I've been asked a lot of great questions lately and thought I'd post some of them.&lt;/p&gt;
&lt;p&gt;As you might know, I am one of the instructors of the popular workshop "Vital Signs" which teaches students Windows architecture and how to identify performance bottlenecks. One of the instructors recently had a student who asked if a process (application) can be limited on the amount of physical memory (RAM) that it can use. The answer is it largely&amp;nbsp;depends on the overall physical memory usage, but it can be limited.&lt;/p&gt;
&lt;p&gt;The amount of physical memory that a process uses is called Working Set. The operating system's memory manager (referring to Microsoft Windows and Microsoft Windows Server) controls that amount of physical memory that a process uses by expanding and trimming the working set size of the process. The process itself has little control over this, but this model allows the operating system to manage physical resources more efficiently by only allowing memory that is most actively touched (read or written to) in physical memory.&lt;/p&gt;
&lt;p&gt;If you use a tool like Process Explorer (&lt;a href="http://live.sysinternals.com/procexp.exe"&gt;http://live.sysinternals.com/procexp.exe&lt;/a&gt;), you can have it show the field Max Working Set. This is the amount of physical memory that the process believes it will need and it provides a suggestion to the operating system as to how large or small the working set of the process should be. For the most part though, maximum working set is largely ignored. The reason for this is that if the operating system has plenty of available physical memory, then it will allows frequently accessed pages of a working set to stay in physical memory simply because it is more efficient to keep it there.&lt;/p&gt;
&lt;p&gt;According to the &lt;a title="Sysinternals Administrators Reference" href="http://technet.microsoft.com/en-us/sysinternals/hh290819.aspx"&gt;Sysinternals Administrators Reference&lt;/a&gt; book, here&amp;nbsp;are the definitions of the working set fields:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Minimum Working Set.&lt;/strong&gt;&amp;nbsp;The amount of physical memory reserved for the process; the operating system guarantees that the process&amp;rsquo; working set can always be assigned at least this amount. The process can also lock pages in the working set up to that amount minus eight pages. This minimum does not guarantee that the process&amp;rsquo; working set will always be at least that large, unless a hard limit has been set by a resource management application.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Maximum Working Set.&lt;/strong&gt;&amp;nbsp;Indicates the maximum amount of working set assigned to the process. However, this number is ignored by Windows unless a hard limit has been configured for the process by a resource management application.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Working Set Size.&lt;/strong&gt;&amp;nbsp;The amount of physical memory assigned to the process by the memory manager.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ref: Russinovich, Mark E.; Aaron Margosis (2011-06-29). Windows&amp;reg; Sysinternals Administrator&amp;rsquo;s Reference (p. 59).&lt;/p&gt;
&lt;p&gt;Also, per David Solomon (one of the authors of the &lt;a title="Windows Internals" href="http://technet.microsoft.com/en-us/sysinternals/bb963901.aspx"&gt;Windows Internals&lt;/a&gt; series of book), Process Explorer does not show if the process has a hard or soft max or min [working set] set. Also, he suggests using the Windows API, &lt;a title="SetProcessWorkingSetSizeEx" href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms686237(v=vs.85).aspx"&gt;SetProcessWorkingSetSizeEx&lt;/a&gt;, to set a hard working set size.&lt;/p&gt;
&lt;p&gt;With that said, there is a tool called the Windows System Resource Manager which can limit the amount of working set that a process uses. This tool is installable (not installed by default) through the Add Features console on Windows Server 2008 R2.&lt;/p&gt;
&lt;p&gt;For more information on this subject, I recommend watching Mark Russinovich's, "&lt;a title="Mysteries of Memory Management Revealed" href="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/WCL405"&gt;Mysteries of Memory Management Revealed&lt;/a&gt;".&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3525537" width="1" height="1"&gt;</content><author><name>Clint Huffman</name><uri>http://blogs.technet.com/clinth_4000_microsoft.com/ProfileUrlRedirect.ashx</uri></author><category term="Windows performance analysis" scheme="http://blogs.technet.com/b/clinth/archive/tags/Windows+performance+analysis/" /><category term="memory" scheme="http://blogs.technet.com/b/clinth/archive/tags/memory/" /></entry><entry><title>My IIS7 PowerShell Scripts</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/clinth/archive/2011/12/04/my-iis7-powershell-scripts.aspx" /><id>http://blogs.technet.com/b/clinth/archive/2011/12/04/my-iis7-powershell-scripts.aspx</id><published>2011-12-04T10:08:02Z</published><updated>2011-12-04T10:08:02Z</updated><content type="html">&lt;p&gt;I regularly go onsite with enterprise customers of Microsoft and do Microsoft Internet Information Services (IIS) health checks. Recently, I have been rewriting many of my VBScripts into PowerShell scripts to help make the health check easier. I will be writing more as I go. In the meantime, I hope that you will find these scripts useful.&lt;/p&gt;  &lt;h3&gt;General features&lt;/h3&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Alternate credentials:&lt;/strong&gt; They permit the use of different credentials against remote IIS7 servers.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Encrypted data transfers:&lt;/strong&gt; Use WMI remote-ing and encryption: Most of the scripts use remote WMI calls which use DCOM. I set them to always use encryption on these connections to protect sensitive data collection over the wire. Warning: Log-EphemeralPortStats.ps1 uses PsExec for remote-ing and sends the password over the network in the clear only when changing credentials. Using a domain account with admin rights will not send the credentials in the clear.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Useful output:&lt;/strong&gt; Many of the scripts output to a comma separated value (csv) file or an XML file. This allows easy post analysis using Microsoft Excel or Microsoft Internet Explorer to view the collected data.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Please understand that I am publishing these scripts to the open community so that you might be able to self-help yourself and have an even better experience with Microsoft products. These script are provided “as-is” as sample code and are not supported. For more information on Microsoft Internet Information Services and how to automate it, go to &lt;a href="http://learn.iis.net"&gt;http://learn.iis.net&lt;/a&gt;.&lt;/p&gt;  &lt;h5&gt;Get-NtfsPermissionsOfIisContentToCsv.ps1&lt;/h5&gt;  &lt;p&gt;This script gets the discretionary access control lists (DACLs) from the physical paths of IIS7 web sites and virtual directories and writes them to a comma separated file (CSV) for post-analysis such as auto-filter in Microsoft Excel. This script requires remote WMI connectivity to all of the servers specified. WMI uses Remote Procedure Calls (RPC) which uses random network ports. The WMI connections are encrypted when possible.&lt;/p&gt;  &lt;h5&gt;Get-NtfsPermissionsOfIisFoldersToCsv.ps1&lt;/h5&gt;  &lt;p&gt;Gets the discretionary access control lists (DACLs) from the physical paths of IIS7 operational folders and writes them to a comma separated file (CSV) for post-analysis such as auto-filter in Microsoft Excel. This script requires remote WMI connectivity to all of the servers specified. WMI uses Remote Procedure Calls (RPC) which uses random network ports. The WMI connections are encrypted when possible.&lt;/p&gt;  &lt;h5&gt;Get-WebAdministrationToXml.ps1&lt;/h5&gt;  &lt;p&gt;Gets all of the WMI data of one or more IIS7 servers and writes it to a single XML document. This data comes from the root\WebAdministration WMI namespace. Requires administrator rights on the target server(s). The WMI connections are encrypted when possible. This is probably the most powerful of all of the scripts simply because it gets everything related to IIS from each IIS server.&lt;/p&gt;  &lt;h5&gt;Get-ParentPaths.ps1&lt;/h5&gt;  &lt;p&gt;Gets the ASP Parent Path setting for all web sites for all IIS7 servers. This scripts uses the root\WebAdministration WMI namespace. Requires administrator rights on the target server(s). The WMI connections are encrypted when possible.&lt;/p&gt;  &lt;h5&gt;Get-SecurityGroupMembership.ps1&lt;/h5&gt;  &lt;p&gt;This script is not specific to IIS7, but helps with checking operating system security health. This script gets the membership of security groups from one or more computers and writes them to a comma separated file (CSV) for post-analysis such as auto-filter in Microsoft Excel. This script requires remote WMI connectivity to all of the servers specified. WMI uses Remote Procedure Calls (RPC) which uses random network ports. The WMI connections are encrypted when possible.&lt;/p&gt;  &lt;h5&gt;Set-EnableAllW3cFields.ps1&lt;/h5&gt;  &lt;p&gt;Enables all of the W3C logging fields on all web sites of one or more IIS7 servers. This scripts uses the root\WebAdministration WMI namespace. Requires administrator rights on the target server(s). The WMI connections are encrypted when possible. This script is helpful to prepare IIS servers for intensive W3C log analysis.&lt;/p&gt;  &lt;h5&gt;Log-EphemeralPortStats.ps1&lt;/h5&gt;  &lt;p&gt;This script is not specific to IIS7, but helps with checking operating system network health. Runs in an infinite loop getting the TCP ephemeral port and listening port statistics for each local IP address and outputs the data to a text file log. The script writes the ephemeral port stats every 60 seconds by default. To get data from remote computers, this script requires PsExec.exe (SysInternals) to be in the same directory as this script. WARNING: Credentials passed into PSExec are sent over the network in clear text! Prevent this by logging in interactively with a domain account that has administrator rights on the target computers and not specifying credentials to this script. PsExec is a Sysinternals tool owned by Microsoft Corporation. PsExec can be downloaded for free at &lt;a href="http://live.sysinternals.com/psexec.exe"&gt;http://live.sysinternals.com/psexec.exe&lt;/a&gt;. &lt;/p&gt;  &lt;h4&gt;Download&lt;/h4&gt;  &lt;p&gt;These scripts are available on my SkyDrive at:   &lt;br /&gt;&lt;a title="https://skydrive.live.com/?cid=e6360c54b48a891b&amp;amp;sc=documents&amp;amp;id=E6360C54B48A891B%21428#cid=E6360C54B48A891B&amp;amp;id=E6360C54B48A891B%21964&amp;amp;sc=documents" href="https://skydrive.live.com/?cid=e6360c54b48a891b&amp;amp;sc=documents&amp;amp;id=E6360C54B48A891B%21428#cid=E6360C54B48A891B&amp;amp;id=E6360C54B48A891B%21964&amp;amp;sc=documents"&gt;https://skydrive.live.com/?cid=e6360c54b48a891b&amp;amp;sc=documents&amp;amp;id=E6360C54B48A891B%21428#cid=E6360C54B48A891B&amp;amp;id=E6360C54B48A891B%21964&amp;amp;sc=documents&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Clint Huffman&lt;/b&gt; |&lt;b&gt; &lt;/b&gt;&lt;b&gt;Senior Premier Field Engineer &lt;/b&gt;| &lt;b&gt;Microsoft Services |&lt;/b&gt; &lt;a href="mailto:clinth@microsoft.com"&gt;clinth@microsoft.com&lt;/a&gt; | TS:Windows Internals    &lt;table border="0" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="154"&gt;           &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/4621.clip_5F00_image002_5F00_26294553.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/6371.clip_5F00_image002_5F00_thumb_5F00_6CA6355B.jpg" width="144" height="105" /&gt;&lt;/a&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td valign="top" width="194"&gt;           &lt;p&gt;&lt;b&gt;Microsoft Tag:&lt;/b&gt; Download my contact information to your phone. &lt;/p&gt;            &lt;p&gt;Get the free app for your phone at &lt;a href="http://gettag.mobi/"&gt;http://gettag.mobi&lt;/a&gt;&lt;/p&gt;         &lt;/td&gt;          &lt;td valign="top" width="145"&gt;           &lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/8422.clip_5F00_image004_5F00_21469197.gif"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/7457.clip_5F00_image004_5F00_thumb_5F00_7A0C4861.gif" width="68" height="68" /&gt;&lt;/a&gt;&lt;a href="http://twitter.com/clinth"&gt;&lt;b&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/4718.clip_5F00_image006_5F00_6BCDCF71.gif" width="21" height="21" /&gt;&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;&lt;a href="http://www.linkedin.com/pub/clint-huffman/1/606/485"&gt;&lt;b&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/5126.clip_5F00_image008_5F00_4089386A.gif" width="21" height="21" /&gt;&lt;/b&gt;&lt;/a&gt; &lt;a href="http://www.facebook.com/clint.huffman"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-73-metablogapi/7853.clip_5F00_image010_5F00_5265CC37.gif" width="21" height="21" /&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3468833" width="1" height="1"&gt;</content><author><name>Clint Huffman</name><uri>http://blogs.technet.com/clinth_4000_microsoft.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>How to Speak SAN-ish</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/clinth/archive/2011/05/13/how-to-speak-san-ish.aspx" /><id>http://blogs.technet.com/b/clinth/archive/2011/05/13/how-to-speak-san-ish.aspx</id><published>2011-05-14T00:16:06Z</published><updated>2011-05-14T00:16:06Z</updated><content type="html">&lt;p&gt;I recently signed a contract with MCP Magazine to publish articles. This is effectively a syndication of this blog.&lt;/p&gt;  &lt;p&gt;Check out my first article called, “How to Speak SAN-ish” at   &lt;br /&gt;&lt;a title="http://mcpmag.com/articles/2011/05/12/how-to-speak-san-ish.aspx" href="http://mcpmag.com/articles/2011/05/12/how-to-speak-san-ish.aspx"&gt;http://mcpmag.com/articles/2011/05/12/how-to-speak-san-ish.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3429148" width="1" height="1"&gt;</content><author><name>Clint Huffman</name><uri>http://blogs.technet.com/clinth_4000_microsoft.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>The Microsoft TechNet Wiki Performance Guide (PerfGuide)</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/clinth/archive/2011/03/28/the-microsoft-technet-wiki-performance-guide-perfguide.aspx" /><id>http://blogs.technet.com/b/clinth/archive/2011/03/28/the-microsoft-technet-wiki-performance-guide-perfguide.aspx</id><published>2011-03-28T20:06:28Z</published><updated>2011-03-28T20:06:28Z</updated><content type="html">&lt;p&gt;One of the major reasons why I haven’t been blogging much is because I have spent most of my “free” time working on the Microsoft TechNet Wiki writing what I call the “PerfGuide”. We have a lot of great content up there for Windows performance analysis.&lt;/p&gt;  &lt;p&gt;The Microsoft PFE Performance Guide (PerfGuide): Start Here   &lt;br /&gt;&lt;a title="http://social.technet.microsoft.com/wiki/contents/articles/the-microsoft-pfe-performance-guide-perfguide-start-here.aspx" href="http://social.technet.microsoft.com/wiki/contents/articles/the-microsoft-pfe-performance-guide-perfguide-start-here.aspx"&gt;http://social.technet.microsoft.com/wiki/contents/articles/the-microsoft-pfe-performance-guide-perfguide-start-here.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3416606" width="1" height="1"&gt;</content><author><name>Clint Huffman</name><uri>http://blogs.technet.com/clinth_4000_microsoft.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>The PAL Tool on Memory Leaks</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/clinth/archive/2011/03/28/the-pal-tool-on-memory-leaks.aspx" /><id>http://blogs.technet.com/b/clinth/archive/2011/03/28/the-pal-tool-on-memory-leaks.aspx</id><published>2011-03-28T19:01:52Z</published><updated>2011-03-28T19:01:52Z</updated><content type="html">&lt;p&gt;To prevent a process from crashing due to a System.OutOfMemory condition, the .NET garbage collector (GC) automatically defragments virtual memory. It can only do this for Gen 0 and Gen 1 memory allocations. Any allocations at 64 KB or larger will go to the large object heap. The large object heap and any non-managed objects (COM, C++, etc.) cannot be defragmented by the GC.&lt;/p&gt;  &lt;p&gt;I recently published an article on the Microsoft Technet Wiki PerfGuide on diagnosing process virtual memory issues.   &lt;br /&gt;&lt;strong&gt;PerfGuide: Out of Process Virtual Memory&lt;/strong&gt;    &lt;br /&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/perfguide-out-of-process-virtual-memory.aspx"&gt;http://social.technet.microsoft.com/wiki/contents/articles/perfguide-out-of-process-virtual-memory.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In any case, PAL is looking for a gradual and significant increase in process committed memory for which the operating system must provide system committed resources (physical RAM and/or page file). The committed memory of each process can be measured using the “\Process(*)\Private Bytes” counter. The amount of committed memory of a process is dictated by the process’s usage of memory – coded by the developer of the application. The .NET GC also removes/deallocates variables that are out of scope (such as local variables in a function that is no longer executing), but ultimately, the application developer determines which variables are in use. Therefore, we diagnose the memory usage of the application threw debugging or profiling to determine where the memory usage goes. My point is that, yes, you can have a memory leak even if you are using pure .NET. The GC just makes it less likely to happen.&lt;/p&gt;  &lt;p&gt;With all of that said, memory leaks need to be looked at over a long period of time because when an application is busy, it will naturally use more memory. A memory leak is when the memory accumulates unnecessarily. &lt;/p&gt;  &lt;p&gt;If a process has plenty of virtual memory (x64 has 8 TB of virtual memory per process) and if the leak continues unchecked, then the system might eventually run out of system commit memory which is the total amount of RAM and all of the page files combined. For more information on this topic, see the following PerfGuide post.&lt;/p&gt;  &lt;p&gt;PerfGuide: Out of System Committed Memory   &lt;br /&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/perfguide-out-of-system-committed-memory.aspx"&gt;http://social.technet.microsoft.com/wiki/contents/articles/perfguide-out-of-system-committed-memory.aspx&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;We [Microsoft] typically work with applications in production, so we commonly use DebugDiag or WinDBG to analyze memory leaks by gathering several dumps (*.dmp) from the target process.&lt;/p&gt;  &lt;p&gt;DebugDiag   &lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/en/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3416585" width="1" height="1"&gt;</content><author><name>Clint Huffman</name><uri>http://blogs.technet.com/clinth_4000_microsoft.com/ProfileUrlRedirect.ashx</uri></author></entry></feed>