Re: [PS] Ignoring host formatting

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



Another option is:

gps | ft * -auto | out-file -width 9999 file.txt

--
Lee Holmes [MSFT]
Windows PowerShell Development
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.


"Andrew Watt [MVP]" <SVGDeveloper@xxxxxxx> wrote in message
news:bt4r625s8n6efovgcsoevj6ajggm5990pt@xxxxxxxxxx
Dave,

I think the fundamental question is *where* you want to see all the
information in a nice format. And why. And what you intend to do with
it.

Do you want to output to screen in the end? Or to paper?

With the number of properties that your command will produce it's
going to be tough. But even using Yuksel's command you may hit
limitations in the output.

Opening File.txt in Notepad will, depending on whether or not word
wrap is on, produce horrible layout or two overlapping rows in order
to display the table.

On paper? You will need very wide paper. Or have a tiny (unreadable?)
font.

Another approach, which will allow you to continue to work with the
data is as follows:

get-process | export-clixml File.xml

Then you can use

$processes = import-clixml File.xml

to retrieve the data in a format you can work with.

Then you can select what you want, e.g.

$processes | format-table Processname, Handlecount

and so on.

Andrew Watt MVP

On Thu, 18 May 2006 19:26:17 +0100, "Dave"
<dave.brannan@xxxxxxxxxxxxxxxx> wrote:

If I want to get all the information from a command in a nice format
regardless of the number of columns available, how can I do it?

For example if I do:

[PS] gps | ft *

All the information columns get trucated into extremely small columns. So
if
I do:

[PS] gps | ft * -auto

Does what I want except it tells me xx amount of columns were removed.
Fair
enough, so I then want to output this to a file and not have PS worry
about
truncating columns in the host, except using:

[PS] gps | ft * -auto > File.txt

Produces the same output and the extra columns are removed.

Is there an easy way to export all the information available from a
cmdlet/pipeline into single rows?

Thanks,
Dave.


.



Relevant Pages

  • Re: [PS] Ignoring host formatting
    ... With the number of properties that your command will produce it's ... Opening File.txt in Notepad will, depending on whether or not word ... produce horrible layout or two overlapping rows in order ... to retrieve the data in a format you can work with. ...
    (microsoft.public.windows.server.scripting)
  • Re: [PS] Ignoring host formatting
    ... If you save in a format that PowerShell can later handle as objects ... With the number of properties that your command will produce it's ... Opening File.txt in Notepad will, depending on whether or not word ... produce horrible layout or two overlapping rows in order ...
    (microsoft.public.windows.server.scripting)
  • Re: [PS] Ignoring host formatting
    ... And what you intend to do with ... With the number of properties that your command will produce it's ... produce horrible layout or two overlapping rows in order ... to retrieve the data in a format you can work with. ...
    (microsoft.public.windows.server.scripting)
  • Re: Where does fmtutil get its inputs?
    ... Here I first look into fmtutil.cnf to see that the 'latex' format ... uses the pdfetex engine. ... the command - thanks. ... been able to work out what texconfig does exactly, ...
    (comp.text.tex)
  • when section heading at top of page, top margin wrong!
    ... For a thesis, my university requires a top margin of 1" throughout, ... % and format the table of contents. ... \doublespacing % command from setspace package to invoke double ... reduce vertical space by 7pt. ...
    (comp.text.tex)