Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

PowerShell gets VERY upset

Closed Thread
 
Thread Tools Display Modes
Old 12-20-2006   #1 (permalink)
Andrew Watt [MVP]
Guest


 

PowerShell gets VERY upset

Try this command:

get-process | select-object [a-z]*

PowerShell gets VERY upset with multiple error messages.

I'm unclear why it should.

Thoughts?

PowerShell seems to get even more upset with this:

get-process | select-object [a-z]* | more

I think it's only grouping all the error messages together.

But why don't these (arguably not very useful) commands "just work"?

Andrew Watt MVP
Old 12-20-2006   #2 (permalink)
Keith Hill [MVP]
Guest


 

Re: PowerShell gets VERY upset


"Andrew Watt [MVP]" <SVGDeveloper@aol.com> wrote in message
news:fvvio2dhdaviqovn96664o65bgq81ql1q9@4ax.com...
> Try this command:
>
> get-process | select-object [a-z]*
>
> PowerShell gets VERY upset with multiple error messages.


Certain properties can't be read until the process has exited like (ExitCode
and ExitTime). Also certain processes are protected system processes and
usually result in access denied errors when you try to read their
properties. You can filter those out like so:

?{$_.Name -notmatch "(^csrss$|^idle$)"}

--
Keith


Old 12-22-2006   #3 (permalink)
/\/\o\/\/ [MVP]
Guest


 

Re: PowerShell gets VERY upset

or you can just ignore the errors :

get-process | select-object [a-z]* -ea 'SilentlyContinue'

greetings /\/\o\/\/


"Keith Hill [MVP]" wrote:

>
> "Andrew Watt [MVP]" <SVGDeveloper@aol.com> wrote in message
> news:fvvio2dhdaviqovn96664o65bgq81ql1q9@4ax.com...
> > Try this command:
> >
> > get-process | select-object [a-z]*
> >
> > PowerShell gets VERY upset with multiple error messages.

>
> Certain properties can't be read until the process has exited like (ExitCode
> and ExitTime). Also certain processes are protected system processes and
> usually result in access denied errors when you try to read their
> properties. You can filter those out like so:
>
> ?{$_.Name -notmatch "(^csrss$|^idle$)"}
>
> --
> Keith
>
>
>

Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Password In Mail has me Baffled and Upset (HELP) Lost In West Virginia!!!!!! (HELP) Vista mail 6 10-29-2007 11:00 PM
PowerShell Leaders Join Forces and offer a pre-release version of PowerShell for 50% off the retail value klumsy@xtra.co.nz PowerShell 0 06-19-2007 02:42 PM
I'm really upset with Vista! TheDarkKnight Vista mail 7 02-21-2007 07:25 PM
Help My ISP is upset mjpsmith Vista mail 4 01-29-2007 07:12 PM
File Corruption - very upset ! Synapse Syndrome Vista General 16 11-24-2006 12:19 PM








Vistax64.com 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 2005-2008

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 47 48 49 50