We help IT Professionals succeed at work.
Get Started

Need Help Modifing a PowerShell Script

198 Views
Last Modified: 2015-06-08
Greeting Experts,
I hope somebody out there can give me and hand with this script. Currently the script below works as is with no problem.  It creates 5 different .csv files for each of its assigned processes…. What I need to do know is combine all 5 of the .csv files in to one… but I not for sure on how to do that. Can somebody give me hand in this step…..? I just not sure how to combine them together….

Push-location $env:temp
Get-Process | Export-Csv "c:\PSscripts\Processes.csv"
Get-Service | ? {$_.status -eq "running"} | Export-Csv "c:\PSscripts\ActiveServices.csv"
Get-WmiObject -Class Win32_operatingsystem | Select -Property * | Export-Csv "c:\PSscripts\OSInfo.csv" 
"10.20.0.92", "10.20.3.10", "10.20.0.80", "10.40.4.10" | % {  pathping -n -p 10 $_} | Out-File "c:\PSscripts\InternalPing.csv"
"www.yahoo.com", "www.bing.com", "google.com", "www.hubbell.com" | % {  pathping -n -p 10 $_}  | Out-File "c:\PSscripts\ExternalPing.csv"

Open in new window

Comment
Watch Question
"Batchelor", Developer and EE Topic Advisor
CERTIFIED EXPERT
Top Expert 2015
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE