<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Get-PowerShell &#187; Andy Schneider</title>
	<atom:link href="http://get-powershell.com/author/Andy/feed/" rel="self" type="application/rss+xml" />
	<link>http://get-powershell.com</link>
	<description></description>
	<lastBuildDate>Sat, 10 Jul 2010 15:44:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>PowerShell to get Windows Experience Index</title>
		<link>http://get-powershell.com/2010/07/10/powershell-to-get-windows-experience-index/</link>
		<comments>http://get-powershell.com/2010/07/10/powershell-to-get-windows-experience-index/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 15:41:11 +0000</pubDate>
		<dc:creator>Andy Schneider</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[WEI]]></category>
		<category><![CDATA[Windows Experience Index]]></category>

		<guid isPermaLink="false">http://get-powershell.com/2010/07/10/powershell-to-get-windows-experience-index/</guid>
		<description><![CDATA[I was just listening to Scott Hanselman’s podcast on building the Ultimate Developers Machine Part 2.&#160; They are trying to build a machine with a WEI score of 7.9 with a budget of $3000. In the show, they mentioned that you can use WMI to get the WEI score. Get-WmiObject Win32_WinSat]]></description>
			<content:encoded><![CDATA[<p>I was just listening to Scott Hanselman’s podcast on building the <a href="http://hanselminutes.com/default.aspx?showID=238">Ultimate Developers Machine Part 2</a>.&#160; They are trying to build a machine with a WEI score of 7.9 with a budget of $3000. In the show, they mentioned that you can use WMI to get the WEI score. </p>
<p><font face="Consolas">Get-WmiObject Win32_WinSat</font></p>
<p><a href="http://get-powershell.com/wp-content/uploads/2010/07/image.png"><img style="border-bottom: 0px; border-left: 0px; margin: 3px 10px 3px 0px; display: inline; border-top: 0px; border-right: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2010/07/image_thumb.png" width="369" height="231" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://get-powershell.com/2010/07/10/powershell-to-get-windows-experience-index/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hey Scripting Guy! Guest Blog Post</title>
		<link>http://get-powershell.com/2010/07/07/hey-scripting-guy-guest-blog-post/</link>
		<comments>http://get-powershell.com/2010/07/07/hey-scripting-guy-guest-blog-post/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 13:16:02 +0000</pubDate>
		<dc:creator>Andy Schneider</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Ed Wilson]]></category>
		<category><![CDATA[Hey Scripting Guy]]></category>

		<guid isPermaLink="false">http://get-powershell.com/2010/07/07/hey-scripting-guy-guest-blog-post/</guid>
		<description><![CDATA[I had the pleasure of writing an article for the “Hey Scripting Guy!” Blog. In the article I describe how I wrote a function to change the screen resolution. I highly recommend checking out the blog.&#160; Ed and the rest of the Scripting Guys generate a lot of great content.]]></description>
			<content:encoded><![CDATA[<p>I had the pleasure of writing an <a href="http://blogs.technet.com/b/heyscriptingguy/archive/2010/07/07/hey-scripting-guy-how-can-i-change-my-desktop-monitor-resolution-via-windows-powershell.aspx">article</a> for the “Hey Scripting Guy!” Blog. In the article I describe how I wrote a function to change the screen resolution. I highly recommend checking out the <a href="http://blogs.technet.com/b/heyscriptingguy/">blog</a>.&#160; Ed and the rest of the Scripting Guys generate a lot of great content.</p>
]]></content:encoded>
			<wfw:commentRss>http://get-powershell.com/2010/07/07/hey-scripting-guy-guest-blog-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NetApp releases PowerShell Toolkit 1.0</title>
		<link>http://get-powershell.com/2010/06/15/netapp-releases-powershell-toolkit-1-0/</link>
		<comments>http://get-powershell.com/2010/06/15/netapp-releases-powershell-toolkit-1-0/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 21:32:14 +0000</pubDate>
		<dc:creator>Andy Schneider</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://get-powershell.com/2010/06/15/netapp-releases-powershell-toolkit-1-0/</guid>
		<description><![CDATA[NetApp has just released the first version of their PowerShell Toolkit last week. Overall, I am really impressed with their implementation. They did a bunch of things right. It’s a PowerShell 2.0 Module Lots of great help files for every Cmdlet Full coverage of the ONTAP API Used “Approved” verbs 357 Cmdlets About a year [...]]]></description>
			<content:encoded><![CDATA[<p align="left"><a href="http://netapp.com">NetApp</a> has just released the first version of their <a href="http://communities.netapp.com/community/interfaces_and_tools/data_ontap_powershell_toolkit">PowerShell Toolkit</a> last week. Overall, I am really impressed with their implementation. They did a bunch of things right.</p>
<ol>
<li>
<div align="left">It’s a PowerShell 2.0 Module</div>
</li>
<li>
<div align="left">Lots of great help files for every Cmdlet</div>
</li>
<li>
<div align="left">Full coverage of the ONTAP API</div>
</li>
<li>
<div align="left">Used “Approved” verbs</div>
</li>
<li>
<div align="left">357 Cmdlets</div>
</li>
</ol>
<p align="left">About a year ago, NetApp released a .NET version of their API. Using their DLL, I was able to write a bunch of PowerShell 2.0 Advanced Functions to automate the 20 or so tasks that my team did with our NetApps on a weekly basis. Using the .NET API, I created a module with 20 or so Advanced Functions. So far, every one of them has been implemented in the new cmdlets. There are also a great deal of cmdlets that are extremely useful that I never got around to writing. </p>
<p align="left">The ONTAPI .NET API exposed functionality with an object of type Netapp.Manage.NaElement, which is basically an XML Element. Essentially, everything in the Netapp API takes in XML and returns XML. PowerShell does a great job with XML and it was relatively easy to cast from XML to PSObjects as needed. However, the new PowerShell toolkit has a bunch of wrapper classes which seem to be a bunch of de-serialized NaElement Objects. This makes working with the objects much easier. </p>
<p align="left">NetApp has really done a terrific job with their adoption of PowerShell. Again, I am particularly impressed with how well they adhered to the “ground rules” for working with PowerShell. In my opinion, these cmdlets are a great example for other third party companies that are looking to adopt PowerShell.</p>
<p align="left">Now, this is of course version 1. There is always room for improvement. One of the first things I noticed is that there could have been some work done on the default formatting for some of the most basic objects that we use all the time, particularly luns and volumes, NetApp.Ontapi.Filer.Lun.LunInfo&#160; NetApp.Ontapi.Filer.Volume.VolumeInfo respectively. Frankly, I like the default view to be a table with 4 or 5 critical columns. If something has to default to format-table, its too much information to process for me, but that’s my humble opinion.</p>
<p align="left">Here’s an example</p>
<p align="left"><a href="http://get-powershell.com/wp-content/uploads/2010/06/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2010/06/image_thumb.png" width="600" height="696" /></a> </p>
<p align="left">&#160;</p>
<p align="left">I think I would prefer to have a table view that just shows the name, sizeTotal, SizeUsed, and perhaps 1 or 2 other attributes. This seems more useful out of the box to me</p>
<p align="left"><a href="http://get-powershell.com/wp-content/uploads/2010/06/image1.png"><img style="border-bottom: 0px; border-left: 0px; width: 406px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2010/06/image_thumb1.png" width="410" height="212" /></a> </p>
<p align="left">NetApp filers are SAN’s. They are all about storage. They are built on a hierarchical model. Frankly, I think a PowerShell Provider could be a great fit for managing a NetApp filer. However, as Jeffrey Snover often says, to ship is to choose, and I wholeheartedly belive that the cmdlets are more useful than just a provider. But, if you have a provider and cmdlets, they are definitely better together. I love using a Provider for discovery purposes. But I think in general, cmdlets are more useful for actually executing tasks. I would love to see a complimentary PS Provider in version 2 of the Toolkit.</p>
<p align="left">All that being said, I tip my hat to Netapp. Great job on version 1!</p>
]]></content:encoded>
			<wfw:commentRss>http://get-powershell.com/2010/06/15/netapp-releases-powershell-toolkit-1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable-BlackISE</title>
		<link>http://get-powershell.com/2010/05/04/enable-blackise/</link>
		<comments>http://get-powershell.com/2010/05/04/enable-blackise/#comments</comments>
		<pubDate>Tue, 04 May 2010 18:30:14 +0000</pubDate>
		<dc:creator>Andy Schneider</dc:creator>
				<category><![CDATA[ISE]]></category>
		<category><![CDATA[VIM]]></category>

		<guid isPermaLink="false">http://get-powershell.com/2010/05/04/enable-blackise/</guid>
		<description><![CDATA[I have been asked a few times about the color scheme I use in PowerShell ISE. I can’t take credit for designing it. The work was done by David Mohundro. You can find his post at http://www.mohundro.com/blog/2008/12/31/PowerShellISEThemes.aspx.&#160; Here is my version of the function. It simply uses the $psISE variable to mess with the token [...]]]></description>
			<content:encoded><![CDATA[<p>I have been asked a few times about the color scheme I use in PowerShell ISE. I can’t take credit for designing it. The work was done by David Mohundro. You can find his post at <a title="http://www.mohundro.com/blog/2008/12/31/PowerShellISEThemes.aspx" href="http://www.mohundro.com/blog/2008/12/31/PowerShellISEThemes.aspx">http://www.mohundro.com/blog/2008/12/31/PowerShellISEThemes.aspx</a>.&#160; Here is my version of the function. It simply uses the $psISE variable to mess with the token colors. </p>
<div style="border-bottom: black 1px solid; border-left: black 1px solid; padding-bottom: 5px; padding-left: 5px; width: 750px; padding-right: 5px; font-family: consolas,lucida console; font-size: 10pt; overflow: auto; border-top: black 1px solid; border-right: black 1px solid; padding-top: 5px">
<table border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td valign="top">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: consolas,lucida console; background: #cecece; font-size: 10pt; padding-top: 5px">001             <br />002              <br />003              <br />004              <br />005              <br />006              <br />007              <br />008              <br />009              <br />010              <br />011              <br />012              <br />013              <br />014              <br />015              <br />016              <br />017              <br />018              <br />019              <br />020              <br />021              <br />022              <br />023              <br />024              <br />025              <br />026              <br />027              </div>
</td>
<td valign="top" nowrap="nowrap">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: consolas,lucida console; background: black; font-size: 10pt; padding-top: 5px"><span style="color: #ffde00">Function</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">Enable-BlackISE</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">{</span><span style="color: #ffffff">&#160;&#160;&#160; </span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">FontName</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;Consolas&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">FontSize</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #98fe1e">14</span><span style="color: #ffffff">&#160;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">OutputPaneBackgroundColor</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FF000000&#8242;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">OutputPaneTextBackgroundColor</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FF000000&#8242;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">OutputPaneForegroundColor</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFFFFFFF&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">CommandPaneBackgroundColor</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FF000000&#8242;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">ScriptPaneBackgroundColor</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FF000000&#8242;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'Command'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFFFFF60&#8242;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'Unknown'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFFFFFFF&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'Member'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFFFFFFF&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'Position'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFFFFFFF&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'GroupEnd'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFFFFFFF&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'GroupStart'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFFFFFFF&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'LineContinuation'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFFFFFFF&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'NewLine'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFFFFFFF&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'StatementSeparator'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFFFFFFF&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'Comment'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFAEAEAE&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'String'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FF00D42D&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'Keyword'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFFFDE00&#8242;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'Attribute'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FF84A7C1&#8242;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'Type'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FF84A7C1&#8242;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'Variable'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FF00D42D&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'CommandParameter'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFFFDE00&#8242;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'CommandArgument'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FFFFFFFF&#8217;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160; </span><span style="color: #00d42d">$psISE</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Options</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">TokenColors</span><span style="color: #a9a9a9">[</span><span style="color: #00d42d">'Number'</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&#8216;#FF98FE1E&#8217;</span>              <br /><span style="color: #ffffff">}</span> </div>
</td>
</tr>
</tbody>
</table></div>
<p>Have fun. It would be great to see what other kinds of themes people can come up with.</p>
]]></content:encoded>
			<wfw:commentRss>http://get-powershell.com/2010/05/04/enable-blackise/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Pull PCI Bus information for Network Cards with PowerShell</title>
		<link>http://get-powershell.com/2010/04/07/pull-pci-bus-information-for-network-cards-with-powershell/</link>
		<comments>http://get-powershell.com/2010/04/07/pull-pci-bus-information-for-network-cards-with-powershell/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 14:58:31 +0000</pubDate>
		<dc:creator>Andy Schneider</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[PCI Bus]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://get-powershell.com/2010/04/07/pull-pci-bus-information-for-network-cards-with-powershell/</guid>
		<description><![CDATA[Since its been about 3 months, I figured its about time for another post. A few weeks ago, a colleague of mine and I were discussing ways to identify which network cards were which when we build new Hyper-V cluster nodes. It can get a little nuts when you have 2 iSCSI networks, 1 Corp [...]]]></description>
			<content:encoded><![CDATA[<p align="left">Since its been about 3 months, I figured its about time for another post. A few weeks ago, a colleague of mine and I were discussing ways to identify which network cards were which when we build new Hyper-V cluster nodes. It can get a little nuts when you have 2 iSCSI networks, 1 Corp connection, and one connection that is tagged for VM’s on different VLAN’s, and a Heartbeat network. </p>
<p align="left">We found that there is no real way to predict which NIC will be named “Local Area Connection”, “Local Area Connection 2”, Local Area Connection N …” and so on. However, poking around we did find that there is one thing in common across all of our servers. Assuming the NICS were all plugged into the switch in order, we could identify them by their PCI bus, device, and function ID as shown in the screenshot below.</p>
<p align="left"><a href="http://get-powershell.com/wp-content/uploads/2010/04/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2010/04/image_thumb.png" width="345" height="387" /></a> </p>
<p>Well that’s all good but how can we leverage that information and automate our network configuration for new cluster nodes. First, we need to come up with a standard. We know the PCI Bus information for each NIC in the server. Once we made that map, we can specify which NIC gets which IP Address.&#160; Once you manually create that map, you still need a way to identify which NIC has what Bus information. Enter PowerShell.</p>
<p>This gets a little nuts because we have to piece this together from a couple different sources. The first bit of information that we need for each NIC is something called the PnPDeviceID. You can pull this wit WMI using the win32_networkAdapter class.</p>
<p><a href="http://get-powershell.com/wp-content/uploads/2010/04/image1.png"><img style="border-bottom: 0px; border-left: 0px; width: 706px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2010/04/image_thumb1.png" width="644" height="152" /></a> </p>
<p>So what does this buy us. It turns out this is part of the path in the registry that stores the PCI bus information. Lets assume you store the PnPDeviced id in $deviceID. You can get the PCI Bus information with the following:</p>
<p><a href="http://get-powershell.com/wp-content/uploads/2010/04/image2.png"><img style="border-bottom: 0px; border-left: 0px; width: 638px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2010/04/image_thumb2.png" width="641" height="377" /></a> </p>
<p>Those last 3 numbers that are circled in red are the BusID, DeviceID, and FunctionID. Note that this is for 2008 and 2008 R2. All I really need is those last 3 numbers so some regex trickery along with multi-variable assignment comes in pretty handy here.</p>
<p><a href="http://get-powershell.com/wp-content/uploads/2010/04/image3.png"><img style="border-bottom: 0px; border-left: 0px; width: 672px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2010/04/image_thumb3.png" width="643" height="443" /></a> </p>
<p>So once we have that, we can put this all together in a couple functions</p>
<p>&#160;</p>
<div style="border-bottom: black 1px solid; border-left: black 1px solid; padding-bottom: 5px; padding-left: 5px; width: 750px; padding-right: 5px; font-family: consolas,lucida console; font-size: 10pt; overflow: auto; border-top: black 1px solid; border-right: black 1px solid; padding-top: 5px">
<table border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td valign="top">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: consolas,lucida console; background: #cecece; font-size: 10pt; padding-top: 5px">001             <br />002              <br />003              <br />004              <br />005              <br />006              <br />007              <br />008              <br />009              <br />010              <br />011              <br />012              <br />013              <br />014              <br />015              <br />016              <br />017              <br />018              <br />019              <br />020              <br />021              <br />022              <br />023              <br />024              <br />025              <br />026              <br />027              <br />028              <br />029              <br />030              <br />031              <br />032              <br />033              <br />034              <br />035              <br />036              <br />037              <br />038              <br />039              <br />040              <br />041              <br />042              <br />043              </div>
</td>
<td valign="top" nowrap="nowrap">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: consolas,lucida console; background: black; font-size: 10pt; padding-top: 5px"><span style="color: #ffde00">Function</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">Get-NicBusFunctionID</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">{</span>              <br /><span style="color: #00d42d">$adapters</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #ffff60">get-wmiobject</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">win32_networkadapter</span><span style="color: #ffffff">&#160;</span><span style="color: #ffde00">-filter</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&quot;netenabled=true&quot;</span>              </p>
<p><span style="color: #ffde00">foreach</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">(</span><span style="color: #00d42d">$adapter</span><span style="color: #ffffff">&#160;</span><span style="color: #ffde00">in</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">$adapters</span><span style="color: #ffffff">)</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">{</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160; </span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #00d42d">$deviceId</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">$adapter</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">PnPDeviceID</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #00d42d">$locationInfo</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">(</span><span style="color: #ffff60">get-itemproperty</span><span style="color: #ffffff">&#160;</span><span style="color: #ffde00">-path</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&quot;HKLM:\SYSTEM\CurrentControlSet\Enum\$deviceID&quot;</span><span style="color: #ffffff">&#160;</span>`              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #ffde00">-name</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">locationinformation</span><span style="color: #ffffff">)</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">locationINformation</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #00d42d">$businfo</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #ffff60">Resolve-PCIBusInfo</span><span style="color: #ffffff">&#160;</span><span style="color: #ffde00">-locationInfo</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">$locationinfo</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #ffff60">new-object</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">psobject</span><span style="color: #ffffff">&#160;</span><span style="color: #ffde00">-property</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">@{</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #00d42d">&quot;Name&quot;</span><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">$adapter</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">NetConnectionID</span><span style="color: #ffffff">;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #00d42d">&quot;MacAddress&quot;</span><span style="color: #ffffff">&#160; </span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">$adapter</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">MacAddress</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #00d42d">&quot;Index&quot;</span><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">$adapter</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">Index</span><span style="color: #ffffff">;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #00d42d">&quot;PCIBusID&quot;</span><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160; </span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">$businfo</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">BusID</span><span style="color: #ffffff">;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #00d42d">&quot;PCIDeviceID&quot;</span><span style="color: #ffffff">&#160;&#160; </span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">$businfo</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">DeviceID</span><span style="color: #ffffff">;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #00d42d">&quot;PCIFunctionID&quot;</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">$businfo</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">FunctionID</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #ffffff">}</span>              <br /><span style="color: #ffffff">}</span>              </p>
<p><span style="color: #ffffff">}</span>              </p>
<p><span style="color: #ffde00">Function</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">Resolve-PCIBusInfo</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">{</span>              </p>
<p><span style="color: #ffde00">param</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">(</span>              <br /><span style="color: #a9a9a9">[</span><span style="color: #84a7c1">parameter</span><span style="color: #ffffff">(</span><span style="color: #ffffff">ValueFromPipeline</span><span style="color: #a9a9a9">=</span><span style="color: #00d42d">$true</span><span style="color: #a9a9a9">,</span><span style="color: #ffffff">Mandatory</span><span style="color: #a9a9a9">=</span><span style="color: #00d42d">$true</span><span style="color: #ffffff">)</span><span style="color: #a9a9a9">]</span>              <br /><span style="color: #84a7c1">[string]</span>              <br /><span style="color: #00d42d">$locationInfo</span>              <br /><span style="color: #ffffff">)</span>              <br /><span style="color: #ffde00">PROCESS</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">{</span>              <br /><span style="color: #84a7c1">[void]</span><span style="color: #ffffff">(</span><span style="color: #00d42d">$locationInfo</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">-match</span><span style="color: #ffffff">&#160; </span><span style="color: #00d42d">&quot;\d,\d,\d&quot;</span><span style="color: #ffffff">)</span>              <br /><span style="color: #00d42d">$busId</span><span style="color: #a9a9a9">,</span><span style="color: #00d42d">$deviceID</span><span style="color: #a9a9a9">,</span><span style="color: #00d42d">$functionID</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">$matches</span><span style="color: #a9a9a9">[</span><span style="color: #98fe1e">0</span><span style="color: #a9a9a9">]</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">-split</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&quot;,&quot;</span>              </p>
<p><span style="color: #ffff60">new-object</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">psobject</span><span style="color: #ffffff">&#160;</span><span style="color: #ffde00">-property</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">@{</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #00d42d">&quot;BusID&quot;</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">$busID</span><span style="color: #ffffff">;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #00d42d">&quot;DeviceID&quot;</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&quot;$deviceID&quot;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #00d42d">&quot;FunctionID&quot;</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">&quot;$functionID&quot;</span>              <br /><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #ffffff">}</span>              <br /><span style="color: #ffffff">}</span><span style="color: #ffffff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>              <br /><span style="color: #ffffff">}</span>              </p>
<p></div>
</td>
</tr>
</tbody>
</table></div>
</p>
</p>
<p>And a screenshot of how to use it</p>
<p> <a href="http://get-powershell.com/wp-content/uploads/2010/04/image4.png"><img style="border-bottom: 0px; border-left: 0px; width: 385px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2010/04/image_thumb4.png" width="391" height="239" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://get-powershell.com/2010/04/07/pull-pci-bus-information-for-network-cards-with-powershell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Determining if IP addresses are on the same subnet</title>
		<link>http://get-powershell.com/2010/01/29/determining-if-ip-addresses-are-on-the-same-subnet/</link>
		<comments>http://get-powershell.com/2010/01/29/determining-if-ip-addresses-are-on-the-same-subnet/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 15:05:47 +0000</pubDate>
		<dc:creator>Andy Schneider</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[System.Net.IPAddress]]></category>

		<guid isPermaLink="false">http://get-powershell.com/2010/01/29/determining-if-ip-addresses-are-on-the-same-subnet/</guid>
		<description><![CDATA[This is actually a fairly simple task that many people have done in many different languages. However, I thought it would be useful to share for the sake of showing how .NET can do a lot of tedious work for us. IP Addresses are made up of 32 bits. Subnet masks are 32 bits as [...]]]></description>
			<content:encoded><![CDATA[<p>This is actually a fairly simple task that many people have done in many different languages. However, I thought it would be useful to share for the sake of showing how .NET can do a lot of tedious work for us. </p>
<p> IP Addresses are made up of 32 bits. Subnet masks are 32 bits as well. The subnet mask is what is used to determine where the Network ID ends and the host ID begins. Masks must have contiguous 1’s. If there is a 1 in the mask, then the corresponding bit in the IP Address is part of the Network ID. If there is 0 in the mask, the corresponding bit in the IP Address is part of the host ID.</p>
<p> So obviously there is going to be a lot of binary math, which any good network engineer can do. However, if you can get it for free, even better!</p>
<p> There is a type in .NET called System.Net.IPAddress that has several useful properties. The one I will focus on is Address.</p>
<p><a href="http://get-powershell.com/wp-content/uploads/2010/01/image.png"><img style="border-right-width: 0px; width: 638px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2010/01/image_thumb.png" width="638" height="376" /></a></p>
<p> Using the Address property and some bitwise operators in PowerShell, we can come up with a function pretty quickly. The –and and –or operators are pretty commonplace in the world of PowerShell but there is occasionally a need to do a compare of two numbers at the bit level. This is done with the –band and –bor operators. I may be off but if memory serves, using –bor and –band you can build any other bit function like xor. I won’t event think about <a href="http://en.wikipedia.org/wiki/Karnaugh_map">K-maps</a>.</p>
<p> So with all that, here is some code:</p>
<div style="border-bottom: black 1px solid; border-left: black 1px solid; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: consolas, lucida console; font-size: 10pt; overflow: auto; border-top: black 1px solid; border-right: black 1px solid; padding-top: 5px">
<table border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td valign="top">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: consolas, lucida console; background: #cecece; font-size: 10pt; padding-top: 5px">001              <br />002               <br />003               <br />004               <br />005               <br />006               <br />007               <br />008               <br />009               <br />010               <br />011               <br />012               <br />013               <br />014               <br />015               <br />016               <br />017               <br />018               <br />019               <br />020               </div>
</td>
<td valign="top" nowrap="nowrap">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: consolas, lucida console; background: black; font-size: 10pt; padding-top: 5px"><span style="color: #ffde00">Function</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">Test-SameSubnet</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">{</span>               <br /><span style="color: #ffde00">param</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">(</span>               <br /><span style="color: #a9a9a9">[</span><span style="color: #84a7c1">parameter</span><span style="color: #ffffff">(</span><span style="color: #ffffff">Mandatory</span><span style="color: #a9a9a9">=</span><span style="color: #00d42d">$true</span><span style="color: #ffffff">)</span><span style="color: #a9a9a9">]</span>               <br /><span style="color: #84a7c1">[Net.IPAddress]</span>               <br /><span style="color: #00d42d">$ip1</span><span style="color: #a9a9a9">,</span>               </p>
<p><span style="color: #a9a9a9">[</span><span style="color: #84a7c1">parameter</span><span style="color: #ffffff">(</span><span style="color: #ffffff">Mandatory</span><span style="color: #a9a9a9">=</span><span style="color: #00d42d">$true</span><span style="color: #ffffff">)</span><span style="color: #a9a9a9">]</span>               <br /><span style="color: #84a7c1">[Net.IPAddress]</span>               <br /><span style="color: #00d42d">$ip2</span><span style="color: #a9a9a9">,</span>               </p>
<p><span style="color: #a9a9a9">[</span><span style="color: #84a7c1">parameter</span><span style="color: #ffffff">(</span><span style="color: #ffffff">)</span><span style="color: #a9a9a9">]</span>               <br /><span style="color: #a9a9a9">[</span><span style="color: #84a7c1">alias</span><span style="color: #ffffff">(</span><span style="color: #00d42d">&quot;SubnetMask&quot;</span><span style="color: #ffffff">)</span><span style="color: #a9a9a9">]</span>               <br /><span style="color: #84a7c1">[Net.IPAddress]</span>               <br /><span style="color: #00d42d">$mask</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #00d42d">&quot;255.255.255.0&quot;</span>               <br /><span style="color: #ffffff">)</span>               </p>
<p><span style="color: #ffde00">if</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">(</span><span style="color: #ffffff">(</span><span style="color: #00d42d">$ip1</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">address</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">-band</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">$mask</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">address</span><span style="color: #ffffff">)</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">-eq</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">(</span><span style="color: #00d42d">$ip2</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">address</span><span style="color: #ffffff">&#160;</span><span style="color: #a9a9a9">-band</span><span style="color: #ffffff">&#160;</span><span style="color: #00d42d">$mask</span><span style="color: #a9a9a9">.</span><span style="color: #ffffff">address</span><span style="color: #ffffff">)</span><span style="color: #ffffff">)</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">{</span><span style="color: #00d42d">$true</span><span style="color: #ffffff">}</span>               <br /><span style="color: #ffde00">else</span><span style="color: #ffffff">&#160;</span><span style="color: #ffffff">{</span><span style="color: #00d42d">$false</span><span style="color: #ffffff">}</span>               </p>
<p><span style="color: #ffffff">}</span> </div>
</td>
</tr>
</tbody>
</table></div>
<p> The Address property is the binary number that represents the IP Address. Doing a bitwise AND with a mask will tell us if they are in the same subnet. I have a default value of 255.255.255.0 for the mask, or /24 if you prefer CIDR notation, but you can specify it as a parameter if you like.</p>
<p>&#160;<a href="http://get-powershell.com/wp-content/uploads/2010/01/image1.png"><img style="border-right-width: 0px; width: 638px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2010/01/image_thumb1.png" width="682" height="462" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://get-powershell.com/2010/01/29/determining-if-ip-addresses-are-on-the-same-subnet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Specifying Listener IP Address for PowerShell Remoting</title>
		<link>http://get-powershell.com/2009/12/11/specifying-listener-ip-address-for-powershell-remoting/</link>
		<comments>http://get-powershell.com/2009/12/11/specifying-listener-ip-address-for-powershell-remoting/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 22:14:04 +0000</pubDate>
		<dc:creator>Andy Schneider</dc:creator>
				<category><![CDATA[Listeners]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Remoting]]></category>
		<category><![CDATA[WinRM]]></category>

		<guid isPermaLink="false">http://get-powershell.com/2009/12/11/specifying-listener-ip-address-for-powershell-remoting/</guid>
		<description><![CDATA[I have a lot of servers that have more than one network interface. For example, in my Hyper-V cluster, we might have iSCSI NICs, Live Migration NICs, Heartbeat NICs, and Client Access NICs. When I enabled remoting I was not comfortable with WinRM listening on all of the IP addresses on my server. I really [...]]]></description>
			<content:encoded><![CDATA[<p>I have a lot of servers that have more than one network interface. For example, in my Hyper-V cluster, we might have iSCSI NICs, Live Migration NICs, Heartbeat NICs, and Client Access NICs. When I enabled remoting I was not comfortable with WinRM listening on all of the IP addresses on my server. I really only wanted it to listen on 1 IP.</p>
<p>On my local machine, you can see that my listener is listening on any address it can find on my IP stack.</p>
<p><a href="http://get-powershell.com/wp-content/uploads/2009/12/image.png"><img style="border-bottom: 0px; border-left: 0px; width: 684px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2009/12/image_thumb.png" width="641" height="364" /></a> </p>
<p>I’d like to set this to only listen only on a single IP V4 Address. When I first tried to change this I started looking at the value for Address under my listener but kept running into an error that reads <font color="#ff0000">Set-Item : Item has already been added. Key in dictionary: &#8216;Address&#8217;&#160; Key being added: &#8216;Address&#8217;</font></p>
<p>Poking around the WSMAN provider, (which is fantastic by the way!) I found something else that looked promising. In WSMAN:\localhost\Service there are items called IPV4Filter and IPV6Filter. </p>
<p><a href="http://get-powershell.com/wp-content/uploads/2009/12/image1.png"><img style="border-bottom: 0px; border-left: 0px; width: 718px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2009/12/image_thumb1.png" width="642" height="393" /></a> </p>
<p>Sweet!&#160; Let’s try to set it to my local IP Address… and fail with this error</p>
<p><font color="#ff0000">Set-Item : The WinRM client cannot process the request. The IP Filter is invalid. Ranges are specified using the syntax IP1-IP2. Multiple ranges are separated using , as delimiter. * is used to indicate that the service should listen on all available IPs on the machine. When * is used, other ranges in the filter are ignored. If filter is blank,     <br /> the service doesn&#8217;t listen on any address. For example, if service should be restricted to listen on only IPv4 addresses, IPv6 filter should be left empty.</font> </p>
<p>But this is great news. The error message is actually helpful – Christmas miracle maybe?</p>
<p>If you want to listen on a single IP Address, you can specify a range that starts and ends at the same IP. For example, </p>
<p><a href="http://get-powershell.com/wp-content/uploads/2009/12/image2.png"><img style="border-bottom: 0px; border-left: 0px; width: 722px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2009/12/image_thumb2.png" width="644" height="392" /></a> </p>
<p>So why would you have to enter all these crazy ranges.? Well it turns out you can specify these in a GPO. Say you have a Hyper-V Cluster that has a client access network (10.10.10.0/24), an iSCSI network (10.11.11.0/24), and a few others for things like heartbeat and live migration.&#160; If you only wanted to have a listener on the client access network for all of your cluster nodes, you could specify the IPv4Filter to be 10.10.10.1- 10.10.10.254 and the policy would apply to all our servers and they would not be listening on the 10.11.11.0/24 iSCSI network.</p>
<p>To configure GPO settings, you can go to Computer Configuration\Administrative Templates\Windows Components\WinRM Service and in there you will find a setting called “Allow automatic configuration of listeners”</p>
<p><a href="http://get-powershell.com/wp-content/uploads/2009/12/image3.png"><img style="border-bottom: 0px; border-left: 0px; width: 690px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2009/12/image_thumb3.png" width="644" height="589" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://get-powershell.com/2009/12/11/specifying-listener-ip-address-for-powershell-remoting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell Advanced Functions</title>
		<link>http://get-powershell.com/2009/11/30/powershell-advanced-functions/</link>
		<comments>http://get-powershell.com/2009/11/30/powershell-advanced-functions/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 14:45:29 +0000</pubDate>
		<dc:creator>Andy Schneider</dc:creator>
				<category><![CDATA[Advanced Function]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Screencast]]></category>

		<guid isPermaLink="false">http://get-powershell.com/2009/11/30/powershell-advanced-functions/</guid>
		<description><![CDATA[A while back I posted a screencast on using the ISE for debugging. It seems like a lot of people enjoyed the video so I thought I would do another one. As a result, here is a Screencast that discusses Advanced Functions in PowerShell. I hope you find it helpful.]]></description>
			<content:encoded><![CDATA[<p>A while back I posted a screencast on <a href="http://get-powershell.com/2009/09/08/debugging-modules-with-the-powershell-ise-integrated-scripting-environment/">using the ISE for debugging</a>. It seems like a lot of people enjoyed the video so I thought I would do another one. As a result, here is a Screencast that discusses Advanced Functions in PowerShell. I hope you find it helpful.</p>
<p> <iframe style="width: 800px; height: 600px" src="http://silverlight.services.live.com/invoke/82115/PowerShell%20Advanced%20Functions/iframe.html" frameborder="0" scrolling="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://get-powershell.com/2009/11/30/powershell-advanced-functions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Seattle PowerShell Script Club &#8211; Thurs Nov 19th</title>
		<link>http://get-powershell.com/2009/11/06/seattle-powershell-script-club-thurs-nov-19th/</link>
		<comments>http://get-powershell.com/2009/11/06/seattle-powershell-script-club-thurs-nov-19th/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 18:03:45 +0000</pubDate>
		<dc:creator>Andy Schneider</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Script Club]]></category>

		<guid isPermaLink="false">http://get-powershell.com/2009/11/06/seattle-powershell-script-club-thurs-nov-19th/</guid>
		<description><![CDATA[I am happy to announce that the Seattle PowerShell Script Club will be meeting on Thursday, Nov 19th at 818 Stewart St, Seattle WA from 7:00 PM to 9:00 PM and a good chance of heading out for beers when we’re done. James Brundage has released his Windows PowerShell Pack. James and I thought we [...]]]></description>
			<content:encoded><![CDATA[<p>I am happy to announce that the Seattle PowerShell Script Club will be meeting on <strong>Thursday, Nov 19th at </strong><a href="http://www.bing.com/maps/?v=2&amp;where1=818%20Stewart%20St%2C%20Seattle%2C%20WA%2098101-1306&amp;encType=1"><strong>818 Stewart St, Seattle WA</strong></a><strong> from 7:00 PM to 9:00 PM </strong>and a good chance of heading out for beers when we’re done.</p>
<p><a href="http://blogs.msdn.com/mediaandmicrocode/">James Brundage</a> has released his <a href="http://code.msdn.microsoft.com/PowerShellPack">Windows PowerShell Pack</a>. James and I thought we would start off with a couple examples of how to use WPK to create rich WPF based visualizations of data that is collected with PowerShell.&#160; From there, we can go pretty much anywhere you want to.</p>
<p>Please leave a comment if you plan on attending. <a href="https://www.clicktoattend.com/invitation.aspx?code=143135">Please Register Here</a></p>
<p>Hope to see you there!</p>
<p>Andy</p>
]]></content:encoded>
			<wfw:commentRss>http://get-powershell.com/2009/11/06/seattle-powershell-script-club-thurs-nov-19th/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iSCSI, iscsicli, and WMI, Oh My!</title>
		<link>http://get-powershell.com/2009/09/18/iscsi-iscsicli-and-wmi-oh-my/</link>
		<comments>http://get-powershell.com/2009/09/18/iscsi-iscsicli-and-wmi-oh-my/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 14:13:11 +0000</pubDate>
		<dc:creator>Andy Schneider</dc:creator>
				<category><![CDATA[ISCSI]]></category>
		<category><![CDATA[WMI]]></category>
		<category><![CDATA[iscsicli]]></category>

		<guid isPermaLink="false">http://get-powershell.com/2009/09/18/iscsi-iscsicli-and-wmi-oh-my/</guid>
		<description><![CDATA[I have been doing a lot of work with clustering Hyper-V lately and our storage is all iSCSI. Without going into all the gory details, iSCSI supports multipathing. My iSCSI SAN has two heads, each head has 3 NIC’s. On my Hyper-V hosts, we have two NIC’s that are used for iSCSI. Each NIC has [...]]]></description>
			<content:encoded><![CDATA[<p>I have been doing a lot of work with clustering Hyper-V lately and our storage is all iSCSI. Without going into all the gory details, iSCSI supports multipathing. My iSCSI SAN has two heads, each head has 3 NIC’s. On my Hyper-V hosts, we have two NIC’s that are used for iSCSI. Each NIC has a “target” for each IP on each head. Some quick math and you realize that’s a lot of connections, and a pain the butt to configure when you have a ton of nodes using this configuration. So naturally I started looking at scripting and didn’t find any cmdlets to work with iSCSI. However, there is a tool called ISCSICLI. </p>
<p>To add a an iSCSI target you can use the QAddTargetPortal command. Assuming your SAN’s iSCSI IP address is 192.168.168.10 you would use this command</p>
<p><font size="2" face="Consolas">iscsicli QAddTargetPortal 192.168.168.10</font></p>
<p>That’s fine, but what if you want to specify a source IP Address. This is pretty straight forward using the iSCSI Control Panel. In advanced settings you can choose both the “Microsoft iSCSI initiator” and the Initiator IP. </p>
<p><a href="http://get-powershell.com/wp-content/uploads/2009/09/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2009/09/image_thumb.png" width="469" height="229" /></a> </p>
<p>It turns out QAddTarget is “Quick Add Target” which gives you very few options. You can also use AddTargetPortal.</p>
<p><a href="http://get-powershell.com/wp-content/uploads/2009/09/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2009/09/image_thumb1.png" width="471" height="99" /></a> </p>
<p>So there are a few things you should know. TargetPortalAddress is the IP address of the SAN you are connecting to. TargetPortalSocket is not really the socket, but just the port number, which is typically 3260. Normally a socket consists of an IP Address and a port number. The HBA name actually refers to Initiator Adapter. In this case it would be “Microsoft iSCSI Initiator.” Finally we get to the Port Number. It turns out that this port number is what is mapped to a source IP Address. The problem was that I could not find any documentation telling me how this port number was associated with an IP address on the server. At first I thought it might be the index of an interface, but quickly learned that was not the case, as you could have multiple IP’s on one interface anyway. </p>
<p>When something doesn’t show up in the GUI, I go exploring with WMI and PowerShell. It turns out there is a ton of iSCSI info buried in the root\wmi namespace</p>
<p><a href="http://get-powershell.com/wp-content/uploads/2009/09/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2009/09/image_thumb2.png" width="506" height="445" /></a> </p>
<p>Looking around I found a msIScsi_portalinfoclass.</p>
<p><a href="http://get-powershell.com/wp-content/uploads/2009/09/image3.png"><img style="border-bottom: 0px; border-left: 0px; width: 645px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2009/09/image_thumb3.png" width="643" height="288" /></a> </p>
<p>The PortalInformation property looked like it had some good info in it as well so I went digging into that.</p>
<p><a href="http://get-powershell.com/wp-content/uploads/2009/09/image4.png"><img style="border-bottom: 0px; border-left: 0px; width: 677px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2009/09/image_thumb4.png" width="643" height="529" /></a> </p>
<p>Sweet! I see IPAddr and a port number. This looks promising. But when I crack open IPAddr I don’t see what I was expecting to see</p>
<p><a href="http://get-powershell.com/wp-content/uploads/2009/09/image5.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2009/09/image_thumb5.png" width="425" height="502" /></a> </p>
<p>Seriously.. since when is 1865687562 an IP V4 address? I was so close and then remembered that there is an IPAddress type in System.Net. Let’s just test something out here.</p>
<p><a href="http://get-powershell.com/wp-content/uploads/2009/09/image6.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2009/09/image_thumb6.png" width="410" height="253" /></a> </p>
<p>Woo Hoo! Given this I can now write my Get-IscsiPortNumber function in PowerShell.</p>
</p>
</p>
</p>
<div style="border-bottom: black 1px solid; border-left: black 1px solid; padding-bottom: 5px; padding-left: 5px; width: 750px; padding-right: 5px; font-family: consolas,lucida console; font-size: 10pt; overflow: auto; border-top: black 1px solid; border-right: black 1px solid; padding-top: 5px">
<table border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td valign="top">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: consolas,lucida console; background: #cecece; font-size: 10pt; padding-top: 5px">001             <br />002              <br />003              <br />004              <br />005              <br />006              <br />007              </div>
</td>
<td valign="top" nowrap="nowrap">
<div style="padding-bottom: 5px; padding-left: 5px; padding-right: 5px; font-family: consolas,lucida console; background: #fcfcfc; font-size: 10pt; padding-top: 5px"><span style="color: #00008b">Function</span><span style="color: #000000">&#160;</span><span style="color: #8a2be2">Get-IscsiPortNumber</span><span style="color: #000000">&#160;</span><span style="color: #000000">{</span>              <br /><span style="color: #ff4500">$query</span><span style="color: #000000">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #000000">&#160;</span><span style="color: #8b0000">&quot;select portalinformation from MSiSCSI_PortalInfoClass&quot;</span><span style="color: #000000">&#160;</span>              <br /><span style="color: #ff4500">$portalInfo</span><span style="color: #000000">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #000000">&#160;</span><span style="color: #0000ff">get-wmiobject</span><span style="color: #000000">&#160;</span><span style="color: #000080">-namespace</span><span style="color: #000000">&#160;</span><span style="color: #8a2be2">root\wmi</span><span style="color: #000000">&#160;</span><span style="color: #000080">-query</span><span style="color: #000000">&#160;</span><span style="color: #ff4500">$query</span>              <br /><span style="color: #ff4500">$eScriptBlock</span><span style="color: #000000">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #000000">{</span><span style="color: #000000">(</span><span style="color: #008080">[Net.IPAddress]</span><span style="color: #ff4500">$_</span><span style="color: #a9a9a9">.</span><span style="color: #000000">ipaddr</span><span style="color: #a9a9a9">.</span><span style="color: #000000">IPV4Address</span><span style="color: #000000">)</span><span style="color: #a9a9a9">.</span><span style="color: #000000">IPAddressToString</span><span style="color: #000000">}</span>              <br /><span style="color: #ff4500">$customLabel</span><span style="color: #000000">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #000000">&#160;</span><span style="color: #000000">@{</span><span style="color: #000000">Label</span><span style="color: #a9a9a9">=</span><span style="color: #8b0000">&quot;IpAddress&quot;</span><span style="color: #000000">;</span><span style="color: #000000">&#160;</span><span style="color: #000000">expression</span><span style="color: #000000">&#160;</span><span style="color: #a9a9a9">=</span><span style="color: #000000">&#160;</span><span style="color: #ff4500">$eScriptBlock</span><span style="color: #000000">}</span>              <br /><span style="color: #ff4500">$portalInfo</span><span style="color: #a9a9a9">.</span><span style="color: #000000">portalInformation</span><span style="color: #000000">&#160;</span><span style="color: #a9a9a9">|</span><span style="color: #000000">&#160;</span><span style="color: #0000ff">select</span><span style="color: #000000">&#160;</span><span style="color: #8a2be2">port</span><span style="color: #a9a9a9">,</span><span style="color: #ff4500">$customlabel</span>              <br /><span style="color: #000000">}</span> </div>
</td>
</tr>
</tbody>
</table></div>
<p>Now that we have that info, we can use it in our iscsicli command</p>
<p><code>iscsicli addtargetportal 192.168.168.10 3260 ROOT\ISCSIPRT\0000_0 2 * * * * * * * * * *</code></p>
<p><code><font face="Arial">Oh yeah, the ROOT\ISCSIPRT\0000_0 means MS Iscsi Initiator. There are some login flags as well that you would probably want to set for multipath as well. </font></code></p>
<p><a href="http://get-powershell.com/wp-content/uploads/2009/09/image7.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://get-powershell.com/wp-content/uploads/2009/09/image_thumb7.png" width="509" height="121" /></a> </p>
<p>So if your port number is 2 the final command would be</p>
<p><code>iscsicli addtargetportal 192.168.168.10 3260 ROOT\ISCSIPRT\0000_0 2 * 0x2 * * * * * * * *</code></p>
]]></content:encoded>
			<wfw:commentRss>http://get-powershell.com/2009/09/18/iscsi-iscsicli-and-wmi-oh-my/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
