<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Suppressing return values in PowerShell functions</title><link>http://blogs.msdn.com/powershell/archive/2006/07/31/Suppressing-return-values-in-PowerShell-functions.aspx</link><description>PSMDTAG:FAQ: How do I supress return values in PowerShell functions? This was asked in a newgroup with the clarification: What I mean is: When you call a function Foo that returns a bool, PS will write 'True' or 'False' to the screenby default. Is there</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Suppressing return values in PowerShell functions</title><link>http://blogs.msdn.com/powershell/archive/2006/07/31/Suppressing-return-values-in-PowerShell-functions.aspx#684589</link><pubDate>Tue, 01 Aug 2006 02:05:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:684589</guid><dc:creator>dontBotherMeWithSpam</dc:creator><description>Another method to suppress output of return value.&lt;br&gt;# You can also rewrite &amp;quot;test | out-null&amp;quot; as &amp;quot;test &amp;gt; $null&amp;quot;&lt;br&gt;&lt;br&gt;[^_^]PS[5]&amp;gt;function test { return $true }&lt;br&gt;[^_^]PS[6]&amp;gt;test &amp;gt; $null&lt;br&gt;</description></item><item><title>Two Windows PowerShell blog posts today...</title><link>http://blogs.msdn.com/powershell/archive/2006/07/31/Suppressing-return-values-in-PowerShell-functions.aspx#684681</link><pubDate>Tue, 01 Aug 2006 03:44:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:684681</guid><dc:creator>Rod Trent at myITforum.com</dc:creator><description>Why do I sometimes get different types?&lt;br&gt;Suppressing return values in PowerShell functions</description></item><item><title>Interesting Finds: July 31, 2006</title><link>http://blogs.msdn.com/powershell/archive/2006/07/31/Suppressing-return-values-in-PowerShell-functions.aspx#684775</link><pubDate>Tue, 01 Aug 2006 06:04:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:684775</guid><dc:creator>Jason Haley</dc:creator><description /></item><item><title>re: Suppressing return values in PowerShell functions</title><link>http://blogs.msdn.com/powershell/archive/2006/07/31/Suppressing-return-values-in-PowerShell-functions.aspx#685323</link><pubDate>Tue, 01 Aug 2006 18:23:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:685323</guid><dc:creator>C-J Berg</dc:creator><description>Hi!&lt;br&gt;&lt;br&gt;Why does Write-Output print an additional empty line when you use two consecutive &amp;quot;`n&amp;quot; in a string? And why doesn't Write-Host do that? See the examples below.&lt;br&gt;&lt;br&gt;PS&amp;gt; Write-Output &amp;quot;abc`nABC`nabc&amp;quot;&lt;br&gt;abc&lt;br&gt;ABC&lt;br&gt;abc&lt;br&gt;PS&amp;gt; Write-Output &amp;quot;abc`nABC`n`nabc&amp;quot;&lt;br&gt;abc&lt;br&gt;ABC&lt;br&gt;&lt;br&gt;&lt;br&gt;abc&lt;br&gt;PS&amp;gt; Write-Host &amp;quot;abc`nABC`nabc&amp;quot;&lt;br&gt;abc&lt;br&gt;ABC&lt;br&gt;abc&lt;br&gt;PS&amp;gt; Write-Host &amp;quot;abc`nABC`n`nabc&amp;quot;&lt;br&gt;abc&lt;br&gt;ABC&lt;br&gt;&lt;br&gt;abc&lt;br&gt;PS&amp;gt;&lt;br&gt;&lt;br&gt;Great blog, by the way. Cheers!</description></item><item><title>re: Suppressing return values in PowerShell functions</title><link>http://blogs.msdn.com/powershell/archive/2006/07/31/Suppressing-return-values-in-PowerShell-functions.aspx#699821</link><pubDate>Mon, 14 Aug 2006 20:25:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:699821</guid><dc:creator>Lee</dc:creator><description>Hi C-J,&lt;br&gt;&lt;br&gt;This is a known issue.&lt;br&gt;&lt;br&gt;Lee</description></item><item><title>re: Suppressing return values in PowerShell functions</title><link>http://blogs.msdn.com/powershell/archive/2006/07/31/Suppressing-return-values-in-PowerShell-functions.aspx#9044272</link><pubDate>Wed, 05 Nov 2008 16:59:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9044272</guid><dc:creator>Chris Allen</dc:creator><description>&lt;p&gt;Is it possible to suppress just the warning messages that pop on the screen during a command? For instance, if I do the following:&lt;/p&gt;
&lt;p&gt;Get-mailpublicfolder -resultsize unlimited -erroraction silentlycontinue | ft Alias, PrimarySMTPAddress&lt;/p&gt;
&lt;p&gt;I get several hundred warning mixed in with the output I am looking for. These warnings are from exchange 2003 objects that need some tidying up to be fully 2007 compliant (like leading spaces in alias names and such). I would like to be able to output just the filtered results to the screen and not display the warnings. Is this possible?&lt;/p&gt;</description></item></channel></rss>