<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Conditional Logic Using Loops</title>
	<atom:link href="http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.powershellpro.com</link>
	<description>Sharing the Experience</description>
	<lastBuildDate>Mon, 06 Sep 2010 23:05:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dr.kipp</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-466</link>
		<dc:creator>Dr.kipp</dc:creator>
		<pubDate>Wed, 07 Apr 2010 09:02:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-466</guid>
		<description>how do i make loops count with two figures (01 and to 80 for instance)</description>
		<content:encoded><![CDATA[<p>how do i make loops count with two figures (01 and to 80 for instance)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Quentin</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-373</link>
		<dc:creator>Quentin</dc:creator>
		<pubDate>Wed, 15 Jul 2009 22:20:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-373</guid>
		<description>T Pops is right - changing True to False does nothing, because Responding is a boolean, and it seems &quot;string&quot; -eq boolean is always true.

Better option may be
foreach ($item in Get-Process) {
if ($Item.Responding) {write-host $Item.Name}}</description>
		<content:encoded><![CDATA[<p>T Pops is right &#8211; changing True to False does nothing, because Responding is a boolean, and it seems &#8220;string&#8221; -eq boolean is always true.</p>
<p>Better option may be<br />
foreach ($item in Get-Process) {<br />
if ($Item.Responding) {write-host $Item.Name}}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: T Pops</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-348</link>
		<dc:creator>T Pops</dc:creator>
		<pubDate>Fri, 05 Jun 2009 18:35:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-348</guid>
		<description>If you replace &quot;True&quot; with &quot;False&quot; in your example:

foreach ($item in Get-Process)
{if ($item.Responding -eq “True”){Write-Host $Item.Name}}

It produces the same result. Am I missing something or is a bad script or what?</description>
		<content:encoded><![CDATA[<p>If you replace &#8220;True&#8221; with &#8220;False&#8221; in your example:</p>
<p>foreach ($item in Get-Process)<br />
{if ($item.Responding -eq “True”){Write-Host $Item.Name}}</p>
<p>It produces the same result. Am I missing something or is a bad script or what?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-300</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Thu, 12 Mar 2009 22:12:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-300</guid>
		<description>foreach is great... unless you want to go through two objects simultaniously. How do I do this? I think I&#039;d prefer an iterator for each class and just a for loop, iterating through each class until hasNext() is false. This is my java/c mind trying to figure out powershell though. Basically it all boils down to me wanting things out of two different Win32 classes both relating to harddisks and wanting their info to print together. for a temp fix, I&#039;m just dumping stuff in an array in foreach loops, and then printing it in a for loop at the end. Seems like kind of a waste though... Thanks!</description>
		<content:encoded><![CDATA[<p>foreach is great&#8230; unless you want to go through two objects simultaniously. How do I do this? I think I&#8217;d prefer an iterator for each class and just a for loop, iterating through each class until hasNext() is false. This is my java/c mind trying to figure out powershell though. Basically it all boils down to me wanting things out of two different Win32 classes both relating to harddisks and wanting their info to print together. for a temp fix, I&#8217;m just dumping stuff in an array in foreach loops, and then printing it in a for loop at the end. Seems like kind of a waste though&#8230; Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Hamrick</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-159</link>
		<dc:creator>Jesse Hamrick</dc:creator>
		<pubDate>Wed, 23 Jul 2008 21:22:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-159</guid>
		<description>You&#039;re not missing anything, there was a typo in the example:
Line: if ($val -eq 30)
Should be: if ($var -eq 30)

Then you would get &quot;30 was found in array position 3&quot;

I&#039;ve made the correction in the tutorial.</description>
		<content:encoded><![CDATA[<p>You&#8217;re not missing anything, there was a typo in the example:<br />
Line: if ($val -eq 30)<br />
Should be: if ($var -eq 30)</p>
<p>Then you would get &#8220;30 was found in array position 3&#8243;</p>
<p>I&#8217;ve made the correction in the tutorial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-158</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Wed, 23 Jul 2008 19:54:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-158</guid>
		<description>Running through the second Break Statement example I get $i = 4, thus the Write-Host &quot;30 was found in array position 4&quot;.  You wrote it should be $i = 3.  Now I won&#039;t say I&#039;m not missing something...but what am I missing?  Thanks.</description>
		<content:encoded><![CDATA[<p>Running through the second Break Statement example I get $i = 4, thus the Write-Host &#8220;30 was found in array position 4&#8243;.  You wrote it should be $i = 3.  Now I won&#8217;t say I&#8217;m not missing something&#8230;but what am I missing?  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Norman</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-150</link>
		<dc:creator>Norman</dc:creator>
		<pubDate>Mon, 14 Jul 2008 14:25:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-150</guid>
		<description>Jerry Lee Ford&#039;s example of getting user input is, perhaps deliberately, pointless.  The user is locked into a mode where the only valid input is &quot;Y&quot; whereupon the program terminates.  The only choice the user has is to delay the inevitable.  Asking &quot;Are you sure you want to quit the application?&quot; is kind of cheeky!</description>
		<content:encoded><![CDATA[<p>Jerry Lee Ford&#8217;s example of getting user input is, perhaps deliberately, pointless.  The user is locked into a mode where the only valid input is &#8220;Y&#8221; whereupon the program terminates.  The only choice the user has is to delay the inevitable.  Asking &#8220;Are you sure you want to quit the application?&#8221; is kind of cheeky!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FMoses</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-133</link>
		<dc:creator>FMoses</dc:creator>
		<pubDate>Wed, 18 Jun 2008 22:35:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-133</guid>
		<description>Eric,

Within the do-until loop add the following statement...essentially it puts your script to sleep for 60sec and then checks the process state every time it wakes up.  Check &quot;get-help sleep&quot; for more info.

{ sleep 60 }

cheers</description>
		<content:encoded><![CDATA[<p>Eric,</p>
<p>Within the do-until loop add the following statement&#8230;essentially it puts your script to sleep for 60sec and then checks the process state every time it wakes up.  Check &#8220;get-help sleep&#8221; for more info.</p>
<p>{ sleep 60 }</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Hamrick</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-121</link>
		<dc:creator>Jesse Hamrick</dc:creator>
		<pubDate>Fri, 30 May 2008 22:44:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-121</guid>
		<description>PowerShell doesn&#039;t require a &quot;Next&quot;
&lt;strong&gt;Note:&lt;/strong&gt; Those writing VBScript code will have to get use to not using &quot;Next&quot; as PowerShell doesn&#039;t require the keyword to move to the next item in the collection.</description>
		<content:encoded><![CDATA[<p>PowerShell doesn&#8217;t require a &#8220;Next&#8221;<br />
<strong>Note:</strong> Those writing VBScript code will have to get use to not using &#8220;Next&#8221; as PowerShell doesn&#8217;t require the keyword to move to the next item in the collection.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roshan</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-119</link>
		<dc:creator>Roshan</dc:creator>
		<pubDate>Thu, 29 May 2008 19:21:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-119</guid>
		<description>What is the keyword to move to the the next Item in a foreach ?</description>
		<content:encoded><![CDATA[<p>What is the keyword to move to the the next Item in a foreach ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
