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 - Get additional information from format-list cmdlet

Reply
 
Old 10-23-2006   #1 (permalink)
HermesNL


 
 

Get additional information from format-list cmdlet

When I execute the following command:

get-process msnmsgr | format-list modules

I get the following result:

Modules : {msnmsgr.exe, ntdll.dll, kernel32.dll, ADVAPI32.dll...}

At the end it displays "..." which means there is more, but PS will not
display it. Is there a command that will show the additional modules? I
would like to see the complete list.

My System SpecsSystem Spec
Old 10-23-2006   #2 (permalink)
dreeschkind


 
 

RE: Get additional information from format-list cmdlet

Try these:

get-process msnmsgr | foreach {$_.modules}
get-process msnmsgr | foreach {$_.modules} | format-list

# using alias:
gps msnmsgr | % {$_.modules} | fl

--
greetings
dreeschkind

"HermesNL" wrote:

> When I execute the following command:
>
> get-process msnmsgr | format-list modules
>
> I get the following result:
>
> Modules : {msnmsgr.exe, ntdll.dll, kernel32.dll, ADVAPI32.dll...}
>
> At the end it displays "..." which means there is more, but PS will not
> display it. Is there a command that will show the additional modules? I
> would like to see the complete list.

My System SpecsSystem Spec
Old 10-23-2006   #3 (permalink)
Sung M Kim


 
 

Re: Get additional information from format-list cmdlet


HermesNL wrote:
> When I execute the following command:
>
> get-process msnmsgr | format-list modules
>
> I get the following result:
>
> Modules : {msnmsgr.exe, ntdll.dll, kernel32.dll, ADVAPI32.dll...}
>
> At the end it displays "..." which means there is more, but PS will not
> display it. Is there a command that will show the additional modules? I
> would like to see the complete list.


You can EXPAND the module information through "select-object" cmdlet
using "-ExpandProperty" parameter

get-process msnmsgr | select-object -expand modules

My System SpecsSystem Spec
Old 10-24-2006   #4 (permalink)
Jacques Barathon [MS]


 
 

Re: Get additional information from format-list cmdlet

"Sung M Kim" <DontBotherMeWithSpam@gmail.com> wrote in message
> You can EXPAND the module information through "select-object" cmdlet
> using "-ExpandProperty" parameter
>
> get-process msnmsgr | select-object -expand modules


Or alternatively:

(get-process msnmsgr).modules

Jacques
My System SpecsSystem Spec
Old 10-24-2006   #5 (permalink)
Roman Kuzmin


 
 

Re: Get additional information from format-list cmdlet

You may also change $FormatEnumerationLimit variable which "Dictates the
limit of enumeration on formatting IEnumerable objects."

The default value is 4; we get no more than 4 items:

PS> get-process explorer | format-list modules
Modules : {Explorer.EXE, ntdll.dll, kernel32.dll, msvcrt.dll...}

In my profile I set: $FormatEnumerationLimit = 100. Thus:

PS> get-process explorer | format-list modules
Modules : {Explorer.EXE, ntdll.dll, kernel32.dll, msvcrt.dll, ADVAPI32.dll,
RPCRT4.dll, GDI32.dll, USER32.dll, SHLWAPI.dll, SHELL32.dll, ole32.dll,
OLEAUT32, <the rest of 100 items>, ...}

Actually 100 is not enough in this particular case, so I just set some
enormously large number temporarily to list all items.

--
Thanks,
Roman


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
-f format Format-Table Format-List against Select PowerShell
ADDITIONAL INFORMATION TO ERROR MESSAGE...see below Vista mail
Additional Logon Information Required? Vista networking & sharing
How to get a list of PropertyName from the format-list cmdlet? PowerShell
What's the correct way do design an Exif image information cmdlet? PowerShell


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