Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Question: Can you write to the pipeline w/ out writing to the console?

Reply
 
Old 01-31-2007   #1 (permalink)
Brandon Shell


 
 

Question: Can you write to the pipeline w/ out writing to the console?

I would like to control the output using write-host, but I do want return
server objects with properties?

--
Brandon Shell
---------------
Stop by my blog some time
http://www.bsonposh.com/
Try the "Search of Powershell Blogs"
--------------------------------------


My System SpecsSystem Spec
Old 02-01-2007   #2 (permalink)
RichS


 
 

RE: Question: Can you write to the pipeline w/ out writing to the cons

Does out-null do what you want?

Alternatively write to a file and display at the end of your script. Do you
have an example of what you are trying to acheive?
--
Richard Siddaway

Please note that all scripts are supplied "as is" and with no warranty


"Brandon Shell" wrote:

> I would like to control the output using write-host, but I do want return
> server objects with properties?
>
> --
> Brandon Shell
> ---------------
> Stop by my blog some time
> http://www.bsonposh.com/
> Try the "Search of Powershell Blogs"
> --------------------------------------
>
>

My System SpecsSystem Spec
Old 02-01-2007   #3 (permalink)
$hay


 
 

Re: Question: Can you write to the pipeline w/ out writing to the cons

Assign it to a variable. This way you can prevent the output

Then you can write-host






--
$hay
http://scriptolog.blogspot.com



"RichS" <RichS@discussions.microsoft.com> wrote in message
news:1DE7FF53-8AFD-42F4-ACF0-2B4EEFCF9701@microsoft.com...
> Does out-null do what you want?
>
> Alternatively write to a file and display at the end of your script. Do
> you
> have an example of what you are trying to acheive?
> --
> Richard Siddaway
>
> Please note that all scripts are supplied "as is" and with no warranty
>
>
> "Brandon Shell" wrote:
>
>> I would like to control the output using write-host, but I do want return
>> server objects with properties?
>>
>> --
>> Brandon Shell
>> ---------------
>> Stop by my blog some time
>> http://www.bsonposh.com/
>> Try the "Search of Powershell Blogs"
>> --------------------------------------
>>
>>



My System SpecsSystem Spec
Old 02-01-2007   #4 (permalink)
Brandon Shell


 
 

Re: Question: Can you write to the pipeline w/ out writing to the cons

That is what I ended up doing, but I was curious if there were other ways.

--
Brandon Shell
---------------
Stop by my blog some time
http://www.bsonposh.com/
Try the "Search of Powershell Blogs"
--------------------------------------
"$hay" <no@addre.ss> wrote in message
news:eJWcqCkRHHA.4404@TK2MSFTNGP03.phx.gbl...
> Assign it to a variable. This way you can prevent the output
>
> Then you can write-host
>
>
>
>
>
>
> --
> $hay
> http://scriptolog.blogspot.com
>
>
>
> "RichS" <RichS@discussions.microsoft.com> wrote in message
> news:1DE7FF53-8AFD-42F4-ACF0-2B4EEFCF9701@microsoft.com...
>> Does out-null do what you want?
>>
>> Alternatively write to a file and display at the end of your script. Do
>> you
>> have an example of what you are trying to acheive?
>> --
>> Richard Siddaway
>>
>> Please note that all scripts are supplied "as is" and with no warranty
>>
>>
>> "Brandon Shell" wrote:
>>
>>> I would like to control the output using write-host, but I do want
>>> return
>>> server objects with properties?
>>>
>>> --
>>> Brandon Shell
>>> ---------------
>>> Stop by my blog some time
>>> http://www.bsonposh.com/
>>> Try the "Search of Powershell Blogs"
>>> --------------------------------------
>>>
>>>

>
>


My System SpecsSystem Spec
Old 02-01-2007   #5 (permalink)
/\\/\\o\\/\\/ [MVP]


 
 

Re: Question: Can you write to the pipeline w/ out writing to the cons

a "trick" I use often :

PoSH> &{
>> "blabla"
>> write-host "console"
>> ls
>> } | out-null
>>

console

greetings /\/\o\/\/

"Brandon Shell" <tshell@mask.gmail.com> wrote in message
news:%23nesZEkRHHA.1200@TK2MSFTNGP02.phx.gbl...
> That is what I ended up doing, but I was curious if there were other ways.
>
> --
> Brandon Shell
> ---------------
> Stop by my blog some time
> http://www.bsonposh.com/
> Try the "Search of Powershell Blogs"
> --------------------------------------
> "$hay" <no@addre.ss> wrote in message
> news:eJWcqCkRHHA.4404@TK2MSFTNGP03.phx.gbl...
>> Assign it to a variable. This way you can prevent the output
>>
>> Then you can write-host
>>
>>
>>
>>
>>
>>
>> --
>> $hay
>> http://scriptolog.blogspot.com
>>
>>
>>
>> "RichS" <RichS@discussions.microsoft.com> wrote in message
>> news:1DE7FF53-8AFD-42F4-ACF0-2B4EEFCF9701@microsoft.com...
>>> Does out-null do what you want?
>>>
>>> Alternatively write to a file and display at the end of your script. Do
>>> you
>>> have an example of what you are trying to acheive?
>>> --
>>> Richard Siddaway
>>>
>>> Please note that all scripts are supplied "as is" and with no warranty
>>>
>>>
>>> "Brandon Shell" wrote:
>>>
>>>> I would like to control the output using write-host, but I do want
>>>> return
>>>> server objects with properties?
>>>>
>>>> --
>>>> Brandon Shell
>>>> ---------------
>>>> Stop by my blog some time
>>>> http://www.bsonposh.com/
>>>> Try the "Search of Powershell Blogs"
>>>> --------------------------------------
>>>>
>>>>

>>
>>

>


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
generel question about console in Windows Vista - very slow output PowerShell
Pipeline question PowerShell
Hosting Powershell in app -- Question about Pipeline PowerShell
Redirecting StdOutout and Writing StdInput fails to Powershell Console,... PowerShell
Question about writing windows apps that write to network drives under vista/uac Vista security


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46