<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://thepowershellguy.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>new-blogentry -topic Powershell</title><link>http://thepowershellguy.com/blogs/gaurhoth/default.aspx</link><description>Powershell Scripts and Ideas</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.2)</generator><item><title>move-blog</title><link>http://thepowershellguy.com/blogs/gaurhoth/archive/2008/03/30/move-blog.aspx</link><pubDate>Sun, 30 Mar 2008 19:12:00 GMT</pubDate><guid isPermaLink="false">631293ba-543e-4263-9ae4-d16ceb84d9a6:15881</guid><dc:creator>Gaurhoth</dc:creator><slash:comments>0</slash:comments><comments>http://thepowershellguy.com/blogs/gaurhoth/comments/15881.aspx</comments><wfw:commentRss>http://thepowershellguy.com/blogs/gaurhoth/commentrss.aspx?PostID=15881</wfw:commentRss><description>&lt;p&gt;I've moved the blog to my own domain. No further content will be updated here. The articles will remain for reference until I get all of them reposted to the new site.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Here's the new link:&amp;nbsp; &lt;a href="http://www.skyeagle.net/"&gt;http://www.skyeagle.net/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Gaurhoth &lt;br&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://thepowershellguy.com/aggbug.aspx?PostID=15881" width="1" height="1"&gt;</description></item><item><title>Games 2008 Advanced Event 1 Solution</title><link>http://thepowershellguy.com/blogs/gaurhoth/archive/2008/02/20/games-2008-advanced-event-1-solution.aspx</link><pubDate>Wed, 20 Feb 2008 17:37:00 GMT</pubDate><guid isPermaLink="false">631293ba-543e-4263-9ae4-d16ceb84d9a6:15711</guid><dc:creator>Gaurhoth</dc:creator><slash:comments>0</slash:comments><comments>http://thepowershellguy.com/blogs/gaurhoth/comments/15711.aspx</comments><wfw:commentRss>http://thepowershellguy.com/blogs/gaurhoth/commentrss.aspx?PostID=15711</wfw:commentRss><description>&lt;P&gt;In next few posts, I'll be posting my solution for the Winter Scripting Games of 2008. Some I'll add comments. Some I won't :)&lt;/P&gt;
&lt;P&gt;I found using Regex patterns far easier than the brute force method used by the Scripting Guys. See the code below:&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Consolas color=#800080&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$number&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#ff0000&gt;=&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#5f9ea0&gt;Read-Host&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;"Enter Phone Number"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT face=Consolas color=#800080&gt;
&lt;P&gt;$telcomap&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#ff0000&gt;=&lt;/FONT&gt;&lt;FONT face=Consolas&gt; @(&lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;""&lt;/FONT&gt;&lt;FONT face=Consolas&gt;,&lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;""&lt;/FONT&gt;&lt;FONT face=Consolas&gt;,&lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;"[abc]"&lt;/FONT&gt;&lt;FONT face=Consolas&gt;,&lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;"[def]"&lt;/FONT&gt;&lt;FONT face=Consolas&gt;,&lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;"[ghi]"&lt;/FONT&gt;&lt;FONT face=Consolas&gt;,&lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;"[jkl]"&lt;/FONT&gt;&lt;FONT face=Consolas&gt;,&lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;"[mno]"&lt;/FONT&gt;&lt;FONT face=Consolas&gt;,&lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;"[prs]"&lt;/FONT&gt;&lt;FONT face=Consolas&gt;,&lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;"[tuv]"&lt;/FONT&gt;&lt;FONT face=Consolas&gt;,&lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;"[wxy]"&lt;/FONT&gt;&lt;FONT face=Consolas&gt;)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT face=Consolas color=#800080&gt;
&lt;P&gt;$number&lt;/FONT&gt;&lt;FONT face=Consolas&gt;.&lt;/FONT&gt;&lt;FONT face=Consolas color=#8b4513&gt;GetEnumerator&lt;/FONT&gt;&lt;FONT face=Consolas&gt;() &lt;/FONT&gt;&lt;FONT face=Consolas color=#0000ff&gt;|&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#ff0000&gt;%&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#5f9ea0&gt;-begin&lt;/FONT&gt;&lt;FONT face=Consolas&gt; { [&lt;/FONT&gt;&lt;FONT face=Consolas color=#0000ff&gt;string&lt;/FONT&gt;&lt;FONT face=Consolas&gt;]&lt;/FONT&gt;&lt;FONT face=Consolas color=#800080&gt;$s&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#ff0000&gt;=&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;""&lt;/FONT&gt;&lt;FONT face=Consolas&gt; } &lt;/FONT&gt;&lt;FONT face=Consolas color=#5f9ea0&gt;-process&lt;/FONT&gt;&lt;FONT face=Consolas&gt; { [&lt;/FONT&gt;&lt;FONT face=Consolas color=#0000ff&gt;string&lt;/FONT&gt;&lt;FONT face=Consolas&gt;]&lt;/FONT&gt;&lt;FONT face=Consolas color=#800080&gt;$s&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#ff0000&gt;+=&lt;/FONT&gt;&lt;FONT face=Consolas&gt; [&lt;/FONT&gt;&lt;FONT face=Consolas color=#0000ff&gt;string&lt;/FONT&gt;&lt;FONT face=Consolas&gt;]&lt;/FONT&gt;&lt;FONT face=Consolas color=#800080&gt;$telcomap&lt;/FONT&gt;&lt;FONT face=Consolas&gt;[[&lt;/FONT&gt;&lt;FONT face=Consolas color=#0000ff&gt;int&lt;/FONT&gt;&lt;FONT face=Consolas&gt;][&lt;/FONT&gt;&lt;FONT face=Consolas color=#0000ff&gt;string&lt;/FONT&gt;&lt;FONT face=Consolas&gt;]&lt;/FONT&gt;&lt;FONT face=Consolas color=#000080&gt;$_&lt;/FONT&gt;&lt;FONT face=Consolas&gt;] }&lt;/P&gt;
&lt;P&gt;(&lt;/FONT&gt;&lt;FONT face=Consolas color=#0000ff&gt;gc&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;"c:\scripts\wordlist.txt"&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#0000ff&gt;|&lt;/FONT&gt;&lt;FONT face=Consolas&gt; ? { &lt;/FONT&gt;&lt;FONT face=Consolas color=#000080&gt;$_&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#ff0000&gt;-match&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#800000&gt;"^$($s)$"&lt;/FONT&gt;&lt;FONT face=Consolas&gt; }) &lt;/FONT&gt;&lt;FONT face=Consolas color=#0000ff&gt;|&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#5f9ea0&gt;Select-Object&lt;/FONT&gt;&lt;FONT face=Consolas&gt; &lt;/FONT&gt;&lt;FONT face=Consolas color=#5f9ea0&gt;-First&lt;/FONT&gt;&lt;FONT face=Consolas&gt; 1&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;Couple of things might need to be explained. First I used an array to hold the letter to number mappings. Then I generated a regex pattern based off of the number given. For example, with the number 7323464. The resulting regex pattern would be '[prs][def][abc][def][ghi][mno][ghi]'. Last line reads in the word list and compares each word with the regex pattern until a match is found (using the -match comparison&amp;nbsp;operator).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Gaurhoth&lt;BR&gt;&lt;/P&gt;&lt;img src="http://thepowershellguy.com/aggbug.aspx?PostID=15711" width="1" height="1"&gt;</description><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/powershell/default.aspx">powershell</category><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/winter+scripting+games/default.aspx">winter scripting games</category></item><item><title>An example of how to use New-TaskPool</title><link>http://thepowershellguy.com/blogs/gaurhoth/archive/2007/10/08/an-example-of-how-to-use-new-taskpool.aspx</link><pubDate>Mon, 08 Oct 2007 23:52:00 GMT</pubDate><guid isPermaLink="false">631293ba-543e-4263-9ae4-d16ceb84d9a6:9440</guid><dc:creator>Gaurhoth</dc:creator><slash:comments>0</slash:comments><comments>http://thepowershellguy.com/blogs/gaurhoth/comments/9440.aspx</comments><wfw:commentRss>http://thepowershellguy.com/blogs/gaurhoth/commentrss.aspx?PostID=9440</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Those that have been reading my blog for awhile may remember the New-Taskpool script. Basically the script allows me to have multiple runspaces running simultaneously. If we give each runspace an object and a scriptblock... we can run through time consuming operations on several hundred objects a lot faster than doing them one at a time. This is especially helpful on WMI calls to remote machines where the majority of the time is waiting on a response. Just in case anyone has missed it earlier, I've attached the latest version of New-Taskpool to this post. In addition, you can visit the following &lt;A class="" href="http://thepowershellguy.com/blogs/gaurhoth/search.aspx?q=new-taskpool&amp;amp;p=1" target=_blank&gt;search results&lt;/A&gt; to see the other articles I've written in the past on New-Taskpool.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Here’s a practical example of what I use New-TaskPool for. Generally I have between 300 and 600 computers alive on my LAN.&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;All of these computers are required by policy to have the latest version of Symantec AntiVirus installed and running. To verify this, I use the script found below.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Some things to note about the way New-TaskPool is used. You must pass it a ScriptBlock. You’ll see that I’ve assigned $code the contents of a scriptblock. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Keep in mind that you will not see ANY write-host, write-debug, or write-warning messages from the scriptblock as it’s being executed in a separate runspace and not visible to the current Host.&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;So any output you need, must be in the form of Write-Output. Errors HAVE to be handled (even if you just Trap { continue }) to avoid the runspace becoming stalled with ‘FAILED’ status. I could and probably should clean that up some in the New-Taskpool script – but that’s another blog entry for another day! &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;You’ll notice in the example, I’m using Get-NBTHosts. I blogged about that function a couple days ago. However, you can use anything that returns a collection of types shown in the switch { … } statement.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;For example, any of the 3 would be valid:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;computers = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;[ADSI]"LDAP://CN=Computers,DC=testlab,DC=com"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;computers.psbase.get_children() | New&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;TaskPool &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;script &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;code &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;pool 10 | Format&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;Table Name,AVVersion,AVStatus,AVParent&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;############################&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;computers = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"TestMachine01"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;,&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"TestMachine02"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;,&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"TestMachine03"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;computers | New&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;TaskPool &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;scriptblock &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;code | Select&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;Object Name,AVVersion,AVStatus,AVParent&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;############################&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;## If you have PSCX installed:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;Get&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;ADObject &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;class Computer | New&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;TaskPool &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;scriptblock &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;code | Select&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;Object Name,AVVersion,AVStatus,AVParent&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;Function Sweep&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;Sav { &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;# Requires:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;#&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;new-taskpool v0.8 - Needs to be dot sourced as it's a function&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;# Expects in Pipeline:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;#&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;DirectoryEntry (ADSI), SearchResult (directorysearcher), String with Computer Name or IP, Custom object with NAME property with Computer Name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;# Example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;#&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Get-ADObject -class Computer | Is-Alive | New-TaskPool -script $code | Format-Table Name,AVVersion,AVStatus,AVParent&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-tab-count:1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;# . .\New-TaskPool.ps1&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-tab-count:1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;code = {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;input | &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;%&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;_&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;# Accomodate Different Input object types.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;switch (&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj.psbase.gettype().name) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"DirectoryEntry"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{ &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;cn = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj.dnshostname[0] }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"SearchResult"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{ &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;cn = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj.properties[&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;'dnshostname'&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;][0] }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"String"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{ &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;cn = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj.replace(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"IS~"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;,&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;""&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;).trim() }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"PSCustomObject"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{ &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;cn = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj.Name }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-tab-count:3;"&gt;&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; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;# Add 3 AV Related properties to the object&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj | add&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;member &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;name AVStatus &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;value &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;null &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;membertype NoteProperty &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;force&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj | add&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;member &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;name AVVersion &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;value &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;null &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;membertype NoteProperty &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;force&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj | add&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;Member &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;name AVParent &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;value &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;null &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;membertype NoteProperty &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;force&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;# Return services that match "'Symantec AntiVirus' or 'Norton AntiVirus', &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;serv = get&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;wmiobject &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;co &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;cn &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;query &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"Select __SERVER,Name,Status,State from Win32_Service where Name='Symantec AntiVirus' or Name='Norton AntiVirus'"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;ea silentlycontinue&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-tab-count:3;"&gt;&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; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;## $? = $true if last command completed successfully, $false if unsuccessful.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;if (!&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$?&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-tab-count:4;"&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;## WMI call failed to complete successfully.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;if ( &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;error[0].tostring() &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;match &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"require other privileges"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; ) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj.AVStatus = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"DENIEND"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;} elseif ( &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;error[0].tostring() &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;match &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"RPC server is unavailable"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; ) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj.AVStatus = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"OFFLINE"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;# or Firewalled&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;} elseif ((!&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;serv) &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;and &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$?&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-tab-count:4;"&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;## WMI completed successfully , but there was no matching service.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj.AVStatus = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"Not Installed"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;} elseif (&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;serv) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj.AVStatus = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;serv.state&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;# Symantec stores the Version number in a registry key in &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;# HKLM\Software\Intel\DLLUsage\VP6\ for rtvscan.exe&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rk = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;[microsoft.win32.registrykey]&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;::&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;openremotebasekey(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;[Microsoft.Win32.RegistryHive]&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;::&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;LocalMachine,&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;cn)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rr = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rk.opensubkey(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"SOFTWARE\INTEL\DLLUsage\VP6"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;if (&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rr) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj.AVVersion = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rr.getvalue((&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rr.getvaluenames() | select&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;String &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"rtvscan"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;))&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rr = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rk.opensubkey(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj.AVParent = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rr.getvalue(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"Parent"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;} else { &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;# Try 64bit&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rr = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rk.opensubkey(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"SOFTWARE\Wow6432Node\INTEL\DLLUsage\VP6"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj.AVVersion = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rr.getvalue((&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rr.getvaluenames() | select&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;String &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"rtvscan"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;))&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rr = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rk.opensubkey(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"SOFTWARE\Wow6432Node\INTEL\LANDesk\VirusProtect6\CurrentVersion"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj.AVParent = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;rr.getvalue(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:'Courier New';"&gt;"Parent"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;write&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;Output &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;obj&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;trap { &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:mediumseagreen;FONT-FAMILY:'Courier New';"&gt;#I'm cheating and just ignoring any errors.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&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; &lt;/SPAN&gt;continue&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Get&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;NBTHosts 192.168.10.0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;24 | New&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;TaskPool &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;scriptblock &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:chocolate;FONT-FAMILY:'Courier New';"&gt;$&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;code | Select&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;Object Name,AVVersion,AVStatus,AVParent&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;Comments Welcome as always:&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="FONT-SIZE:10pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;&lt;PRE style="FONT:9pt courier;COLOR:#eeedf0;BACKGROUND-COLOR:#012456;"&gt; $emailaddress = [string]::join("",("gaurhoth",[char]64,"g","m","a","i","l",".","c","o","m"))&lt;/PRE&gt;&lt;/SPAN&gt;&lt;img src="http://thepowershellguy.com/aggbug.aspx?PostID=9440" width="1" height="1"&gt;</description><enclosure url="http://thepowershellguy.com/blogs/gaurhoth/attachment/9440.ashx" length="7307" type="text/plain" /><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/powershell/default.aspx">powershell</category><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/runspaces/default.aspx">runspaces</category><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/threading/default.aspx">threading</category></item><item><title>Get-NBTHosts</title><link>http://thepowershellguy.com/blogs/gaurhoth/archive/2007/10/05/get-nbthosts.aspx</link><pubDate>Fri, 05 Oct 2007 19:48:00 GMT</pubDate><guid isPermaLink="false">631293ba-543e-4263-9ae4-d16ceb84d9a6:9190</guid><dc:creator>Gaurhoth</dc:creator><slash:comments>0</slash:comments><comments>http://thepowershellguy.com/blogs/gaurhoth/comments/9190.aspx</comments><wfw:commentRss>http://thepowershellguy.com/blogs/gaurhoth/commentrss.aspx?PostID=9190</wfw:commentRss><description>&lt;P&gt;I've been a long time user of a very useful cmd line utility called &lt;A href="http://inetcat.net/software/nbtscan.html" target=_blank&gt;NBTScan&lt;/A&gt;. NBTScan is similar to the Windows builtin cmd line utility NBTSTAT, but can operate on a range of IP addresses instead of a single IP. Using NBTscan, you can get a list of Windows machines that are configured to respond to NETBIOS and aren't behind a firewall. You can find some more information about NBTScan at &lt;A title=http://www.unixwiz.net/tools/nbtscan.html href="http://www.unixwiz.net/tools/nbtscan.html"&gt;http://www.unixwiz.net/tools/nbtscan.html&lt;/A&gt;, but that's an older version that doesn't support a couple of required parameters for this script. For the newest version that I've been able to find, look at &lt;A href="http://inetcat.net/software/nbtscan.html"&gt;http://inetcat.net/software/nbtscan.html&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Here's a script I use to wrap the output into Powershell friendly custom objects.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;function&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:teal;FONT-FAMILY:'Courier New';"&gt;Get-NBTHosts&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;param(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$iprange&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;if&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; (!&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$iprange&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:teal;FONT-FAMILY:'Courier New';"&gt;write-Host&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:navy;FONT-FAMILY:'Courier New';"&gt;"You must specify an -iprange in CDIR notation.`r`n&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;Example: 192.168.1.0/24 "&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;return&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$iprange&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; | % { nbtscan -&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:teal;FONT-FAMILY:'Courier New';"&gt;t&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;500&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; -&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:teal;FONT-FAMILY:'Courier New';"&gt;m&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;1&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; -&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:teal;FONT-FAMILY:'Courier New';"&gt;s&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; : &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;2&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$null&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; | % {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$out&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;1&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; |&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:teal;FONT-FAMILY:'Courier New';"&gt;Select-Object&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; IPAddress,Name,User,MACAddress&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$a&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;.split(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:navy;FONT-FAMILY:'Courier New';"&gt;":"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$out&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;.IPAddress = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$a&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;[&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;].trim()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$out&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;.Name = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$a&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;[&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;1&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;].replace(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:navy;FONT-FAMILY:'Courier New';"&gt;"IS~"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;,&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:navy;FONT-FAMILY:'Courier New';"&gt;""&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;).trim()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$out&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;.User = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$a&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;[&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;3&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;].trim()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$out&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;.MACAddress = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$a&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;[&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;4&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;].trim()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:teal;FONT-FAMILY:'Courier New';"&gt;write-Output&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$out&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;&lt;PRE style="FONT:9pt courier;COLOR:#eeedf0;BACKGROUND-COLOR:#012456;"&gt;PS D:\ps&amp;gt; Get-NBTHosts 10.150.5.0/24

IPAddress                     Name                          User                          MACAddress
---------                     ----                          ----                          ----------
10.150.5.3                    HHHSSC65SP5                   &amp;lt;unknown&amp;gt;                     XX-XX-XX-XX-XX-XX
10.150.5.6                    HHHSQL                        &amp;lt;unknown&amp;gt;                     XX-XX-XX-XX-XX-XX
10.150.5.8                    HHHFDBSVR                     &amp;lt;unknown&amp;gt;                     XX-XX-XX-XX-XX-XX


PS D:\ps&amp;gt; 
&lt;/PRE&gt;
&lt;P&gt;You'll need nbtscan and cygwin1.dll somewhere in your path so that Get-NBTHosts can find it or modify the script to point directly to location of nbtscan.&lt;/P&gt;
&lt;P&gt;Comments Welcome:&lt;/P&gt;&lt;PRE style="FONT:9pt courier;COLOR:#eeedf0;BACKGROUND-COLOR:#012456;"&gt; $emailaddress = [string]::join("",("gaurhoth",[char]64,"g","m","a","i","l",".","c","o","m"))&lt;/PRE&gt;&lt;img src="http://thepowershellguy.com/aggbug.aspx?PostID=9190" width="1" height="1"&gt;</description><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/powershell/default.aspx">powershell</category><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/netbios/default.aspx">netbios</category></item><item><title>New-HtmlHelp from VMWare modification</title><link>http://thepowershellguy.com/blogs/gaurhoth/archive/2007/09/21/new-htmlhelp-from-vmware-modification.aspx</link><pubDate>Sat, 22 Sep 2007 04:15:00 GMT</pubDate><guid isPermaLink="false">631293ba-543e-4263-9ae4-d16ceb84d9a6:8468</guid><dc:creator>Gaurhoth</dc:creator><slash:comments>0</slash:comments><comments>http://thepowershellguy.com/blogs/gaurhoth/comments/8468.aspx</comments><wfw:commentRss>http://thepowershellguy.com/blogs/gaurhoth/commentrss.aspx?PostID=8468</wfw:commentRss><description>&lt;p&gt;If you haven't already heard of New-HtmlHelp, you should visit &lt;a title="http://blogs.vmware.com/vipowershell/2007/09/new-htmlhelp.html" href="http://blogs.vmware.com/vipowershell/2007/09/new-htmlhelp.html"&gt;&lt;font color="#669966"&gt;http://blogs.vmware.com/vipowershell/2007/09/new-htmlhelp.html&lt;/font&gt;&lt;/a&gt;. One of their team members posted an nifty function to create a set of HTML pages from available Powershell Cmdlets documentation.&lt;/p&gt;  &lt;p&gt;I took that function and modified a few lines to add an additional frame on the left side that lists each snapin represented by the list of commands. You can click 'All Cmdlets' to get the complete list or an individual Snap-In for a specific set of cmdlets.&lt;/p&gt;  &lt;p&gt;Script is attached to this post.&lt;/p&gt;  &lt;p&gt;UPDATE: By the way -- you need the doc-style.css in your current folder when you run the function. You can find it on the Vmware link above. &lt;/p&gt;  &lt;p&gt;UPDATE: I was asked to provide an example of usage: &lt;/p&gt;  &lt;pre style="font:9pt courier;color:#eeedf0;background-color:#012456;"&gt;PS D:\ps\functions&amp;gt; New-HtmlHelp (get-command)&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;Updated to make the modifications optional (use the &lt;strong&gt;-groupsnapins&lt;/strong&gt; switch to get the new behaviour). [September 23, 2007 - 5:06pm EDT]&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://thepowershellguy.com/blogs/gaurhoth/WindowsLiveWriter/NewHtmlHelpfromVMWaremodification_12053/new-htmlhelp_2.jpg"&gt;&lt;img id="id" style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="419" alt="new-htmlhelp" src="http://thepowershellguy.com/blogs/gaurhoth/WindowsLiveWriter/NewHtmlHelpfromVMWaremodification_12053/new-htmlhelp_thumb.jpg" width="644" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Comments welcome: &lt;/p&gt;

&lt;pre style="font:9pt courier;color:#eeedf0;background-color:#012456;"&gt; $emailaddress = [string]::join(&amp;quot;&amp;quot;,(&amp;quot;gaurhoth&amp;quot;,[char]64,&amp;quot;g&amp;quot;,&amp;quot;m&amp;quot;,&amp;quot;a&amp;quot;,&amp;quot;i&amp;quot;,&amp;quot;l&amp;quot;,&amp;quot;.&amp;quot;,&amp;quot;c&amp;quot;,&amp;quot;o&amp;quot;,&amp;quot;m&amp;quot;))&lt;/pre&gt;&lt;img src="http://thepowershellguy.com/aggbug.aspx?PostID=8468" width="1" height="1"&gt;</description><enclosure url="http://thepowershellguy.com/blogs/gaurhoth/attachment/8468.ashx" length="6148" type="text/plain" /></item><item><title>Using Powershell to Mail-Enable an AD User without CDOEXM</title><link>http://thepowershellguy.com/blogs/gaurhoth/archive/2007/08/15/using-powershell-to-mail-enable-an-ad-user-without-cdoexm.aspx</link><pubDate>Thu, 16 Aug 2007 00:39:00 GMT</pubDate><guid isPermaLink="false">631293ba-543e-4263-9ae4-d16ceb84d9a6:6532</guid><dc:creator>Gaurhoth</dc:creator><slash:comments>0</slash:comments><comments>http://thepowershellguy.com/blogs/gaurhoth/comments/6532.aspx</comments><wfw:commentRss>http://thepowershellguy.com/blogs/gaurhoth/commentrss.aspx?PostID=6532</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Over on microsoft.public.windows.powershell, it’s been asked how to mail-enable an AD user in an Exchange &lt;STRONG&gt;2003&lt;/STRONG&gt; Environment. The MS supported way involves CDOEXM (part of Exchange System Manager) which seems to be rather difficult to use from powershell. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;In reality, you can usually get away with using [ADSI] to modify several key attributes on the AD user and let RUS initailize the remaining attributes to create the mail-enabled user.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Here’s the example I posted on Usenet:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$user&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; = [ADSI]&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:navy;FONT-FAMILY:'Courier New';"&gt;"LDAP://CN=Powershell Test,OU=Standard Users,OU=Site1,DC=testlab,DC=com"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$user&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;.mailNickname = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:navy;FONT-FAMILY:'Courier New';"&gt;"ptest"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$user&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;.msExchHomeServerName = &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:navy;FONT-FAMILY:'Courier New';"&gt;"/o=testlab/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=SITE1-03EX1"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$user&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;.setinfo()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:green;FONT-FAMILY:'Courier New';"&gt;#wait for RUS - This can be seconds or hours depending on your Exchange configuration.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:green;FONT-FAMILY:'Courier New';"&gt;# To see the changes, reassign the modified AD object to $user&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$user&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; = [ADSI]&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:navy;FONT-FAMILY:'Courier New';"&gt;"LDAP://CN=Powershell Test,OU=Standard Users,OU=Site1,DC=testlab,DC=com"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$user&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; | fl *&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face=Calibri size=3&gt;The minimum attributes needed for RUS are mailNickname (Exchange Alias) and msExchHomeServerName. &lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/SPAN&gt;You can see the format that msExchHomeServerName expects in the example and this will obviously be different for every exchange server. If you don’t fill in any additional attributes, the mailbox will be created in the default mail store on the server specified. If you need to point to a different mail store, you can use the &lt;B style="mso-bidi-font-weight:normal;"&gt;homeMDB&lt;/B&gt; attribute.&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;Again, the easiest way to see the expected format is to grab an already mail-enabled user and take a look at the attributes:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;PRE style="FONT:9pt courier new;COLOR:#eeedf0;BACKGROUND-COLOR:#012456;"&gt;PS C:\&amp;gt; $user = [ADSI]"LDAP://CN=Powershell Test,OU=Standard Users,OU=Site1,DC=testlab,DC=com"                          
PS C:\&amp;gt; $user | format-list cn,mailNickname,msExchHomeServerName,homeMDB,homeMTA,proxyAddresses                         
                                                                                                                        
                                                                                                                        
cn                   : {Powershell Test}                                                                                
mailNickname         : {ptest}                                                                                          
msExchHomeServerName : {/o=testlab/ou=First Administrative Group/cn=Configuration/cn=Servers/cn=SITE1-03EX1}            
homeMDB              : {CN=Mailbox Store (SITE1-03EX1),CN=First Storage Group,CN=InformationStore,CN=SITE1-03EX1,CN=Ser 
                       vers,CN=First Administrative Group,CN=Administrative Groups,CN=testlab,CN=Microsoft Exchange,CN= 
                       Services,CN=Configuration,DC=testlab,DC=com}                                                     
homeMTA              : {CN=Microsoft MTA,CN=SITE1-03EX1,CN=Servers,CN=First Administrative Group,CN=Administrative Grou 
                       ps,CN=testlab,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=testlab,DC=com}              
proxyAddresses       : {SMTP:ptest@testlab.com, X400:c=US;a= ;p=testlab;o=Exchange;s=Test;g=Powershell;}                
                                                                                                                        
                                                                                                                        
                                                                                                                        

&lt;/PRE&gt;&lt;/o:p&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face=Calibri size=3&gt;After you assign the necessary attributes and issue the .setInfo() method, you just have to wait for RUS to do it’s magic. This can take seconds or much longer. It just depends on how the Exchange environment is configured.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;&lt;U&gt;&lt;SPAN style="FONT-SIZE:14pt;LINE-HEIGHT:115%;"&gt;&lt;FONT face=Calibri&gt;As with anything that directly modifies AD attributes… TEST, TEST and TEST some more in a LAB. Never start in a production environment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;gaurhoth&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;* Edited to reflect that this article is about Exchange &lt;STRONG&gt;2003.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;img src="http://thepowershellguy.com/aggbug.aspx?PostID=6532" width="1" height="1"&gt;</description><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/powershell/default.aspx">powershell</category><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/active+directory/default.aspx">active directory</category><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/exchange/default.aspx">exchange</category></item><item><title>New-TaskPool v0.8 Bug Fix</title><link>http://thepowershellguy.com/blogs/gaurhoth/archive/2007/07/25/new-taskpool-v0-8-bug-fix.aspx</link><pubDate>Wed, 25 Jul 2007 15:17:00 GMT</pubDate><guid isPermaLink="false">631293ba-543e-4263-9ae4-d16ceb84d9a6:4800</guid><dc:creator>Gaurhoth</dc:creator><slash:comments>0</slash:comments><comments>http://thepowershellguy.com/blogs/gaurhoth/comments/4800.aspx</comments><wfw:commentRss>http://thepowershellguy.com/blogs/gaurhoth/commentrss.aspx?PostID=4800</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;It’s been a very long time since my last post. Excuses include an insane job situation involving a recent manager's departure as well as my recent purchase of a new home that has occupied most every free minute.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;So with that out of the way, here’s an update to my New-TaskPool script that fixes a bug where you could get an error stating, “Pipeline not executed because a pipeline is already executing.”&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Nothing else has changed. &lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://thepowershellguy.com/aggbug.aspx?PostID=4800" width="1" height="1"&gt;</description><enclosure url="http://thepowershellguy.com/blogs/gaurhoth/attachment/4800.ashx" length="7298" type="text/plain" /><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/powershell/default.aspx">powershell</category><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/runspaces/default.aspx">runspaces</category><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/threading/default.aspx">threading</category><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/pipelines/default.aspx">pipelines</category></item><item><title>New-TaskPool.ps1 - Threading the Powershell way Pt 2</title><link>http://thepowershellguy.com/blogs/gaurhoth/archive/2007/03/30/new-taskpool-ps1-threading-the-powershell-way-pt-2.aspx</link><pubDate>Fri, 30 Mar 2007 10:16:00 GMT</pubDate><guid isPermaLink="false">631293ba-543e-4263-9ae4-d16ceb84d9a6:686</guid><dc:creator>Gaurhoth</dc:creator><slash:comments>0</slash:comments><comments>http://thepowershellguy.com/blogs/gaurhoth/comments/686.aspx</comments><wfw:commentRss>http://thepowershellguy.com/blogs/gaurhoth/commentrss.aspx?PostID=686</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;I’ve made a few modifications to New-TaskPool. My original script couldn’t easily be loaded into your profile. You had to specify the script file ( .\New-TaskPool.ps1 ). This quickly became a problem as I would invariably be in the wrong folder and typing out the full path tested my patience. With that in mind, I made modifications that allowed me to encapsulate New-TaskPool into a function that could be loaded from my profile. Overall the usage is very similar. You'll find the full script attached to this post.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;You may also notice that I’ve started using a collection of a custom object instead of 5 or 6 separate collections for different variables. So:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$script:rscfg&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; = @(); (&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;..(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$pools&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;1&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;)) | % { &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$rscfg&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; += &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$script:rs&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; = @(); (&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;..(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$pools&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;1&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;)) | % { &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$rs&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; += &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$script:pipe&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; = @(); (&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;..(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$pools&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;1&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;)) | % { &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$pipe&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; += &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$script:pipetimer&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; = @(); (&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;..(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$pools&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;1&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;)) | % { &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$pipetimer&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; += &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;$script:cache&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt; = @(); (&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;..(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;$pools&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;1&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;)) | % { &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;$cache&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt; += &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;Has become:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;$pipemgr&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt; = @(); (&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;..(&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;$pools&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;1&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;)) | % { &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;$pipemgr&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt; += &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt; | &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:teal;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;select-object&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt; rscfg,rs,pipe,pipetimer,input,error,output }&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;In addition, I’ve increased performance overall. Instead of recreating the runspace and pipeline for each job, I’m reusing the runsapce and just creating a new pipeline. In one of my speed comparisons, I had 300 items and a “dummy” script block that did nothing but write-output the input. For those 300 items under my original New-TaskPool, it took 31 seconds. With the modifications show in this article, it’s down to 1.5 seconds. Whoo! This is still slightly experimental, so I would like to hear if anyone has a problem with the way this is working now.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Since New-TaskPool is now a function, you can either load it via your profile or just dot-source it in your console when needed. Here’s an example of it’s usage:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE style="FONT:9pt courier new;COLOR:#eeedf0;BACKGROUND-COLOR:#012456;"&gt;&lt;SPAN style="COLOR:#f00;BACKGROUND-COLOR:#012456;"&gt;215#&lt;/SPAN&gt; # Example scriptblock
&lt;SPAN style="COLOR:#f00;BACKGROUND-COLOR:#012456;"&gt;216#&lt;/SPAN&gt; $block = {
&amp;gt;&amp;gt;     $input | % {
&amp;gt;&amp;gt;         $fixed = gwmi -co $_ -class win32_quickfixengineering -ea silentlycontinue | ? { $_.HotFixID -eq "KB931836" }

&amp;gt;&amp;gt;         write-Output $fixed
&amp;gt;&amp;gt;     }
&amp;gt;&amp;gt; }
&amp;gt;&amp;gt;
&lt;SPAN style="COLOR:#f00;BACKGROUND-COLOR:#012456;"&gt;217#&lt;/SPAN&gt; # Dot-Source function into your current session:
&lt;SPAN style="COLOR:#f00;BACKGROUND-COLOR:#012456;"&gt;218#&lt;/SPAN&gt; . .\New-TaskPool.ps1
&lt;SPAN style="COLOR:#f00;BACKGROUND-COLOR:#012456;"&gt;219#&lt;/SPAN&gt;
&lt;SPAN style="COLOR:#f00;BACKGROUND-COLOR:#012456;"&gt;219#&lt;/SPAN&gt; "testmachine","testmachine","testmachine","testmachine" | new-taskpool -scriptblock $block


