Avatar of Mike
Mike
Flag for United States of America asked on

Need Help Modifing a PowerShell Script

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

PowershellScripting LanguagesVB Script

Avatar of undefined
Last Comment
Mike

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Qlemo

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Mike

ASKER
OK.... Is there away to covert the the script so I am able to use the data in a .csv file
Qlemo

No, for the reasons I stated above.
Mike

ASKER
well... I gess the .txt format will do... thanks for your help
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy