Powershell - How to lookup/retrieve records from a text/csv file.
I have an Exchange 2003/2007 environment. I build a csv file from 2007, and another csv file with 3 columns from a wmi query for 2003 mailbox info. The files have the the displayname/mailboxdisplayname in common. I need to walk the 2007 file, find the corresponding mailboxdisplayname in the 2003, and write those records to a third file. I've tried select-string, where-object, with and without foreach. I either select no records, or all records, but have not found that syntax.to select matching records. I can get matches when i test with literals. I'm using csv files instead text because undelimited files appear have their columns padded. So, my question is... What is the powershell syntax to: 1. read the records from a file with a single column, 2. find a matching value in one of three columns in another file.3. retrieve all three values from the second file.TIA.
May 28th, 2008 10:16pm

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

Other recent topics Other recent topics