<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Otto Helweg - Management Matters</title><link>http://blogs.technet.com/otto/default.aspx</link><description>Management, monitoring, automation, and instrumentation topics for the IT-Pro.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Forwarding Security Events from Windows XP, Server 2003, and Vista/Server 2008</title><link>http://blogs.technet.com/otto/archive/2009/06/22/forwarding-security-events-from-windows-xp-server-2003-and-vista-server-2008.aspx</link><pubDate>Mon, 22 Jun 2009 20:54:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3257545</guid><dc:creator>ottoh</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/otto/comments/3257545.aspx</comments><wfw:commentRss>http://blogs.technet.com/otto/commentrss.aspx?PostID=3257545</wfw:commentRss><description>&lt;P&gt;Security events are different than other Windows events because they require a special level of authentication/credentials in order to read or forward these events. Different configurations are required depending on which Windows platform is the client. The event collector functionality is only implemented in Windows Vista or Server 2003 R2 (or later).&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/3257840/original.aspx" mce_src="http://blogs.technet.com/photos/otto/images/3257840/original.aspx"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following table illustrates the special configurations required for each platform:&lt;/P&gt;
&lt;P mce_keep="true"&gt;
&lt;TABLE style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; MARGIN: auto auto auto 36.9pt; WIDTH: 445.5pt; BORDER-COLLAPSE: collapse; BORDER-TOP: medium none; BORDER-RIGHT: medium none; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class=MsoTableGrid border=1 cellSpacing=0 cellPadding=0 width=594 class="MsoTableGrid"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes"&gt;
&lt;TD style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 121.5pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #365f91; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: accent1; mso-background-themeshade: 191" vAlign=top width=162&gt;
&lt;P style="TEXT-ALIGN: center; MARGIN: 0in 0in 0pt" class=MsoBodyText align=center&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="COLOR: white; mso-themecolor: background1"&gt;Platform&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 4.5in; PADDING-RIGHT: 5.4pt; BACKGROUND: #365f91; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: accent1; mso-background-themeshade: 191; mso-border-left-alt: solid windowtext .5pt" vAlign=top width=432&gt;
&lt;P style="TEXT-ALIGN: center; MARGIN: 0in 0in 0pt" class=MsoBodyText align=center&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="COLOR: white; mso-themecolor: background1"&gt;Configuration Requirement&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 1"&gt;
&lt;TD style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 121.5pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt" vAlign=top width=162&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoBodyText&gt;&lt;FONT color=#003366&gt;XP SP2+&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 4.5in; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt" vAlign=top width=432&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoBodyText&gt;&lt;FONT color=#003366&gt;The “Windows Remote Management” Service needs to run as “Local System” (make sure you're okay with this elevation - it does have potential security ramifications)&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 2"&gt;
&lt;TD style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 121.5pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt" vAlign=top width=162&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoBodyText&gt;&lt;FONT color=#003366&gt;Server 2003&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 4.5in; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt" vAlign=top width=432&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoBodyText&gt;&lt;FONT color=#003366&gt;The following “CustomSD” key needs to be set within “HKLM/SYSTEM/CCS/Services/EventLog/Security” to “O:BAG:SYD:(A;;CC;;;NS)”&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 3; mso-yfti-lastrow: yes"&gt;
&lt;TD style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 121.5pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt" vAlign=top width=162&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoBodyText&gt;&lt;FONT color=#003366&gt;Vista, Server 2008, and beyond&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: #f0f0f0; PADDING-BOTTOM: 0in; BACKGROUND-COLOR: transparent; PADDING-LEFT: 5.4pt; WIDTH: 4.5in; PADDING-RIGHT: 5.4pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt" vAlign=top width=432&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoBodyText&gt;&lt;FONT color=#003366&gt;Add “Network Service” to the “Event Log Readers” Local Security Group&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;EM&gt;Note: A popular scenario&amp;nbsp;includes forwarding Security Events from a Domain Controller in order to get an enterprise view for auditing and security monitoring. Due to the large number of Security Events that tend to be generated on Domain Controllers, the Event Forwarding subscription should not request that Forwarded Events be "Rendered". Event rendering for a large number of events will consume a large amount of processing resources on the client. The "ContentFormat" of the subscription needs to be set to "Events" rather than the default "RenderedText". This change can be made via "WECUTIL.EXE".&lt;/EM&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;&amp;lt;ContentFormat&amp;gt;&lt;STRONG&gt;Events&lt;/STRONG&gt;&amp;lt;/ContentFormat&amp;gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&lt;EM&gt;Note: In addition, Security events are typically considered time sensitive and it's desirable to forward them immediately, rather than at a set interval. The following "MaxItems" setting for the subscription insures that events are forwarded as they occur (only valid for "Push" subscriptions).&lt;/EM&gt;&lt;/P&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;wecutil ss &amp;lt;subscription name&amp;gt; /cm:Custom /dmi:1&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;More details can be found below:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;WMI Blog on this topic (adds a little more background info): &lt;A href="http://blogs.msdn.com/wmi/archive/2009/04/06/forwarding-security-related-events-from-xp-win2k3-vista-using-winrm-wsman-event-forwarding.aspx"&gt;http://blogs.msdn.com/wmi/archive/2009/04/06/forwarding-security-related-events-from-xp-win2k3-vista-using-winrm-wsman-event-forwarding.aspx&lt;/A&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Setting Event Log Security via Group Policy (KB Article): &lt;A href="http://support.microsoft.com/default.aspx/kb/323076"&gt;http://support.microsoft.com/default.aspx/kb/323076&lt;/A&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Event Forwarding Plug-In for XP SP2+ and Server 2003 SP1+: &lt;A href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=845289ca-16cc-4c73-8934-dd46b5ed1d33" mce_href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=845289ca-16cc-4c73-8934-dd46b5ed1d33"&gt;http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=845289ca-16cc-4c73-8934-dd46b5ed1d33&lt;/A&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3257545" width="1" height="1"&gt;</description></item><item><title>Hyper-V Virtual Identification</title><link>http://blogs.technet.com/otto/archive/2008/08/04/hyper-v-virtual-identification.aspx</link><pubDate>Mon, 04 Aug 2008 19:00:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3098340</guid><dc:creator>ottoh</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/otto/comments/3098340.aspx</comments><wfw:commentRss>http://blogs.technet.com/otto/commentrss.aspx?PostID=3098340</wfw:commentRss><description>&lt;P&gt;Since virtual machines can be easily moved between physical hosts (parents), it becomes important to track where virtual machines are physically residing for both asset management as well as troubleshooting purposes. The following post focuses on discovering the relationship between virtual hosts (parents) and the virtual machines (children) from both the perspective of the parent as well as the perspective of the child.&lt;/P&gt;
&lt;P&gt;&lt;IMG style="WIDTH: 500px; HEIGHT: 322px" height=322 src="http://blogs.technet.com/photos/otto/images/3098393/original.aspx" width=500 mce_src="http://blogs.technet.com/photos/otto/images/3098393/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Note: The following examples use the WinRM and WinRS&amp;nbsp;command-line utilities which shipped with Windows Vista and Windows Server 2008, but are also available as an Out-Of-Band install for Windows XP SP2+ and Windows Server 2003 SP1+ &lt;/EM&gt;&lt;A class="" title="WinRM v1.1" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=845289ca-16cc-4c73-8934-dd46b5ed1d33&amp;amp;DisplayLang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=845289ca-16cc-4c73-8934-dd46b5ed1d33&amp;amp;DisplayLang=en"&gt;&lt;EM&gt;here&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt;.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Query the Parent:&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Most commonly used for asset collection, this model gathers the names (and other virtual machine characteristics) of all the children running on a virtual host. This method queries the Hyper-V specific WMI provider/class by using the following command.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;P&gt;winrm enumerate wmi/root/virtualization/msvm_computersystem /r:&amp;lt;remote Hyper-V Host&amp;gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;With the following sample output:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;P&gt;Msvm_ComputerSystem&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AssignedNumaNodeList = 0&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Caption = Virtual Machine&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CreationClassName = Msvm_ComputerSystem&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description = Microsoft Virtual Machine&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;ElementName = PROV-XP&lt;/STRONG&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EnabledDefault = 2&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EnabledState = 2&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HealthState = 5&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; InstallDate&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Datetime = 2008-07-01T21:47:02Z&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name = 31F497F1-2437-4E89-8308-BE07FB5C14C2&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NameFormat = null&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OnTimeInMilliseconds = 432464839&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OperationalStatus = 2&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OtherEnabledState = null&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrimaryOwnerContact = null&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrimaryOwnerName = OTTOH-HOST\Administrator&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessID = 2628&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RequestedState = 12&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ResetCapability = 1&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Status = null&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TimeOfLastConfigurationChange&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Datetime = 2008-07-30T17:07:06Z&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TimeOfLastStateChange&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Datetime = 2008-07-30T17:07:06Z&lt;/P&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Query the Child:&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Most commonly used for troubleshooting scenarios where a virtual machine is being evaulated and needs to be queried in order to determine its physical host (parent). The following command queries the registry on the child in order to determine its host (parent):&lt;/P&gt;
&lt;P&gt;&lt;IMG style="WIDTH: 500px; HEIGHT: 301px" height=301 src="http://blogs.technet.com/photos/otto/images/3098386/original.aspx" width=500 mce_src="http://blogs.technet.com/photos/otto/images/3098386/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Remote Access Method #1&lt;/STRONG&gt; (the /f parameter merely structures the output in XML – handy for scripting, especially in PowerShell):&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;P&gt;winrm invoke GetStringValue wmi/root/default/StdRegProv @{hDefKey="2147483650";sSubKeyName="Software\Microsoft\Virtual Machine\Guest\Parameters";sValueName="PhysicalHostNameFullyQualified"} /r:&amp;lt;Remote VM&amp;gt; /u:&amp;lt;Username&amp;gt; /p:&amp;lt;Password&amp;gt; /f:pretty&lt;/P&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Remote Access Method #2:&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;P&gt;winrs /r:&amp;lt;Remote VM&amp;gt; /u:&amp;lt;Username&amp;gt; /p:&amp;lt;Password&amp;gt; reg query "HKLM\Software\Microsoft\Virtual Machine\Guest\Parameters" /v PhysicalHostNameFullyQualified&lt;/P&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;Note: The first method demonstrates a powerful way to access the value of any registry key using the ‘StdRegProv’ WMI provider via WS-Man/WinRM for remote transport. Other registry hives can be accessed with the following hDefKey values: HKLM=2147483650, HKCU=2147483649, HKCR=2147483648, HKEY_USERS=2147483651.&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3098340" width="1" height="1"&gt;</description></item><item><title>Quick and Dirty Large Scale Eventing for Windows</title><link>http://blogs.technet.com/otto/archive/2008/07/08/quick-and-dirty-enterprise-eventing-for-windows.aspx</link><pubDate>Tue, 08 Jul 2008 18:25:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3085618</guid><dc:creator>ottoh</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/otto/comments/3085618.aspx</comments><wfw:commentRss>http://blogs.technet.com/otto/commentrss.aspx?PostID=3085618</wfw:commentRss><description>&lt;P&gt;One of the least known yet most powerful management features to ship with Windows Vista&amp;nbsp;and Windows Server 2008 is built-in Event Forwarding which enables large scale health and state monitoring of a Windows environment (assuming health and state&amp;nbsp;can be determined from Windows Events - which&amp;nbsp;they usually can). Not only is this feature built into the latest versions of Windows, but it's also available for down-level OSs like Windows&amp;nbsp;XP SP2+ and Windows Server 2003 SP1+ (&lt;A class="" title="WS-Man 1.1" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=845289ca-16cc-4c73-8934-dd46b5ed1d33&amp;amp;DisplayLang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=845289ca-16cc-4c73-8934-dd46b5ed1d33&amp;amp;DisplayLang=en"&gt;here&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Note:&lt;/EM&gt;&amp;nbsp;True enterprise class Windows eventing is included with enterprise monitoring solutions like System Center Operations Manager.&lt;/P&gt;
&lt;P&gt;This new Windows Event Forwarding (also known as Windows Eventing 6.0) is exceptional for the following reasons:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Standards Based:&lt;/STRONG&gt; No really! It leverages the DMTF WS-Eventing standard which allows it to interoperate with other WS-Man implementations (see &lt;A class="" href="http://sourceforge.net/projects/openwsman/" mce_href="http://sourceforge.net/projects/openwsman/"&gt;OpenWSMAN&lt;/A&gt; at SourceForge).&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Agentless:&amp;nbsp;&lt;/STRONG&gt;Event Forwarding and&amp;nbsp;Event Collection are&amp;nbsp;included in the OS by default&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Down-Level Support:&lt;/STRONG&gt; Event Forwarding&amp;nbsp;is available for Windows XP SP2+ and Windows Server 2003 SP1+&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Multi-Tier:&lt;/STRONG&gt; Forwarding architecture is very scalable where a "Source Computer" may forward to a large number of collectors and collectors may forward to collectors&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Scalable:&lt;/STRONG&gt; Event Collection&amp;nbsp;is very scalable (available in Windows Vista as well) where the collector can maintain subscriptions with a large number of "Source Computers" as well as process a large number of events per second&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Group Policy Aware:&lt;/STRONG&gt; The entire model is configurable by Group Policy&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Schematized Events:&lt;/STRONG&gt; Windows Events are now schematized and rendered in XML which enables many&amp;nbsp;scripting and export scenarios&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Pre-Rendering:&lt;/STRONG&gt; Forwarded Windows Events can now be pre-rendered on the Source Computer negating the need for local applications to render Windows Events&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Resiliency:&lt;/STRONG&gt; Designed&amp;nbsp;to enable mobile scenarios where laptops may be disconnected from the collector for extended periods of time without event loss (except when logs wrap) as well as leveraging TCP for guaranteed delivery&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Security: &lt;/STRONG&gt;Certificate based encryption via Kerberos or HTTPS&lt;/LI&gt;&lt;/OL&gt;
&lt;P mce_keep="true"&gt;This implementation will walk through the following example design where via Group Policy a domain computer group will be configured to forwared Windows Events to a single collector:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 617px; HEIGHT: 423px" height=423 src="http://blogs.technet.com/photos/otto/images/3085654/original.aspx" width=617 mce_src="http://blogs.technet.com/photos/otto/images/3085654/original.aspx"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Implementation&amp;nbsp;steps are as follows:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Step 1: Create&amp;nbsp;Event Forwarding Subscription&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Step 2: Configure WinRM Group Policy&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Step 3: Configure Event Forward Group Policy&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Step 4: Test&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Step 1: Create the Event Forwarding Subscription on the Event Collector&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;In the Windows Event Forwarding architecture, the subscription definition is held and maintained on the Collector in order to reduce the number of touch-points in case a subscription needs to be created or&amp;nbsp;modified. Creating the subscription is accomplished through the new Event Viewer user interface by selecting the 'Create Subscription' action when the 'Subscriptions' branch is highlighted. The Subscription may also be created via the "WECUTIL" command-line utility.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&lt;EM&gt;Note:&lt;/EM&gt; Both Windows Vista and Windows Server 2008 can be event collectors (this feature is not supported for down-level). Although there are no built-in limitations when Vista is a collector, Server 2008 will scale much better in high volume scenarios.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 739px; HEIGHT: 632px" height=632 src="http://blogs.technet.com/photos/otto/images/3085598/original.aspx" width=739 mce_src="http://blogs.technet.com/photos/otto/images/3085598/original.aspx"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;Although the above subscription is configured to leverage Group Policy, the subscription can be configured in a stand-alone mode (see the "Collector Initiated" option). In addition, this subscription is designed to gather all events from the "Application" and "System" logs that have a level of "Critical", "Error", or "Warning". This event scope can be expanded to gather all events from these logs&amp;nbsp;or even add&amp;nbsp;additional logs (like the "Security" log).&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;Lastly, the subscription is configured to forward events as quickly as possible with the advanced settings delivery option of "Minimize Latency". The default setting of "Normal" would only forward events every 15 minutes (which may be more desirable depending the the Collector and Source Computer resources).&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 347px; HEIGHT: 153px" height=153 src="http://blogs.technet.com/photos/otto/images/3085599/original.aspx" width=347 mce_src="http://blogs.technet.com/photos/otto/images/3085599/original.aspx"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;If Group Policy is not being used,&amp;nbsp;configure the "Subscription type" to be "Collector Initiated". In this case Source Computers will need to be&amp;nbsp;manually added to the&amp;nbsp;Subscription either through&amp;nbsp;the Subscription configuration or the&amp;nbsp;"WECUTIL"&amp;nbsp;command-line utility (which can also be scripted&amp;nbsp;using PowerShell, but that's another topic).&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&lt;EM&gt;Note:&lt;/EM&gt; In cases where there Source Computer is generating a large volume of forwarded events (e.g. Security events from a Domain Controller), use WECUTIL on the collector to disable event rendering for the subscription. The task of pre-rendering an event on the source computer can be CPU intensive for a large number of events.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Step 2: Configure Group Policy to enable Windows Remote Management on the Source Computers (clients)&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;Group Policy can be used to enable and configure Windows Remote Management (WinRM or WS-Man) on the Source Computers. WinRM is required by Windows Event Forwarding as WS-Man is the protocol used by WS-Eventing. The following shows the Group Policy branch locations for configuring both WinRM and Event Forwarding:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 283px; HEIGHT: 508px" height=508 src="http://blogs.technet.com/photos/otto/images/3085595/original.aspx" width=283 mce_src="http://blogs.technet.com/photos/otto/images/3085595/original.aspx"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;The following GP setting will enable WinRM on the client as well as configure a Listener that will accept packets from &lt;STRONG&gt;ANY&lt;/STRONG&gt; source.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 323px; HEIGHT: 358px" height=358 src="http://blogs.technet.com/photos/otto/images/3085597/original.aspx" width=323 mce_src="http://blogs.technet.com/photos/otto/images/3085597/original.aspx"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&lt;EM&gt;Note:&lt;/EM&gt; This Listener configuration should only be used in a trusted network environment. If the environment is not trusted (like the Internet), then configure only&amp;nbsp;specific IP Addresses or&amp;nbsp;ranges in the IPv4 and IPv6 filters.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;To configure WinRM outside of Group Policy, run the following command on the Source Computer (also see the above Note):&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;winrm quickconfig&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/SPAN&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Step 3: Configure Group Policy to enable Windows Event Forwarding on the Source Computers&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;As with WinRM, Group Policy can be used to configure Source Computers (Clients) to forward events to a collector (or set of collectors). The policy is very simple. It merely tells the Source Computer to contact a specific FQDN (Fully Qualified Domain Name) or IP Address and request subscription specifics. All of the other subscription details are held on the Collector.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 513px; HEIGHT: 426px" height=426 src="http://blogs.technet.com/photos/otto/images/3085596/original.aspx" width=513 mce_src="http://blogs.technet.com/photos/otto/images/3085596/original.aspx"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;If Group Policy is not being used, then there is nothing to do here as the "Collector Initiated" Subscription will proactively reach out to the Source Computer.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Step 4: Test Event Forwarding&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;If all of the Event Forwarding components are functioning (and there's minimal network latency), a test event created on the Source Computer should arrive in the Collector's "Forwarded Events" log within 60 seconds. Create a test event with the following command:&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;P mce_keep="true"&gt;eventcreate /id 999 /t error /l application /d "Test event."&lt;/P&gt;&lt;/SPAN&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 601px; HEIGHT: 297px" height=297 src="http://blogs.technet.com/photos/otto/images/3085601/original.aspx" width=601 mce_src="http://blogs.technet.com/photos/otto/images/3085601/original.aspx"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;This event should appear on the Collector as follows:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 560px; HEIGHT: 390px" height=390 src="http://blogs.technet.com/photos/otto/images/3085602/original.aspx" width=560 mce_src="http://blogs.technet.com/photos/otto/images/3085602/original.aspx"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;If the event doesn't appear, perform the following troubleshooting steps:&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Troubleshooting Step 1: Has Policy Been Applied to the Source Computer?&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;This can be forced by running the following command on the Source Computer:&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;P mce_keep="true"&gt;gpupdate /force&lt;/P&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Troubleshooting Step 2: Can the Collector Reach The Source Computer via WinRM?&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;Run the following command on the Collector&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;winrm id /r:&amp;lt;Source Computer&amp;gt; /a:none&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;/SPAN&gt;&lt;STRONG&gt;Troubleshooting Step 3: Is the Collector Using the Right Credentials?&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;Run the following command on the Collector&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;winrm id /r:&amp;lt;Source Computer&amp;gt; /u:&amp;lt;username&amp;gt; /p:&amp;lt;password&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;/SPAN&gt;&lt;EM&gt;Note:&lt;/EM&gt; These are the credentials defined in the Subscription on the Collector. The credentials don't need to be in the local Administrators group on the Source Computer, they just need to be in the "Event Log Readers" group on the Source Computer (local Administrators will also work).&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Troubleshooting Step 4: Has the Source Computer Registered with the Collector?&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;Run the following command on the Collector&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;wecutil gr &amp;lt;subscription name&amp;gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P mce_keep="true"&gt;This will list all the registered Source Computers (note if the Subscription is "Collector Initiated" then this will list all configured Source Computers), their state (from the Collector's perspective), and their last heartbeat time.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Enjoy!&lt;/STRONG&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3085618" width="1" height="1"&gt;</description></item><item><title>Reference The Event That Triggered Your Task</title><link>http://blogs.technet.com/otto/archive/2007/11/09/find-the-event-that-triggered-your-task.aspx</link><pubDate>Sat, 10 Nov 2007 00:29:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2383596</guid><dc:creator>ottoh</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/otto/comments/2383596.aspx</comments><wfw:commentRss>http://blogs.technet.com/otto/commentrss.aspx?PostID=2383596</wfw:commentRss><description>&lt;P&gt;Task Scheduler 2.0 (which shipped with Vista and Windows Server 2008) is a complete re-write of the built-in Windows Task Scheduler. Task Scheduler 2.0 is a fantastic automation tool that includes new powerful triggers like "from Event". From a task's perspective, I'm going to outline how to determine which event is responsible for triggering a task. This can be helpful when the task may want to branch depending on the type of event, or the task may want to report more information about the specific event content.&lt;/P&gt;
&lt;P&gt;For example, suppose you want a task to notify you every time a Service is Stopped on your server. This would require a task to inspect the details of the specific Service Control Manager event in order to figure out the affected Service (by name) as well as the state change (was it stopped or started?). This is also a good example because&amp;nbsp;the Service Start/Stopped events use the same EventID, so further event inspection of the event content&amp;nbsp;is required.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 1: Create the Task&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Create your task (either by selecting "Attach A Task To This Event..." from the Event Viewer, or manually selecting the "On an event" Trigger when building the Task inside the Task Scheduler.&lt;/P&gt;
&lt;P&gt;Event Viewer Example:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/2383627/original.aspx" mce_src="http://blogs.technet.com/photos/otto/images/2383627/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;Task Scheduler Example:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/2383541/original.aspx" mce_src="http://blogs.technet.com/photos/otto/images/2383541/original.aspx"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Step 2: Export the Task&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;From within Task Scheduler, export the newly created task (as an XML file)&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/2383593/original.aspx" mce_src="http://blogs.technet.com/photos/otto/images/2383593/original.aspx"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Step 3: Modify the Task&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Use Notepad (or your text editor of choice - keep in mind the text editor must honor unicode which notepad does) to add the Event parameters you which to pass along to your task. The event parameters below are the most useful for event identification. Notice the entire node &amp;lt;ValueQueries&amp;gt; and its children need to be added to the EventTrigger branch.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/2383318/original.aspx" mce_src="http://blogs.technet.com/photos/otto/images/2383318/original.aspx"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Step 4: Pass the Values to Your Action&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;The following example shows how the event values can be used the simple Message Box action.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/2383305/original.aspx" mce_src="http://blogs.technet.com/photos/otto/images/2383305/original.aspx"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Step 5: The Result&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Now&amp;nbsp;the following message box will fire every time the Event Trigger condition is met. Notice the 3 Event parameters that are displayed in the message box.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/2383165/original.aspx" mce_src="http://blogs.technet.com/photos/otto/images/2383165/original.aspx"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Step 6: Next Steps - Display The Whole Source Event&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;With the above parameters, the specific event can be tracked down for ever more information about the event. For example, the following WEVTUTIL.EXE utility can be used to display the specific event (substitute the variables $eventLog and $eventRecordID as needed):&lt;/P&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;P&gt;wevtutil qe $eventLog /f:RenderedXML /e:EVENTS /q:"&amp;lt;QueryList&amp;gt;&amp;lt;Query Id='0' Path='$eventLog'&amp;gt;&amp;lt;Select Path='$eventLog'&amp;gt;*[System[(EventRecordID=$eventRecordID)]]&amp;lt;/Select&amp;gt;&amp;lt;/Query&amp;gt;&amp;lt;/QueryList&amp;gt;"&lt;/P&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Step 7: Next Steps -&amp;nbsp;Find Other Event Parameters&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Any Event Parameter can be passed to a task. Event parameters can be found by inspecting the specific Event's Properties&amp;nbsp;using the Event Viewer.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/2383702/original.aspx" mce_src="http://blogs.technet.com/photos/otto/images/2383702/original.aspx"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Example Task:&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-16"?&amp;gt;&lt;BR&gt;&amp;lt;Task version="1.2" xmlns="&lt;A href="http://schemas.microsoft.com/windows/2004/02/mit/task"&gt;http://schemas.microsoft.com/windows/2004/02/mit/task&lt;/A&gt;"&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;RegistrationInfo&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Date&amp;gt;2007-11-09T09:21:33.3102706&amp;lt;/Date&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Author&amp;gt;Otto Helweg&amp;lt;/Author&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/RegistrationInfo&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;Triggers&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;EventTrigger&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Enabled&amp;gt;true&amp;lt;/Enabled&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Subscription&amp;gt;&amp;amp;lt;QueryList&amp;amp;gt;&amp;amp;lt;Query Id="0" Path="Application"&amp;amp;gt;&amp;amp;lt;Select Path="Application"&amp;amp;gt;*&amp;amp;lt;/Select&amp;amp;gt;&amp;amp;lt;Select Path="Security"&amp;amp;gt;*&amp;amp;lt;/Select&amp;amp;gt;&amp;amp;lt;Select Path="System"&amp;amp;gt;*&amp;amp;lt;/Select&amp;amp;gt;&amp;amp;lt;/Query&amp;amp;gt;&amp;amp;lt;/QueryList&amp;amp;gt;&amp;lt;/Subscription&amp;gt;&lt;BR&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ValueQueries&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Value name="eventChannel"&amp;gt;Event/System/Channel&amp;lt;/Value&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Value name="eventRecordID"&amp;gt;Event/System/EventRecordID&amp;lt;/Value&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Value name="eventSeverity"&amp;gt;Event/System/Level&amp;lt;/Value&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ValueQueries&amp;gt;&lt;BR&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/EventTrigger&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/Triggers&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;Principals&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Principal id="Author"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;UserId&amp;gt;SomeUser&amp;lt;/UserId&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LogonType&amp;gt;InteractiveToken&amp;lt;/LogonType&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RunLevel&amp;gt;LeastPrivilege&amp;lt;/RunLevel&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Principal&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/Principals&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;Settings&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;IdleSettings&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Duration&amp;gt;PT10M&amp;lt;/Duration&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;WaitTimeout&amp;gt;PT1H&amp;lt;/WaitTimeout&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;StopOnIdleEnd&amp;gt;true&amp;lt;/StopOnIdleEnd&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RestartOnIdle&amp;gt;false&amp;lt;/RestartOnIdle&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/IdleSettings&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MultipleInstancesPolicy&amp;gt;Queue&amp;lt;/MultipleInstancesPolicy&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DisallowStartIfOnBatteries&amp;gt;true&amp;lt;/DisallowStartIfOnBatteries&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;StopIfGoingOnBatteries&amp;gt;true&amp;lt;/StopIfGoingOnBatteries&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AllowHardTerminate&amp;gt;true&amp;lt;/AllowHardTerminate&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;StartWhenAvailable&amp;gt;false&amp;lt;/StartWhenAvailable&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RunOnlyIfNetworkAvailable&amp;gt;false&amp;lt;/RunOnlyIfNetworkAvailable&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AllowStartOnDemand&amp;gt;true&amp;lt;/AllowStartOnDemand&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Enabled&amp;gt;true&amp;lt;/Enabled&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Hidden&amp;gt;false&amp;lt;/Hidden&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RunOnlyIfIdle&amp;gt;false&amp;lt;/RunOnlyIfIdle&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;WakeToRun&amp;gt;false&amp;lt;/WakeToRun&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ExecutionTimeLimit&amp;gt;P3D&amp;lt;/ExecutionTimeLimit&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Priority&amp;gt;7&amp;lt;/Priority&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/Settings&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;Actions Context="Author"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ShowMessage&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Event Parameters&amp;lt;/Title&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&amp;lt;Body&amp;gt;Record ID = $(eventRecordID)&lt;BR&gt;Log = $(eventChannel)&lt;BR&gt;Severity = $(eventSeverity)&amp;lt;/Body&amp;gt;&lt;BR&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ShowMessage&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/Actions&amp;gt;&lt;BR&gt;&amp;lt;/Task&amp;gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2383596" width="1" height="1"&gt;</description></item><item><title>Quick and Dirty Web Site Monitoring with PowerShell</title><link>http://blogs.technet.com/otto/archive/2007/08/23/quick-and-dirty-web-site-monitoring-with-powershell.aspx</link><pubDate>Thu, 23 Aug 2007 19:44:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:1810231</guid><dc:creator>ottoh</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.technet.com/otto/comments/1810231.aspx</comments><wfw:commentRss>http://blogs.technet.com/otto/commentrss.aspx?PostID=1810231</wfw:commentRss><description>&lt;P&gt;The other day&amp;nbsp;Mark noticed that redirections for our &lt;A href="http://www.sysinternals.com/"&gt;http://www.sysinternals.com/&lt;/A&gt; URL were intermittently failing. In order to get more objective data, I built a script that tested the URL every 5 seconds, and reported back Success or Failure as well as performance (how long it took to completely download base HTML content). I found that PowerShell provided&amp;nbsp;an easy way to use the&amp;nbsp;WebClient .Net object and evaluate the returned HTML content.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/1810288/original.aspx" mce_src="http://blogs.technet.com/photos/otto/images/1810288/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;Don't have PowerShell? Get it &lt;A class="" href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx" mce_href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Example 1: Single Site Monitoring&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The following example opens a URL every 5 minutes, tests the content, and measures the time it took to download the HTML for the page. Notice that all the HTML is dumped into a big fat string. The string is then searched for specific text that is known to be in the requested page. Note that this script runs forever and can be stopped with a &amp;lt;Ctrl&amp;gt;&amp;nbsp;'C'.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Example PowerShell script:&lt;/P&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;$webClient = new-object System.Net.WebClient&lt;BR&gt;$webClient.Headers.Add("user-agent", "PowerShell Script")&lt;/P&gt;
&lt;P&gt;while (1 -eq 1) {&lt;BR&gt;&amp;nbsp;&amp;nbsp; $output = ""&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; $startTime = get-date&lt;BR&gt;&amp;nbsp;&amp;nbsp; $output = $webClient.DownloadString("&lt;A href="http://www.sysinternals.com/"&gt;http://www.sysinternals.com/&lt;/A&gt;")&lt;BR&gt;&amp;nbsp;&amp;nbsp; $endTime = get-date&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; if ($output -like "*Mark Russinovich*") {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Success`t`t" + $startTime.DateTime + "`t`t" + ($endTime - $startTime).TotalSeconds + " seconds"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Fail`t`t" + $startTime.DateTime + "`t`t" + ($endTime - $startTime).TotalSeconds + " seconds"&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; sleep(300)&lt;BR&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/1810007/original.aspx" mce_src="http://blogs.technet.com/photos/otto/images/1810007/original.aspx"&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Example 2:&amp;nbsp;Monitoring and Alerting for Multiple Web Sites&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This script monitors multiple URLs (or web sites), and incorporates e-mail alerting and logging. Unlike the above script, it is designed to be triggered from the Windows Task Scheduler (or some other job scheduler) rather than running forever in a loop. Notice that one of the URLs is actually a zipped file and PowerShell has no problem evaluating it as a string.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Example PowerShell script:&lt;/P&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;# Collects all named paramters (all others end up in $Args)&lt;BR&gt;param($alert)&lt;/P&gt;
&lt;P&gt;# Display Help&lt;BR&gt;if (($Args[0] -eq "-?") -or ($Args[0] -eq "-help")) {&lt;BR&gt;&amp;nbsp;&amp;nbsp; ""&lt;BR&gt;&amp;nbsp;&amp;nbsp; "Usage: SysinternalsSiteTest.ps1 -alert &amp;lt;address&amp;gt; -log"&lt;BR&gt;&amp;nbsp;&amp;nbsp; "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -alert &amp;lt;address&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Send e-mail alerts"&lt;BR&gt;&amp;nbsp;&amp;nbsp; "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -log&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log results"&lt;BR&gt;&amp;nbsp;&amp;nbsp; ""&lt;BR&gt;&amp;nbsp;&amp;nbsp; "Example: SysinternalsSiteTest.ps1 -alert &lt;A href="mailto:somebody@nospam.com"&gt;somebody@nospam.com&lt;/A&gt; -log"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;""&lt;BR&gt;&amp;nbsp;&amp;nbsp; exit&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;# Create the variables&lt;BR&gt;$global:GArgs = $Args&lt;/P&gt;
&lt;P&gt;$urlsToTest = @{}&lt;BR&gt;$urlsToTest["Sysinternals Redirect"] = "&lt;A href="http://www.sysinternals.com/"&gt;http://www.sysinternals.com&lt;/A&gt;"&lt;BR&gt;$urlsToTest["TechNet Redirect"] = "&lt;A href="http://www.microsoft.com/sysinternals"&gt;http://www.microsoft.com/sysinternals&lt;/A&gt;"&lt;BR&gt;$urlsToTest["Sysinternals Home"] = "&lt;A href="http://www.microsoft.com/technet/sysinternals/default.mspx"&gt;http://www.microsoft.com/technet/sysinternals/default.mspx&lt;/A&gt;"&lt;BR&gt;$urlsToTest["Sysinternals Forum"] = "&lt;A href="http://forum.sysinternals.com/"&gt;http://forum.sysinternals.com&lt;/A&gt;"&lt;BR&gt;$urlsToTest["Sysinternals Blog"] = "&lt;A href="http://blogs.technet.com/sysinternals"&gt;http://blogs.technet.com/sysinternals&lt;/A&gt;"&lt;BR&gt;$urlsToTest["Sysinternals Downloads"] = "&lt;A href="http://download.sysinternals.com/Files/NtfsInfo.zip"&gt;http://download.sysinternals.com/Files/NtfsInfo.zip&lt;/A&gt;"&lt;/P&gt;
&lt;P&gt;$successCriteria = @{}&lt;BR&gt;$successCriteria["Sysinternals Redirect"] = "*Mark Russinovich*"&lt;BR&gt;$successCriteria["TechNet Redirect"] = "*Mark Russinovich*"&lt;BR&gt;$successCriteria["Sysinternals Home"] = "*Mark Russinovich*"&lt;BR&gt;$successCriteria["Sysinternals Forum"] = "*Sysinternals Utilities*"&lt;BR&gt;$successCriteria["Sysinternals Blog"] = "*Sysinternals Site Discussion*"&lt;BR&gt;$successCriteria["Sysinternals Downloads"] = "*ntfsinfo.exe*"&lt;/P&gt;
&lt;P&gt;$userAgent = "PowerShell User"&lt;BR&gt;$webClient = new-object System.Net.WebClient&lt;BR&gt;$webClient.Headers.Add("user-agent", $userAgent)&lt;/P&gt;
&lt;P&gt;foreach ($key in $urlsToTest.Keys) {&lt;BR&gt;&amp;nbsp;&amp;nbsp; $output = ""&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; $startTime = get-date&lt;BR&gt;&amp;nbsp;&amp;nbsp; $output = $webClient.DownloadString($urlsToTest[$key])&lt;BR&gt;&amp;nbsp;&amp;nbsp; $endTime = get-date&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; if ($output -like $successCriteria[$key]) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $key + "`t`tSuccess`t`t" + $startTime.DateTime + "`t`t" + ($endTime - $startTime).TotalSeconds + " seconds"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($GArgs -eq "-log") {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $key + "`t`tSuccess`t`t" + $startTime.DateTime + "`t`t" + ($endTime - $startTime).TotalSeconds + " seconds" &amp;gt;&amp;gt; WebSiteTest.log&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp; } else {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $key + "`t`tFail`t`t" + $startTime.DateTime + "`t`t" + ($endTime - $startTime).TotalSeconds + " seconds"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($GArgs -eq "-log") {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $key + "`t`tFail`t`t" + $startTime.DateTime + "`t`t" + ($endTime - $startTime).TotalSeconds + " seconds" &amp;gt;&amp;gt; WebSiteTest.log&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($alert) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $emailFrom = "&lt;A href="mailto:computer@nospam.com"&gt;computer@nospam.com&lt;/A&gt;"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $emailTo = $alert&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $subject = "URL Test Failure - " + $startTime&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $body = "URL Test Failure: " + $key + " (" + $urlsToTest[$key] + ") at " + $startTime&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $smtpServer = "somesmtpserver.nospam.com"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $smtp = new-object Net.Mail.SmtpClient($smtpServer)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $smtp.Send($emailFrom,$emailTo,$subject,$body)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/1810215/original.aspx" mce_src="http://blogs.technet.com/photos/otto/images/1810215/original.aspx"&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1810231" width="1" height="1"&gt;</description></item><item><title>Quick and Dirty Software Inventory with PsInfo and PowerShell</title><link>http://blogs.technet.com/otto/archive/2007/03/04/quick-and-dirty-software-inventory-with-psinfo-and-powershell.aspx</link><pubDate>Sun, 04 Mar 2007 23:30:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:674021</guid><dc:creator>ottoh</dc:creator><slash:comments>14</slash:comments><comments>http://blogs.technet.com/otto/comments/674021.aspx</comments><wfw:commentRss>http://blogs.technet.com/otto/commentrss.aspx?PostID=674021</wfw:commentRss><description>&lt;P&gt;&lt;A href="http://www.microsoft.com/technet/sysinternals/utilities/psinfo.mspx" mce_href="http://www.microsoft.com/technet/sysinternals/utilities/psinfo.mspx"&gt;PsInfo&lt;/A&gt; is great for gathering asset information from Windows computers, both locally and remotely. &lt;A href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx" mce_href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;PowerShell&lt;/A&gt; is great for automation and cleaning up output (among other things) as well as working with database driven data.&lt;/P&gt;
&lt;P mce_keep="true"&gt;The following examples show how to gather an itemized list of the installed software on remote machines, process the data, then either display it to the screen or store it in a database. &lt;STRONG&gt;It's worth noting that PsInfo can also work on multiple remote computers from its native command line, or even read a list of computers from a file&lt;/STRONG&gt; (check out the &lt;A class="" href="http://www.microsoft.com/technet/sysinternals/utilities/psinfo.mspx" mce_href="http://www.microsoft.com/technet/sysinternals/utilities/psinfo.mspx"&gt;PsInfo&lt;/A&gt; site for more info). Since the final example seeks to show PsInfo in a database driven envoriment, PowerShell comes in very handy.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Note: In order for this example to work the necessary network connectivity and credentials will need to be in place.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Consider the following examples:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;1 - The output is merely displayed on the screen. With this method the output can be redirected to a file and imported into an application like Excel for further analysis or record keeping.&lt;/P&gt;
&lt;P mce_keep="true"&gt;2 - A database is used to drive the computers polled as well as store the output. The database table is very flat (one table) with 2 fields: 'Computer' and 'Software'. For large amounts of data, this will need to be normalized.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/674184/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;With the following output (imported into Excel):&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/674151/original.aspx" border=0&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Example 1: Standard Screen Output&lt;/B&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;The following PowerShell script gathers a software inventory from 3 remote computers ('happyhour', 'shaken', and 'extradry'). Presumably, your computer names will be different. After gathering and parsing the data, it's then displayed on the screen for all machines successfully queried.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Before running this script, test your connectivity and credentials with a single PsInfo command:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;PsInfo -s Applications &lt;/STRONG&gt;&lt;STRONG&gt;\\somecomputer&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;Example PowerShell script:&lt;/P&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;BLOCKQUOTE&gt;$computersToQuery = ("happyhour","shaken","extradry")&lt;BR&gt;&lt;BR&gt;$softwareInventory = @{}&lt;BR&gt;foreach ($computer in $computersToQuery) {&lt;BR&gt;&amp;nbsp;&amp;nbsp; $psinfoOutput = ./psinfo.exe -s Applications \\$computer&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; $foundSoftwareInventory = 0&lt;BR&gt;&amp;nbsp;&amp;nbsp; $computerName = ""&lt;BR&gt;&amp;nbsp;&amp;nbsp; foreach ($item in $psinfoOutput) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($foundSoftwareInventory -eq 1) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Force the results to a string&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Remove any single quotes which interfere with T-SQL statements&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Load the result into a hash whereby removing any duplicates&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [string]$softwareInventory[$computerName][$item.Replace("'","")] = ""&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($item -like "System information for *") {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $computerName = $item.Split("\")[2].TrimEnd(":")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } elseif ($item -eq "Applications:") {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $foundSoftwareInventory = 1&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $softwareInventory[$computerName] = @{}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;foreach ($computer in $softwareInventory.Keys) {&lt;BR&gt;&amp;nbsp;&amp;nbsp; foreach ($softwareItem in $softwareInventory[$computer].Keys) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $computer + ":" + $softwareItem&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;BR&gt;&lt;/BLOCKQUOTE&gt;&lt;/SPAN&gt;
&lt;P mce_keep="true"&gt;Your output should look something like:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/674025/original.aspx" border=0&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Example 2: Save Output to a Database&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;This example is additive to the first in that it adds the following 3 items:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;1- Pulls the list of computer to query from a database table&lt;/LI&gt;
&lt;LI&gt;2- Adds the current data and time to the result&lt;/LI&gt;
&lt;LI&gt;3- Records the audit results into a database&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;The following is the database schema for this example:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/674022/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Example PowerShell script:&lt;/P&gt;&lt;SPAN style="FONT-FAMILY: Courier"&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;# Open the database connection&lt;BR&gt;$dbConn = new-object System.Data.SqlClient.SqlConnection "server=kcdb;database=Inventory;Integrated Security=sspi"&lt;BR&gt;$dbConn.Open()&lt;BR&gt;$sqlQuery = $dbConn.CreateCommand()&lt;BR&gt;&lt;BR&gt;# Get all known computers&lt;BR&gt;$sqlQuery.CommandText = "select * from Inventory..Computers"&lt;BR&gt;$reader = $sqlQuery.ExecuteReader()&lt;BR&gt;$computersToQuery = @()&lt;BR&gt;while ($reader.Read()) {&lt;BR&gt;&amp;nbsp;&amp;nbsp; $computersToQuery += $reader["Computer"]&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;# Close the database connection&lt;BR&gt;$dbConn.Close()&lt;BR&gt;&lt;BR&gt;$softwareInventory = @{}&lt;BR&gt;foreach ($computer in $computersToQuery) {&lt;BR&gt;&amp;nbsp;&amp;nbsp; $psinfoOutput = ./psinfo.exe -s Applications \\$computer&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; $foundSoftwareInventory = 0&lt;BR&gt;&amp;nbsp;&amp;nbsp; $computerName = ""&lt;BR&gt;&amp;nbsp;&amp;nbsp; foreach ($item in $psinfoOutput) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($foundSoftwareInventory -eq 1) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Force the results to a string&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Remove any single quotes which interfere with T-SQL statements&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Load the result into a hash whereby removing any duplicates&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [string]$softwareInventory[$computerName][$item.Replace("'","")] = ""&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($item -like "System information for *") {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $computerName = $item.Split("\")[2].TrimEnd(":")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } elseif ($item -eq "Applications:") {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $foundSoftwareInventory = 1&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $softwareInventory[$computerName] = @{}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;$dbConn = new-object System.Data.SqlClient.SqlConnection "server=kcdb;database=Inventory;Integrated Security=sspi"&lt;BR&gt;$dbConn.Open()&lt;BR&gt;$sqlQuery = $dbConn.CreateCommand()&lt;BR&gt;&lt;BR&gt;foreach ($computer in $softwareInventory.Keys) {&lt;BR&gt;&amp;nbsp;&amp;nbsp; foreach ($softwareItem in $softwareInventory[$computer].Keys) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Loading-" + $computer + ":" + $softwareItem&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Try an Insert than an Update&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trap {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $sqlQuery.CommandText = "update Inventory..SoftwareInventory set AuditDate = getdate() where&amp;nbsp; Computer = '" + $computer + "' and Software = '" + $softwareItem + "'"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $result = $sqlQuery.ExecuteNonQuery()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $sqlQuery.CommandText = "insert into Inventory..SoftwareInventory (Computer,Software,AuditDate) values ('" + $computer + "','" + $softwareItem + "',getdate())"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $result = $sqlQuery.ExecuteNonQuery()&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;$dbConn.Close()&lt;BR&gt;&lt;/BLOCKQUOTE&gt;&lt;/SPAN&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;For more information:&lt;/B&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Get PsInfo bits and info: &lt;A href="http://www.microsoft.com/technet/sysinternals/utilities/psinfo.mspx" mce_href="http://www.microsoft.com/technet/sysinternals/utilities/psinfo.mspx"&gt;http://www.microsoft.com/technet/sysinternals/utilities/psinfo.mspx&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Get PowerShell bits and info: &lt;A href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx" mce_href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;The PowerShell blog: &lt;A href="http://blogs.msdn.com/powershell/"&gt;http://blogs.msdn.com/powershell/&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=674021" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/otto/archive/tags/Asset/default.aspx">Asset</category><category domain="http://blogs.technet.com/otto/archive/tags/Inventory/default.aspx">Inventory</category><category domain="http://blogs.technet.com/otto/archive/tags/PsInfo/default.aspx">PsInfo</category><category domain="http://blogs.technet.com/otto/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>Automate E-Mail Alerts with Windows Vista</title><link>http://blogs.technet.com/otto/archive/2007/03/01/e-mail-alerts-with-windows-vista.aspx</link><pubDate>Thu, 01 Mar 2007 22:24:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:667250</guid><dc:creator>ottoh</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/otto/comments/667250.aspx</comments><wfw:commentRss>http://blogs.technet.com/otto/commentrss.aspx?PostID=667250</wfw:commentRss><description>&lt;P&gt;The Windows&amp;nbsp;Task Scheduler as been completely re-written for Windows Vista&amp;nbsp;to be a very powerful automation tool. The Task Scheduler now has the ability to launch tasks from a wide variety of useful triggers rather than being limited to the standard time based trigger.&amp;nbsp;One of the most powerful triggers is the 'On an event' trigger and this example can easly be extended to leverage it for even more alerting options.&amp;nbsp;In addition, tasks can now&amp;nbsp;execute notifications (message box and e-mail)&amp;nbsp;where they were previously limited to the&amp;nbsp;standard command line action.&lt;/P&gt;
&lt;P&gt;This example sets up a simple e-mail alert using Task Scheduler and PowerShell which sends an e-mail every time somebody connects to (login, remote desktop, or unlocks) the local computer. This might be useful for auditing access to critical systems in a data center.&lt;/P&gt;
&lt;P&gt;Consider the 2 options for sending an e-mail alert from the new Task Scheduler:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/667244/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;1 - E-Mail Action using PowerShell:&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Since this PowerShell script uses the SmtpClient object in Windows, it has more flexibility when dealing with SMTP server authentication requirements. This example sends the alert e-mail through an SMTP server that does not require authentication.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;2- E-Mail directly through a Task Scheduler action:&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Although the new Task Scheduler supports direct e-mail actions via SMTP, it is limited to fairly specific scenarios. It will only work if authentication is required by the SMTP server &lt;STRONG&gt;and&lt;/STRONG&gt; the credentials used for the SMTP authentication need to be the same credentials used to run the task. For these reasons, this example will focus on option #1.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Step 1:&lt;/STRONG&gt; Open 'Task Scheduler' and create a task to run whether the user is logged on or not&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/667240/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 2:&lt;/STRONG&gt; Create 3 triggers ('At log on', 'On connection to user session', 'On workstation unlock'). Notice that an 'On event' trigger may be used instead to track a wide variety of state changes in a computer.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/667243/original.aspx" border=0&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 3:&lt;/STRONG&gt; Create the action to run the PowerShell e-mail script&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/667245/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 4:&lt;/STRONG&gt; Create the PowerShell script (for this example it's called 'ConnectionAlert.ps1')&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;$emailFrom = "computer@nospam.com"&lt;BR&gt;$emailTo = "somebody@nospam.com"&lt;BR&gt;$subject = "Connection Alert"&lt;BR&gt;$body = "Somebody has connected to the computer."&lt;BR&gt;$smtpServer = "somesmtpserver.nospam.com"&lt;BR&gt;$smtp = new-object Net.Mail.SmtpClient($smtpServer)&lt;BR&gt;$smtp.Send($emailFrom,$emailTo,$subject,$body)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Step 5:&lt;/STRONG&gt; Test the PowerShell Script&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;C:\&amp;gt; PowerShell ./ConnectionAlert.ps1&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Step 6:&lt;/STRONG&gt; Test the Task by running it directly from the Task Scheduler, then by locking and unlocking the computer.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;For more information:&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Windows Vista Task Scheduler: &lt;A href="http://msdn2.microsoft.com/en-us/library/aa383614.aspx"&gt;http://msdn2.microsoft.com/en-us/library/aa383614.aspx&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Get PowerShell bits and information: &lt;A class="" href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx" mce_href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=667250" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/otto/archive/tags/Alerts/default.aspx">Alerts</category><category domain="http://blogs.technet.com/otto/archive/tags/Automation/default.aspx">Automation</category><category domain="http://blogs.technet.com/otto/archive/tags/Vista/default.aspx">Vista</category><category domain="http://blogs.technet.com/otto/archive/tags/Task+Scheduler/default.aspx">Task Scheduler</category></item><item><title>WS-Man Ping Test</title><link>http://blogs.technet.com/otto/archive/2007/02/21/ws-man-ping-test.aspx</link><pubDate>Wed, 21 Feb 2007 22:24:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:656815</guid><dc:creator>ottoh</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/otto/comments/656815.aspx</comments><wfw:commentRss>http://blogs.technet.com/otto/commentrss.aspx?PostID=656815</wfw:commentRss><description>&lt;P&gt;WS-Man (Windows Remote Management) is a new protocol and framework&amp;nbsp;first delivered in Windows 2003 R2 and is more prevalent in Windows Vista and beyond.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's an easy way to test WS-Man reachability that is&amp;nbsp;similar to the network ping concept by testing both the network connectivity as well as the end-point service. The main component that is &lt;STRONG&gt;not&lt;/STRONG&gt; tested by 'winrm id...' is security (authentication). The following examples use an end-point system called 'wsman.msft.net' which may or may not exist. At the time of this posting, it was active.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/656828/original.aspx" border=0 mce_src="http://blogs.technet.com/photos/otto/images/656828/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;Consider the 2 basic network configurations.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1 - Direct connectivity:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Direct connectivity implies that there are no intermediate network proxies or that the intermediate network devices attempt to be transparent. Transparent devices include Network Address Translators (NATs), routers, etc. In the direct connectivity model, the following WS-Man Id command should work as is, therefore successfully testing the end point's WS-Man service availability.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;winrm id -auth:none -remote:wsman.msft.net&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;2- Indirect connectivity:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;When there is a non-transparent network device like a proxy between both end points, WinRM uses the proxy identified in&amp;nbsp;the winhttp agent&amp;nbsp;configuration (this is different than the proxy defined in IE). Much like IE needs to be aware of proxies in the environment for Internet or external connectivity, so does WinRM. This can be accomplished by&amp;nbsp;using Net Shell to configure&amp;nbsp;winhttp to route through a proxy&amp;nbsp;as follows (run from an elevated command prompt).&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;netsh winhttp set proxy proxy-server=&lt;/STRONG&gt;&lt;STRONG&gt;http://someproxy/&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Now the following WS-Man ping should work.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;winrm id -auth:none -remote:wsman.msft.net&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/656829/original.aspx" border=0 mce_src="http://blogs.technet.com/photos/otto/images/656829/original.aspx"&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=656815" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/otto/archive/tags/WS-Man/default.aspx">WS-Man</category><category domain="http://blogs.technet.com/otto/archive/tags/Ping/default.aspx">Ping</category><category domain="http://blogs.technet.com/otto/archive/tags/Windows+Remote+Management/default.aspx">Windows Remote Management</category><category domain="http://blogs.technet.com/otto/archive/tags/WinRM/default.aspx">WinRM</category></item><item><title>A Few Good Vista WS-Man (WinRM) Commands</title><link>http://blogs.technet.com/otto/archive/2007/02/09/sample-vista-ws-man-winrm-commands.aspx</link><pubDate>Sat, 10 Feb 2007 02:57:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:632975</guid><dc:creator>ottoh</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.technet.com/otto/comments/632975.aspx</comments><wfw:commentRss>http://blogs.technet.com/otto/commentrss.aspx?PostID=632975</wfw:commentRss><description>&lt;P&gt;In Vista, a lot of instrumentation, configuration, and utilization information is exposed via WS-Man. Vista WS-Man (aka: WS-Management, Windows Remote Management, and WinRM) incorporates&amp;nbsp;many features, but I like to think of it as the management protocol/framework of the future (look out SNMP!). What makes WS-Man so great is the fact that it's all standards based, rides on HTTP/HTTPS (very firewall/NAT friendly), and packages its data in SOAP/XML packets (easy to shove into a database or use with a script).&lt;/P&gt;
&lt;P&gt;Out of the box; Vista WS-Man exposes WMI information as well as Windows Remote Shell capabilities. What this means is that with WS-Man it's much easier to get instrumentation from remote machines as well as use that info in scripts.&lt;/P&gt;
&lt;P&gt;Here are some sample commands to play with. If you cannot get the ‘Test WS-Man...' step to work, none of the steps following will work either (you're probably not using the right credentials to access the remote machine). One more caveat, the remote commands work best on domain joined machines. For workgroup machines, the WinRM service needs additional configuration.&lt;/P&gt;
&lt;P&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=0 width=685 border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P align=center&gt;&lt;B&gt;Description&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P align=center&gt;&lt;B&gt;Command&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=685 colSpan=2&gt;
&lt;P align=center&gt;&lt;I&gt;Run from an &lt;B&gt;Elevated&lt;/B&gt; Command prompt&lt;/I&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Quickly configure the WS-Man service&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrm QuickConfig&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Quickly delete the WS-Man listener&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrm invoke Restore winrm/Config @{}&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=685 colSpan=2&gt;
&lt;P align=center&gt;&lt;I&gt;Run from an &lt;B&gt;standard&lt;/B&gt; Command prompt&lt;/I&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Display your machine's basic hardware info&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrm enumerate wmicimv2/Win32_ComputerSystem&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Display your operating system properties&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrm get wmicimv2/Win32_OperatingSystem&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Output your OS info in XML&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrm get wmicimv2/Win32_OperatingSystem -format:pretty&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Ping WS-Man on a remote machine&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrm id -auth:none -remote:&amp;lt;some machine&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Test WS-Man access to a remote machine**&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrm id -remote:&amp;lt;some machine&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Grab a remote machine's WS-Man config&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrm get winrm/Config -r:&amp;lt;some machine&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Grab a remote machine's CPU load&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrm g wmicimv2/Win32_Processor?DeviceID=CPU0 -fragment:LoadPercentage -r:&amp;lt;some computer&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Grab a remote machine's free memory&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrm g wmicimv2/Win32_OperatingSystem -fragment:FreePhysicalMemory -r:&amp;lt;some computer&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Stop a service on a remote machine&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrm invoke stopservice wmicimv2/Win32_Service?name=w32time -r:&amp;lt;some computer&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Start a service on a remote machine&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrm invoke startservice wmicimv2/Win32_Service?name=w32time -r:&amp;lt;some computer&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Reboot a remote machine&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrm invoke reboot wmicimv2/Win32_OperatingSystem -r:&amp;lt;some computer&amp;gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Run a command on a remote machine (this uses winr&lt;B&gt;S&lt;/B&gt;, not winr&lt;B&gt;M&lt;/B&gt;)&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;winrs -r:&amp;lt;some computer&amp;gt; ipconfig /all&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=685 colSpan=2&gt;
&lt;P align=center&gt;&lt;I&gt;Run from &lt;B&gt;PowerShell&lt;/B&gt;&lt;/I&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Use PowerShell to grab the WS-Man Win32_OperatingSystem XML output&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;[xml]$osInfo = winrm get wmicimv2/Win32_OperatingSystem /format:pretty&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Display the OS version property&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;$osInfo.Win32_OperatingSystem.Version&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Display the last boot time&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;$osInfo.Win32_OperatingSystem.LastBootupTime.DateTime&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Put free memory metric into an XML variable&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;[xml]$freemem = cmd /c "winrm get wmicimv2/Win32_OperatingSystem -fragment:FreePhysicalMemory -f:pretty -r:&amp;lt;some computer&amp;gt;"&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=277&gt;
&lt;P&gt;Display the free memory value&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=408&gt;
&lt;P&gt;$freemem.XMLFragment.FreePhysicalMemory&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;**Note: This step verifies that you have good connectivity to the remote machine, WS-Man is running and properly configured on the remote machine, AND you have the correct permissions to fully leverage WS-Man on the remote machine. If this step fails, it's probably a permissions issue.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Details:&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;WS-Man (WinRM) Architecture&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The following diagram shows a high-level overview of the WS-Man (WinRM) architecture. In the diagram the 'Client' is querying the 'Server' for WS-Man information. Note that HTTP.sys and WinHTTP support the HTTP(s) transport for WS-Man, not IIS. In addition, IIS (or another web publishing service) can co-exist with WS-Man and share port 80.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/641897/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Quickly configure the WS-Man service&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Remember, this needs to be run from an 'Elevated' Command Prompt.&lt;/P&gt;
&lt;P&gt;As you can see, this simple command does quite a bit. Please note every modification (hightlighted) since this might increase the attack surface of your computer. For example, Quick Config configures a listener that accepts connections from every network interface. This is probably not ideal for edge machines that connect to unsecure networks (like the Internet). In addition, this command only needs to be run once.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/641894/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Quickly delete the WS-Man listener&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Although this command only deletes all WinRM listeners, it effectively turns off any WS-Man communication to a machine.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/641895/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Display your machine's basic hardware info and operating system properties&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Win32_ComputerSystem and Win32_OperatingSystem are common WMI classes and useful for asset information and configuration information as well as some utilization metrics.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/641890/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Output your OS info in XML&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;XML output makes the data much easier for storing in a database or dealing with programmatically (like with a script). PowerShell makes this that much easier since it works VERY well with XML (see below for a sample PowerShell script).&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/641898/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Ping WS-Man on a remote machine and test authorization credentials&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Testing WS-Man on a remote machine is very useful in troubleshooting lots of connectivity and configuration issues. When pinging WS-Man without 'auth', it allows for the testing of the connectivity and basic service configuration. Using the 'auth' parameter tests the necessary authorization. Generally the credentials need to be in the 'Administrators' group for 'auth' to work. In this case no credentials are provided so the current credentials are used (this can be over-ridden). Notice that the OS version is included when successfully using 'auth' to test WS-Man.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/641893/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Grab a remote machine's WS-Man config&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Successfully completing this step pretty much insures that one has complete access to WS-Man on the remote computer.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Grab a remote machine's CPU load, free memory, and restart a service&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;WS-Man allows for gathering WMI properties (reading and writing although we're only reading in this example) as well as invoking methods (starting and stopping a service; as well as rebooting!). Notice the minimal return code for the invoke commands (0 = success).&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/641892/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Run a command on a remote machine (this uses winrS, not winrM)&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;WinRS is another utility that leverages WS-Man. WinRS allows for the execution of local, non-interactive command-line commands on a remote machine and returns the output. In other words, if the command can be run at the CMD prompt without any required input and it only accesses local resource (no network shares for example), then it will most likely work. There are ways to get around the 'local resource' issue, but that is out of scope for this blog.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/641896/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Use PowerShell to grab instrumentation via WS-Man&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;PowerShell is great for consuming data from WS-Man since it works very well with XML. Notice that in the following example it's easy to 'surf' an object in PowerShell. In this case the XML object 'osInfo' is displayed on its own, and then expanded to the 'Win32_OperatingSystem' branch.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.technet.com/photos/otto/images/641889/original.aspx" border=0&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;A simple PowerShell script&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The following script shows how easy it is to automate the collection of WS-Man information using PowerShell.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;$machines = ("machine1","machine2","machine3")&lt;BR&gt;foreach ($machine in $machines) {&lt;BR&gt;&amp;nbsp;&amp;nbsp; [xml]$osInfo = winrm get wmicimv2/Win32_OperatingSystem /format:pretty /r:$machine&lt;BR&gt;&amp;nbsp;&amp;nbsp; $machine + ": " + $osInfo.Win32_OperatingSystem.LastBootupTime.DateTime&lt;BR&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;More Info&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;For more information on WS-Man, please see the following articles:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Microsoft: &lt;A href="http://msdn2.microsoft.com/en-us/library/aa384291.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/aa384291.aspx"&gt;About Windows Remote Management&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Microsoft: &lt;A href="http://msdn2.microsoft.com/en-us/library/aa384462.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/aa384462.aspx"&gt;Using Windows Remote Management&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Microsoft: &lt;A href="http://msdn2.microsoft.com/en-us/library/aa384466.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/aa384466.aspx"&gt;Windows Remote Management Reference&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Sun: &lt;A href="https://wiseman.dev.java.net/" mce_href="https://wiseman.dev.java.net/"&gt;A Java Implementation of WS-Man&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;SourceForge: &lt;A href="http://sourceforge.net/projects/openwsman/" mce_href="http://sourceforge.net/projects/openwsman/"&gt;Open WS-Man Project&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;DMTF (PDF): &lt;A href="http://www.dmtf.org/standards/published_documents/WS-ManFactSheet.pdf" mce_href="http://www.dmtf.org/standards/published_documents/WS-ManFactSheet.pdf"&gt;WS-Management Fact Sheet&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;DMTF (PDF): &lt;A href="http://www.dmtf.org/standards/published_documents/DSP0226.pdf" mce_href="http://www.dmtf.org/standards/published_documents/DSP0226.pdf"&gt;WS-Management Standard Document&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=632975" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/otto/archive/tags/WS-Man/default.aspx">WS-Man</category><category domain="http://blogs.technet.com/otto/archive/tags/Windows+Remote+Management/default.aspx">Windows Remote Management</category><category domain="http://blogs.technet.com/otto/archive/tags/WinRM/default.aspx">WinRM</category><category domain="http://blogs.technet.com/otto/archive/tags/WS-Shell/default.aspx">WS-Shell</category><category domain="http://blogs.technet.com/otto/archive/tags/WS-Management/default.aspx">WS-Management</category></item></channel></rss>