Re: Newbie Q: How to suppress return value printing in PowerShell

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



This should answer your question:
http://blogs.msdn.com/powershell/archive/2006/07/31/Suppressing_return_values_in_PowerShell_functions.aspx


--
Jeffrey Snover [MSFT]
Windows PowerShell/Aspen Architect
Microsoft Corporation
This posting is provided "AS IS" with no warranties, no confers rights.
Visit the Windows PowerShell Team blog at:
http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at:
http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

<hwiechers@xxxxxxxxx> wrote in message
news:1154362967.405744.59360@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Is there anyway to suppress printing return values in PowerShell?

What I mean is:
When you call a function Foo that returns a bool, PS will write 'True'
or 'False' to the screen
by default. Is there anyway to get it to stop writing those return
values?



.



Relevant Pages

  • Windows PowerShell and the "PowerShell Worm"
    ... Leonard Chung has a good posting detailing the issue and Windows PowerShell ... Jeffrey Snover [MSFT] ... Windows PowerShell/Aspen Architect ...
    (microsoft.public.windows.server.scripting)
  • Re: Class in PowerShell?
    ... It is possible to create things behave like classes with V1.0. ... This posting is provided "AS IS" with no warranties, no confers rights. ... Visit the Windows PowerShell ScriptCenter at: ...
    (microsoft.public.windows.server.scripting)
  • Re: Windows PowerShell: Removal failed
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... Windows PowerShell: Removal failed ...
    (microsoft.public.windows.terminal_services)
  • Re: powershell and tail -f
    ... This posting is provided "AS IS" with no warranties, no confers rights. ... Visit the Windows PowerShell ScriptCenter at: ...
    (microsoft.public.windows.server.scripting)
  • Re: Powershell performance
    ... Running ngen on these files will report errors. ... Windows PowerShell Technical Lead ... This posting is provided "AS IS" with no warranties, ... The installation uses the following command to ngen: ...
    (microsoft.public.windows.server.scripting)