Link to home
Start Free TrialLog in
Avatar of Carmine Bruno
Carmine Bruno

asked on

Powershell Scripting Issue with CSV file data

DRPing.csv
PingStatus.csv
Powershell script to get a column from a CSV and append\add it as 7th column to and existing CSV with 6 existing columns
Specific Get Status Colum from PingStatus.csv and Add it to DRPing.csv. Even if we have to Import both and Export all the objects to a new csv. Whatever works
Avatar of aikimark
aikimark
Flag of United States of America image

I would be helpful if you posted representative samples of the input and output files
Avatar of Carmine Bruno
Carmine Bruno

ASKER

I uploaded and embedded with question  I will Re attach here
DRPing.csv
PingStatus.csv
Sorry.  I missed it.  Usually the attachment links follow the question text.
append\add it as 7th column
DRPing.csv has these eight columns:
Host,EndUser,Department,Transit,TypeName,SerialStatic,Location,StatusName

Open in new window


I see the Status column and assume the host values are used to join the two tables.  Correct?
Adding Status and its results to the end of the DRPing.csv as a new column would be sufficient. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Will test it Out Thank Yopu so much !!!!
Worked perfectly. Lined up with Host. Nice Job !!!
Wonderful Powershell Script to Merge and Append CSV using a mutual column as a Joining point.
I was playing with the data and discovered that you have duplicate host values in both the DRPing and the PingStatus files.  This can cause erroneous output, since there isn't a way to differentiate which records should be matched (with absolute certainty).