get-service and get-process in one file

Hi

I need help in getting the process and service information in one file.

i tried using get-service;get-process, the output format got changed.

Can anyone help??

The below creates output in a different file,

get-process | select-object ProcessName | export-csv -path data.csv get-service | select-object Status, DisplayName | export-csv -path service.csv

August 30th, 2015 3:45pm

The following will help to explain why you cannot do that:

https://technet.microsoft.com/library/hh857337.aspx

Free Windows Admin Tool Kit Click here and download it now
August 30th, 2015 6:15pm

Maybe:

Add-Content -Value (get-service | Select-Object Status,DisplayName | Out-String) -Path c:\temp\test1.txt
Add-Content -Value (get-process | Select-Object ProcessName | Out-String) -Path c:\temp\test1.txt

August 31st, 2015 9:20am

Try

get-service >output.txt; get-process >>output.txt

or with my favorite parameters to avoid data truncation

get-service|ft -auto -wrap >output.txt; get-process|ft -auto -wrap >>output.txt

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 7:18pm

Try

get-service >output.txt; get-process >>output.txt

or with my favorite parameters to avoid data truncation

get-service|ft -auto -wrap >output.txt; get-process|ft -auto -wrap >>output.txt

August 31st, 2015 11:14pm

Try

get-service >output.txt; get-process >>output.txt

or with my favorite parameters to avoid data truncation

get-service|ft -auto -wrap >output.txt; get-process|ft -auto -wrap >>output.txt

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 11:14pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics