<?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>Fri, 03 Feb 2012 08:09:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Praneeth</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-740</link>
		<dc:creator>Praneeth</dc:creator>
		<pubDate>Fri, 25 Nov 2011 07:23:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-740</guid>
		<description>i want to validate remove command whether it is working or not for error handling how to do it pls tell me, i have tried 
if(Remove-MsolUser -userPrincipalName $args[1])
{
success}
else
{
failure}

im getting failure for success &amp; failure,  why this is happening can u help me please.........


Thanks &amp; regards
Praneeth</description>
		<content:encoded><![CDATA[<p>i want to validate remove command whether it is working or not for error handling how to do it pls tell me, i have tried<br />
if(Remove-MsolUser -userPrincipalName $args[1])<br />
{<br />
success}<br />
else<br />
{<br />
failure}</p>
<p>im getting failure for success &amp; failure,  why this is happening can u help me please&#8230;&#8230;&#8230;</p>
<p>Thanks &amp; regards<br />
Praneeth</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-699</link>
		<dc:creator>George</dc:creator>
		<pubDate>Thu, 29 Sep 2011 18:08:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-699</guid>
		<description>I find that using the &quot;continue&quot; statement causes my script to terminate. Also, &quot;Get-Command&quot; and &quot;Get-Command -CommandType All&quot; do not retrieve a line for the command. Is my installation broken?</description>
		<content:encoded><![CDATA[<p>I find that using the &#8220;continue&#8221; statement causes my script to terminate. Also, &#8220;Get-Command&#8221; and &#8220;Get-Command -CommandType All&#8221; do not retrieve a line for the command. Is my installation broken?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-663</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Wed, 10 Aug 2011 18:48:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-663</guid>
		<description>Haji,

Powershell also uses the familiar command shell from old (think DOS).  It does this as a backwards compatibility for us legacy users.  Therefore things like sifting through directories, delete/rename commands still work in the powershell console.  Powershell will pass known commands such as these on to be executed as you would from say a run dialogue box or command prompt, assuming the executable is in the path environmental variables.</description>
		<content:encoded><![CDATA[<p>Haji,</p>
<p>Powershell also uses the familiar command shell from old (think DOS).  It does this as a backwards compatibility for us legacy users.  Therefore things like sifting through directories, delete/rename commands still work in the powershell console.  Powershell will pass known commands such as these on to be executed as you would from say a run dialogue box or command prompt, assuming the executable is in the path environmental variables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haji Akhundov</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-654</link>
		<dc:creator>Haji Akhundov</dc:creator>
		<pubDate>Thu, 21 Jul 2011 13:57:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-654</guid>
		<description>Dear Author,
I just started learning PowerShell recently. your tutorial is great! Its a very good start for beginners! Thank you!

p.s.
in one of the examples above you launch a notepad by just typing notepad,
same can be done by typing calc. But I really don&#039;t understand how this works on the background. Can any one explain how that works? regards =)</description>
		<content:encoded><![CDATA[<p>Dear Author,<br />
I just started learning PowerShell recently. your tutorial is great! Its a very good start for beginners! Thank you!</p>
<p>p.s.<br />
in one of the examples above you launch a notepad by just typing notepad,<br />
same can be done by typing calc. But I really don&#8217;t understand how this works on the background. Can any one explain how that works? regards =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-622</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Mon, 16 May 2011 07:15:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-622</guid>
		<description>Hey , what can I lunch a txt file on startup ? means when I start up my computer I want a txt file to open up.</description>
		<content:encoded><![CDATA[<p>Hey , what can I lunch a txt file on startup ? means when I start up my computer I want a txt file to open up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rueben</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-548</link>
		<dc:creator>Rueben</dc:creator>
		<pubDate>Tue, 14 Dec 2010 18:35:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-548</guid>
		<description>Hi Cathy,

The error resides in the second line of the code:

$colItems = get-wmiobject -class “Win32_Processor” -namespace “root\CIMV2? `

The last quotation mark is different than all the rest, simply replace it via the PowerShell ISE to get the right one and terminate the string correctly, so that the rest of the strings can be properly initiated and terminated.</description>
		<content:encoded><![CDATA[<p>Hi Cathy,</p>
<p>The error resides in the second line of the code:</p>
<p>$colItems = get-wmiobject -class “Win32_Processor” -namespace “root\CIMV2? `</p>
<p>The last quotation mark is different than all the rest, simply replace it via the PowerShell ISE to get the right one and terminate the string correctly, so that the rest of the strings can be properly initiated and terminated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cathy</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/comment-page-1/#comment-531</link>
		<dc:creator>Cathy</dc:creator>
		<pubDate>Wed, 10 Nov 2010 16:43:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/logic-using-loops/#comment-531</guid>
		<description>I have copied and pasted the code for Processor Info but when I run it I am getting: 

The string starting:
At C:\!WORK\Powershell\ProcessorInfo.ps1:13 char:19 + write-host &quot;Name:   &lt;&lt;&lt;&lt; &quot;$objItem.Name is missing the terminator: &quot;.
At C:\!WORK\Powershell\ProcessorInfo.ps1:15 char:2 + }  &lt;&lt;&lt;&lt;
    +CategoryInfo    : ParserError: ( $objItem.Name write-host }:String) [], ParseException    +FullyQualifiedErrorID: TerminatorExpectedAtEndOfString

So I am a little lost?</description>
		<content:encoded><![CDATA[<p>I have copied and pasted the code for Processor Info but when I run it I am getting: </p>
<p>The string starting:<br />
At C:\!WORK\Powershell\ProcessorInfo.ps1:13 char:19 + write-host &#8220;Name:   &lt;&lt;&lt;&lt; &quot;$objItem.Name is missing the terminator: &quot;.<br />
At C:\!WORK\Powershell\ProcessorInfo.ps1:15 char:2 + }  &lt;&lt;&lt;&lt;<br />
    +CategoryInfo    : ParserError: ( $objItem.Name write-host }:String) [], ParseException    +FullyQualifiedErrorID: TerminatorExpectedAtEndOfString</p>
<p>So I am a little lost?</p>
]]></content:encoded>
	</item>
	<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>
</channel>
</rss>

