<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Huddled Masses &#187; PoshXmpp</title>
	<atom:link href="http://huddledmasses.org/tag/poshxmpp/feed/" rel="self" type="application/rss+xml" />
	<link>http://huddledmasses.org</link>
	<description>You can do more than breathe for free...</description>
	<lastBuildDate>Fri, 27 Apr 2012 05:42:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<cloud domain='huddledmasses.org' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>PowerShell XMPP (Jabber) Snapin</title>
		<link>http://huddledmasses.org/powershell-xmpp-jabber-snapin/</link>
		<comments>http://huddledmasses.org/powershell-xmpp-jabber-snapin/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 15:42:26 +0000</pubDate>
		<dc:creator>Joel 'Jaykul' Bennett</dc:creator>
				<category><![CDATA[Huddled]]></category>
		<category><![CDATA[Chat]]></category>
		<category><![CDATA[Jabber]]></category>
		<category><![CDATA[PoshXmpp]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Xmpp]]></category>

		<guid isPermaLink="false">http://HuddledMasses.org/powershell-xmpp-jabber-snapin/</guid>
		<description><![CDATA[Someone asked on the PowerShell Community Forum about a way to use google talk or jabber to send messages from PowerShell, and I got carried away &#8230; The result is yet another CodePlex project: PoshXmpp. Basically I just took the event-based GPL library provided by AG Software (agsXMPP) and wrote a polling-based wrapper for it. [...]]]></description>
			<content:encoded><![CDATA[	<p>Someone asked on the <a href="http://powershellcommunity.org/Forums/tabid/54/forumid/1/postid/766/view/topic/Default.aspx">PowerShell Community Forum</a> about a way to use google talk or jabber to send messages from PowerShell, and I got carried away &#8230;</p>

	<p>The result is yet another CodePlex project: <a href="http://CodePlex.com/PoshXmpp/">PoshXmpp</a>.  Basically I just took the event-based <span class="caps">GPL</span> library provided by AG Software (<a href="http://www.ag-software.de/index.php?page=agsxmpp-sdk">agsXMPP</a>) and wrote a polling-based wrapper for it.  </p>

	<p>You can do pretty much anything instant-messaging related that you want to do with Jabber, from building bridges between different jabber transports, to notifying yourself of events on servers, etc. As an example, here&#8217;s the script for a Jabber bot that joins a chat (#PowerShell on irc.FreeNode.net by default) and then notifies us of new posts in an <span class="caps">ATOM</span> feed (by default, it monitors the PowerShell usenet newsgroup by using the Google groups <span class="caps">ATOM</span> feed). </p>

	<div class="posh code posh" style="font-family:monospace;"><br />
<span style="color: #666699; font-weight: bold;">param</span> <span style="color: #333;">&#40;</span><br />
&nbsp; &nbsp; <span style="color: #660033; font-weight: bold;">$JabberId</span> <span style="color: #66cc66;">=</span> $<span style="color: #333;">&#40;</span> <span style="color: #0066cc; font-style: italic;">Read-<span style="font-style: normal;">Host</span></span> <span style="color: #009900;">&quot;Bot's Jabber ID&quot;</span> <span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp;,<span style="color: #660033; font-weight: bold;">$Password</span> <span style="color: #66cc66;">=</span> $<span style="color: #333;">&#40;</span> <span style="color: #0066cc; font-style: italic;">Read-<span style="font-style: normal;">Host</span></span> <span style="color: #009900;">&quot;Bot's Password&quot;</span> <span style="color: #000066;">-asSecure</span><span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp;,<span style="color: #660033; font-weight: bold;">$AtomFeeds</span><span style="color: #333;">&#91;</span><span style="color: #333;">&#93;</span> <span style="color: #66cc66;">=</span> @<span style="color: #333;">&#40;</span><span style="color: #009900;">&quot;http://groups.google.com/group/microsoft.public.windows.powershell/feed/atom_v1_0_topics.xml&quot;</span><span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp;,<span style="color: #660033; font-weight: bold;">$Chat</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;PowerShell%irc.FreeNode.net@irc.im.flosoft.biz&quot;</span> &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># An IRC channel to join!</span><br />
&nbsp; &nbsp;,<span style="color: #660033; font-weight: bold;">$ChatNick</span> <span style="color: #66cc66;">=</span> $<span style="color: #333;">&#40;</span><span style="color: #009900;">&quot;PowerBot$((new-object Random).Next(0,9999))&quot;</span><span style="color: #333;">&#41;</span> <span style="color: #666666; font-style: italic;"># Your nickname in IRC</span><br />
<span style="color: #333;">&#41;</span><br />
<span style="color: #660033; font-weight: bold;">$ErrorActionPreference</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;Stop&quot;</span><br />
<br />
<span style="color: #660033; font-weight: bold;">$global</span>:PoshXmppClient <span style="color: #66cc66;">=</span> <br />
PoshXmpp\<span style="color: #0066cc; font-style: italic;">New-<span style="font-style: normal;">Client</span></span> <span style="color: #660033; font-weight: bold;">$JabberId</span> <span style="color: #660033; font-weight: bold;">$Password</span> <span style="color: #666666; font-style: italic;"># http://im.flosoft.biz:5280/http-poll/</span><br />
PoshXmpp\<span style="color: #0066cc; font-style: italic;">Connect-<span style="font-style: normal;">Chat</span></span> <span style="color: #660033; font-weight: bold;">$Chat</span> <span style="color: #660033; font-weight: bold;">$ChatNick</span><br />
<br />
<span style="color: #660033; font-weight: bold;">$nnc</span> <span style="color: #66cc66;">=</span> <span style="color: #660033; font-weight: bold;">$global</span>:LastNewsCheck <span style="color: #66cc66;">=</span> <span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span>DateTime<span style="color: #333;">&#93;</span></span>::<span style="color: #003366;">Now</span>.<span style="color: #003366;">AddHours</span><span style="color: #333;">&#40;</span><span style="color: #66cc66;">-</span><span style="color: #cc66cc;">10</span><span style="color: #333;">&#41;</span> <span style="color: #666666; font-style: italic;"># start</span><br />
<span style="color: #660033; font-weight: bold;">$feedReader</span> <span style="color: #66cc66;">=</span> <span style="color: #0066cc; font-style: italic;">new-<span style="font-style: normal;">object</span></span> <span style="color: #003366; font-weight: bold;">Xml</span>.<span style="color: #003366;">XmlDocument</span><br />
<br />
<span style="color: #009900;">&quot;PRESS ANY KEY TO STOP&quot;</span><br />
<span style="color: #666699; font-weight: bold;">while</span><span style="color: #333;">&#40;</span><span style="color: #66cc66;">!</span><span style="color: #660033; font-weight: bold;">$Host</span>.<span style="color: #003366;">UI</span>.<span style="color: #003366;">RawUI</span>.<span style="color: #003366;">KeyAvailable</span><span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&quot;Checking feeds...&quot;</span><br />
&nbsp; &nbsp;<span style="color: #666699; font-weight: bold;">foreach</span><span style="color: #333;">&#40;</span><span style="color: #660033; font-weight: bold;">$feed</span> <span style="color: #666699; font-weight: bold;">in</span> <span style="color: #660033; font-weight: bold;">$AtomFeeds</span><span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #660033; font-weight: bold;">$feedReader</span>.<span style="color: #003366;">Load</span><span style="color: #333;">&#40;</span><span style="color: #660033; font-weight: bold;">$feed</span><span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666699; font-weight: bold;">for</span><span style="color: #333;">&#40;</span><span style="color: #660033; font-weight: bold;">$i</span> <span style="color: #66cc66;">=</span> <span style="color: #660033; font-weight: bold;">$feedReader</span>.<span style="color: #003366;">feed</span>.<span style="color: #003366;">entry</span>.<span style="color: #003366;">count</span> <span style="color: #66cc66;">-</span> <span style="color: #cc66cc;">1</span>; <span style="color: #660033; font-weight: bold;">$i</span> <span style="color: #000066;">-ge</span> <span style="color: #cc66cc;">0</span>; <span style="color: #660033; font-weight: bold;">$i</span><span style="color: #66cc66;">--</span><span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #660033; font-weight: bold;">$e</span> <span style="color: #66cc66;">=</span> <span style="color: #660033; font-weight: bold;">$feedReader</span>.<span style="color: #003366;">feed</span>.<span style="color: #003366;">entry</span><span style="color: #333;">&#91;</span><span style="color: #660033; font-weight: bold;">$i</span><span style="color: #333;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666699; font-weight: bold;">if</span><span style="color: #333;">&#40;</span><span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span>datetime<span style="color: #333;">&#93;</span></span><span style="color: #660033; font-weight: bold;">$e</span>.<span style="color: #003366;">updated</span> <span style="color: #000066;">-gt</span> <span style="color: #660033; font-weight: bold;">$global</span>:LastNewsCheck<span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PoshXmpp\<span style="color: #0066cc; font-style: italic;">Send-<span style="font-style: normal;">Message</span></span> <span style="color: #660033; font-weight: bold;">$Chat</span> $<span style="color: #333;">&#40;</span><span style="color: #009900;">&quot;{0} {1} (Posted at {2:hh:mm} by {3})&quot;</span> `<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">-f</span> <span style="color: #660033; font-weight: bold;">$e</span>.<span style="color: #003366;">title</span>.<span style="color: #009900;">&quot;#text&quot;</span>, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #660033; font-weight: bold;">$e</span>.<span style="color: #003366;">link</span>.<span style="color: #003366;">href</span>, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span>datetime<span style="color: #333;">&#93;</span></span><span style="color: #660033; font-weight: bold;">$e</span>.<span style="color: #003366;">updated</span>, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #660033; font-weight: bold;">$e</span>.<span style="color: #003366;">author</span>.<span style="color: #003366;">name</span><span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span>Threading.<span style="color: #003366;">Thread</span><span style="color: #333;">&#93;</span></span>::<span style="color: #660033;">Sleep</span><span style="color: #333;">&#40;</span> <span style="color: #cc66cc;">1000</span> <span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666699; font-weight: bold;">if</span><span style="color: #333;">&#40;</span> <span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span>datetime<span style="color: #333;">&#93;</span></span><span style="color: #660033; font-weight: bold;">$feedReader</span>.<span style="color: #003366;">feed</span>.<span style="color: #003366;">entry</span><span style="color: #333;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #333;">&#93;</span>.<span style="color: #003366;">updated</span> <span style="color: #000066;">-gt</span> <span style="color: #660033; font-weight: bold;">$nnc</span> <span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #660033; font-weight: bold;">$nnc</span> <span style="color: #66cc66;">=</span> <span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span>datetime<span style="color: #333;">&#93;</span></span><span style="color: #660033; font-weight: bold;">$feedReader</span>.<span style="color: #003366;">feed</span>.<span style="color: #003366;">entry</span><span style="color: #333;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #333;">&#93;</span>.<span style="color: #003366;">updated</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #660033; font-weight: bold;">$global</span>:LastNewsCheck <span style="color: #66cc66;">=</span> <span style="color: #660033; font-weight: bold;">$nnc</span> <span style="color: #666666; font-style: italic;"># the most recent item in any feed</span><br />
&nbsp; &nbsp;<span style="color: #660033; font-weight: bold;">$counter</span> <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&quot;PRESS ANY KEY TO STOP&quot;</span> <span style="color: #666666; font-style: italic;"># we're going to wait 10 * 60 seconds </span><br />
&nbsp; &nbsp;<span style="color: #666699; font-weight: bold;">while</span><span style="color: #333;">&#40;</span><span style="color: #66cc66;">!</span><span style="color: #660033; font-weight: bold;">$Host</span>.<span style="color: #003366;">UI</span>.<span style="color: #003366;">RawUI</span>.<span style="color: #003366;">KeyAvailable</span> <span style="color: #000066;">-and</span> <span style="color: #333;">&#40;</span><span style="color: #660033; font-weight: bold;">$counter</span><span style="color: #66cc66;">++</span> <span style="color: #000066;">-lt</span> <span style="color: #cc66cc;">600</span><span style="color: #333;">&#41;</span><span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span>Threading.<span style="color: #003366;">Thread</span><span style="color: #333;">&#93;</span></span>::<span style="color: #660033;">Sleep</span><span style="color: #333;">&#40;</span> <span style="color: #cc66cc;">1000</span> <span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp;<span style="color: #333;">&#125;</span><br />
<span style="color: #333;">&#125;</span><br />
<br />
<span style="color: #660033; font-weight: bold;">$global</span>:PoshXmppClient.<span style="color: #003366;">Close</span><span style="color: #333;">&#40;</span><span style="color: #333;">&#41;</span></div>

	<p>Now, most of that script was spent parsing xml from the atom feed, so lets try another example.  This script will join mirror a groupt chat to instant message.  By default it joins the PowerShell <span class="caps">IRC</span> channel, and then instant messages you so that you can participate in the <span class="caps">IRC</span> chat via your instant messenger. You can register your Jabber account with the <span class="caps">AIM</span>, <span class="caps">ICQ</span>, <span class="caps">MSN</span>, or other transport on it&#8217;s Jabber server and then use this to mirror <span class="caps">IRC</span> to your <span class="caps">MSN</span> account or to <span class="caps">AIM</span> on your phone or whatever  <img src='http://huddledmasses.org/wordpress/wp-includes/' alt=';-)' class='wp-smiley' /> . I&#8217;ve been using <a href="http://im.flosoft.biz">im.flosoft.biz</a> which allows you to not only register new accounts on the web, but also register them with the transports through a web form.</p>

	<div class="posh code posh" style="font-family:monospace;"><br />
<span style="color: #666699; font-weight: bold;">param</span> <span style="color: #333;">&#40;</span><br />
&nbsp; &nbsp; <span style="color: #660033; font-weight: bold;">$JabberId</span> <span style="color: #66cc66;">=</span> $<span style="color: #333;">&#40;</span> <span style="color: #0066cc; font-style: italic;">Read-<span style="font-style: normal;">Host</span></span> <span style="color: #009900;">&quot;Bot's Jabber ID&quot;</span> <span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp;,<span style="color: #660033; font-weight: bold;">$Password</span> <span style="color: #66cc66;">=</span> $<span style="color: #333;">&#40;</span> <span style="color: #0066cc; font-style: italic;">Read-<span style="font-style: normal;">Host</span></span> <span style="color: #009900;">&quot;Bot's Password&quot;</span> <span style="color: #000066;">-asSecure</span><span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp;,<span style="color: #660033; font-weight: bold;">$MirrorTo</span> <span style="color: #66cc66;">=</span> $<span style="color: #333;">&#40;</span> <span style="color: #0066cc; font-style: italic;">Read-<span style="font-style: normal;">Host</span></span> <span style="color: #009900;">&quot;Your Jabber ID&quot;</span> <span style="color: #333;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># You can use Jabber Transport Id's too</span><br />
&nbsp; &nbsp;,<span style="color: #660033; font-weight: bold;">$Chat</span> <span style="color: #66cc66;">=</span> <span style="color: #009900;">&quot;PowerShell%irc.FreeNode.net@irc.im.flosoft.biz&quot;</span> &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># An IRC channel to join!</span><br />
&nbsp; &nbsp;,<span style="color: #660033; font-weight: bold;">$ChatNick</span> <span style="color: #66cc66;">=</span> $<span style="color: #333;">&#40;</span><span style="color: #009900;">&quot;PowerBot$((new-object Random).Next(0,9999))&quot;</span><span style="color: #333;">&#41;</span> <span style="color: #666666; font-style: italic;"># Your nickname in IRC</span><br />
<span style="color: #333;">&#41;</span><br />
<br />
<span style="color: #660033; font-weight: bold;">$global</span>:PoshXmppClient <span style="color: #66cc66;">=</span> <br />
PoshXmpp\<span style="color: #0066cc; font-style: italic;">New-<span style="font-style: normal;">Client</span></span> <span style="color: #660033; font-weight: bold;">$JabberId</span> <span style="color: #660033; font-weight: bold;">$Password</span> <span style="color: #666666; font-style: italic;"># http://im.flosoft.biz:5280/http-poll/</span><br />
PoshXmpp\<span style="color: #0066cc; font-style: italic;">Connect-<span style="font-style: normal;">Chat</span></span> <span style="color: #660033; font-weight: bold;">$Chat</span> <span style="color: #660033; font-weight: bold;">$ChatNick</span><br />
PoshXmpp\<span style="color: #0066cc; font-style: italic;">Send-<span style="font-style: normal;">Message</span></span> <span style="color: #660033; font-weight: bold;">$MirrorTo</span> <span style="color: #009900;">&quot;Starting Jabber Mirror to $('{0}@{1}' -f $Chat.Split(@('%','@'),3))&quot;</span><br />
<br />
<span style="color: #009900;">&quot;PRESS ANY KEY TO STOP&quot;</span><br />
<span style="color: #666699; font-weight: bold;">while</span><span style="color: #333;">&#40;</span><span style="color: #66cc66;">!</span><span style="color: #660033; font-weight: bold;">$Host</span>.<span style="color: #003366;">UI</span>.<span style="color: #003366;">RawUI</span>.<span style="color: #003366;">KeyAvailable</span><span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp;PoshXmpp\<span style="color: #0066cc; font-style: italic;">Receive-<span style="font-style: normal;">Message</span></span> <span style="color: #000066;">-All</span> <span style="color: #66cc66;">|</span> foreach<span style="color: #66cc66;">-</span>object <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666699; font-weight: bold;">if</span><span style="color: #333;">&#40;</span> <span style="color: #660033; font-weight: bold;">$_</span>.<span style="color: #666699; font-weight: bold;">From</span>.<span style="color: #003366;">Bare</span> <span style="color: #000066;">-ne</span> <span style="color: #660033; font-weight: bold;">$MirrorTo</span> <span style="color: #333;">&#41;</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PoshXmpp\<span style="color: #0066cc; font-style: italic;">Send-<span style="font-style: normal;">Message</span></span> <span style="color: #660033; font-weight: bold;">$MirrorTo</span> <span style="color: #333;">&#40;</span><span style="color: #009900;">&quot;{0}&lt;{1}&gt; {2}&quot;</span> <span style="color: #000066;">-f</span> `<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #333;">&#40;</span><span style="color: #660033; font-weight: bold;">$_</span>.<span style="color: #666699; font-weight: bold;">From</span>.<span style="color: #003366;">User</span> <span style="color: #000066;">-split</span> <span style="color: #009900;">&quot;%&quot;</span><span style="color: #333;">&#41;</span><span style="color: #333;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #333;">&#93;</span>, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #660033; font-weight: bold;">$_</span>.<span style="color: #666699; font-weight: bold;">From</span>.<span style="color: #003366;">Resource</span>, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #660033; font-weight: bold;">$_</span>.<span style="color: #003366;">Body</span><span style="color: #333;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #333;">&#125;</span> <span style="color: #666699; font-weight: bold;">else</span> <span style="color: #333;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PoshXmpp\<span style="color: #0066cc; font-style: italic;">Send-<span style="font-style: normal;">Message</span></span> <span style="color: #660033; font-weight: bold;">$Chat</span> <span style="color: #660033; font-weight: bold;">$_</span>.<span style="color: #003366;">Body</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #333;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #333;">&#125;</span> &nbsp; <br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;"><span style="color: #333;">&#91;</span>Threading.<span style="color: #003366;">Thread</span><span style="color: #333;">&#93;</span></span>::<span style="color: #660033;">Sleep</span><span style="color: #333;">&#40;</span> <span style="color: #cc66cc;">100</span> <span style="color: #333;">&#41;</span><br />
<span style="color: #333;">&#125;</span><br />
<br />
PoshXmpp\<span style="color: #0066cc; font-style: italic;">Disconnect-<span style="font-style: normal;">Chat</span></span> <span style="color: #660033; font-weight: bold;">$Chat</span> <span style="color: #660033; font-weight: bold;">$ChatNick</span><br />
<span style="color: #660033; font-weight: bold;">$global</span>:PoshXmppClient.<span style="color: #003366;">Close</span><span style="color: #333;">&#40;</span><span style="color: #333;">&#41;</span>;</div>

	<p>There&#8217;s another example on the <a href="http://CodePlex.com/PoshXmpp/">PowerShell Xmpp for Jabber project page</a>, showing how you can use this to read a chat room out loud (sometimes I run that when I&#8217;m just monitoring a chat room while I do other work). You could also use the Xmpp library for notifications &#8212; set up your Windows 2008 server to instant message you when <span class="caps">IIS</span> fails, or when you receive an email, whatever. I&#8217;ve even been playing with Invoke-Expression &#8230; you can actually write a script to do powershell remoting over Jabber (yikes).</p>]]></content:encoded>
			<wfw:commentRss>http://huddledmasses.org/powershell-xmpp-jabber-snapin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

