<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PowerShell 2.0: One Cmdlet at a Time #12 Write-EventLog</title>
	<atom:link href="http://www.jonathanmedd.net/2009/12/powershell-2-0-one-cmdlet-at-a-time-12-write-eventlog.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jonathanmedd.net/2009/12/powershell-2-0-one-cmdlet-at-a-time-12-write-eventlog.html</link>
	<description>Scripting. Powershell, VMware, Windows, Active Directory &#38; Exchange. All that kind of stuff.....</description>
	<lastBuildDate>Wed, 01 Feb 2012 15:43:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Jonathan Medd</title>
		<link>http://www.jonathanmedd.net/2009/12/powershell-2-0-one-cmdlet-at-a-time-12-write-eventlog.html/comment-page-1#comment-3385</link>
		<dc:creator>Jonathan Medd</dc:creator>
		<pubDate>Thu, 03 Dec 2009 19:38:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonathanmedd.net/?p=344#comment-3385</guid>
		<description>Nice job - thanks for the interesting feedback!</description>
		<content:encoded><![CDATA[<p>Nice job &#8211; thanks for the interesting feedback!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: laertejunior</title>
		<link>http://www.jonathanmedd.net/2009/12/powershell-2-0-one-cmdlet-at-a-time-12-write-eventlog.html/comment-page-1#comment-3377</link>
		<dc:creator>laertejunior</dc:creator>
		<pubDate>Thu, 03 Dec 2009 17:16:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonathanmedd.net/?p=344#comment-3377</guid>
		<description>Great Tip..But if you dont have event source already created, a error occurs. You can test and after create. The test you send this tip (teste-path) to me.

if (!(test-path HKLM:\SYSTEM\CurrentControlSet\Services\Eventlog\Application\TestSource))
{
	[System.Diagnostics.EventLog]::CreateEventSOurce(&quot;TestSource&quot;,&quot;Application&quot;)
}	

Write-EventLog  -computername $env:computername -logname Application -source TestSource -eventID 8750 -entrytype Error -message &quot;CustomApp1 has experienced Error 9875&quot;</description>
		<content:encoded><![CDATA[<p>Great Tip..But if you dont have event source already created, a error occurs. You can test and after create. The test you send this tip (teste-path) to me.</p>
<p>if (!(test-path HKLM:\SYSTEM\CurrentControlSet\Services\Eventlog\Application\TestSource))<br />
{<br />
	[System.Diagnostics.EventLog]::CreateEventSOurce(&#8220;TestSource&#8221;,&#8221;Application&#8221;)<br />
}	</p>
<p>Write-EventLog  -computername $env:computername -logname Application -source TestSource -eventID 8750 -entrytype Error -message &#8220;CustomApp1 has experienced Error 9875&#8243;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