Description         : Update for Windows Server 2003 (KB931836)
FixComments         : Update
HotFixID            : KB931836
Install Date        :
InstalledBy         : SYSTEM
InstalledOn         : 2/14/2007
Name                :
ServicePackInEffect : SP3
Status              :

Description         : Update for Windows Server 2003 (KB931836)
FixComments         : Update
HotFixID            : KB931836
Install Date        :
InstalledBy         : SYSTEM
InstalledOn         : 2/14/2007
Name                :
ServicePackInEffect : SP3
Status              :

Description         : Update for Windows Server 2003 (KB931836)
FixComments         : Update
HotFixID            : KB931836
Install Date        :
InstalledBy         : SYSTEM
InstalledOn         : 2/14/2007
Name                :
ServicePackInEffect : SP3
Status              :

Description         : Update for Windows Server 2003 (KB931836)
FixComments         : Update
HotFixID            : KB931836
Install Date        :
InstalledBy         : SYSTEM
InstalledOn         : 2/14/2007
Name                :
ServicePackInEffect : SP3
Status              :

&lt;/PRE&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Tomorrow, I will be posting an example scriptblock that I use on a daily basis to scan the network for AntiVirus compliance.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Gaurhoth&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://thepowershellguy.com/aggbug.aspx?PostID=686" width="1" height="1"&gt;</description><enclosure url="http://thepowershellguy.com/blogs/gaurhoth/attachment/686.ashx" length="6892" type="text/plain" /><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/powershell/default.aspx">powershell</category><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/runspaces/default.aspx">runspaces</category><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/threading/default.aspx">threading</category><category domain="http://thepowershellguy.com/blogs/gaurhoth/archive/tags/pipelines/default.aspx">pipelines</category></item><item><title>Finding a Range of IP addresses</title><link>http://thepowershellguy.com/blogs/gaurhoth/archive/2007/03/29/finding-a-range-of-ip-addresses.aspx</link><pubDate>Thu, 29 Mar 2007 14:31:00 GMT</pubDate><guid isPermaLink="false">631293ba-543e-4263-9ae4-d16ceb84d9a6:673</guid><dc:creator>Gaurhoth</dc:creator><slash:comments>0</slash:comments><comments>http://thepowershellguy.com/blogs/gaurhoth/comments/673.aspx</comments><wfw:commentRss>http://thepowershellguy.com/blogs/gaurhoth/commentrss.aspx?PostID=673</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;A recent question in Microsoft.public.windows.powershell asked for ideas on working with a range of IP addresses expressed in CIDR notation (192.168.1.0/24). The intent is to get a list of IP addresses inside the range. I posted a small sample in the group, but here is one that’s cleaned up a little bit and will accept pipeline input.&amp;nbsp;You can see the original usenet article &lt;A class="" href="http://groups.google.com/group/microsoft.public.windows.powershell/browse_thread/thread/e24998a0af4dbd74/730091ce9c210342#730091ce9c210342" target=_blank&gt;here&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Get-IPRange supports input in the standard CIDR notation which looks like 192.168.1.0/24 or 10.132.0.0/16, etc. It also supports 3 switches that allow you to control how the results are returned. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count:1;"&gt;&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; &lt;/SPAN&gt;-AsString – Returns string representation of the IP in Dot-Decimal Format (i.e. “192.168.1.1”)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count:1;"&gt;&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; &lt;/SPAN&gt;-AsDecimal – Returns decimal representation of the&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;IP (I.e. 3232235777)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count:1;"&gt;&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; &lt;/SPAN&gt;-AsIPAddress – Returns a [System.Net.IPAddress] object representing the IP address. This is the default if no other switches are specified.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;You can also pass the IP Range via the –IPAddress parameter or via the Pipeline. Examples of each:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count:1;"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:teal;FONT-FAMILY:'Courier New';"&gt;Get-IPRange&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; –IPAddress “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;192.168&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;1.1&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;FONT-FAMILY:'Courier New';"&gt;24&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;”&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;“&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;192.168&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;1.0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;24&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;”,”&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;192.168&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;10.0&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:red;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;22&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;” | &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:teal;LINE-HEIGHT:115%;FONT-FAMILY:'Courier New';"&gt;Get-IPRange&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 10pt;"&gt;&lt;FONT face=Calibri size=3&gt;Here is the function. Feel free to let me know of any bugs, but be gentle as I know I'm not validating a lot of the input :)&lt;/FONT&gt;&lt;/P&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;Function &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:teal;FONT-FAMILY:'Courier New';"&gt;Get-IPRange&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;param([&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;string&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;]&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$ipaddress&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:navy;FONT-FAMILY:'Courier New';"&gt;""&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;,[&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;switch&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;]&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$AsString&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;,[&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;switch&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;]&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$AsDecimal&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;,[&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;switch&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;]&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;$AsIPAddress&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;begin {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:green;FONT-FAMILY:'Courier New';"&gt;# support functions&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:blue;FONT-FAMILY:'Courier New';"&gt;function&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt; ToDecimal {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:green;FONT-FAMILY:'Courier New';"&gt;# Convert a string IP ("192.168.1.1") to it's Decimal Equivalent&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:green;FONT-FAMILY:'Courier New';"&gt;# Convert a Binary IP ("11011011111101011101110001111111") to it's Decimal Equivalent&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;mso-layout-grid-align:none;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:bla