• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Need some help locating the info for formatting output from Powershell

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

notarat

Member
Joined
Nov 11, 2010
I can generally muddle my way through PowerShell but I've run up against a problem for which I can't seem to find an answer.

I have a PowerShell script that pulls a list of computers and the applications to which they are mapped.

Computer1,App1,App2,App3,App4,App5 (can be up to 150 applications)
Computer2,App2,App4
Computer3,App1,App3,App5
(can be 8000+ computers)

The person I supply the information to doesn't want the information in that format...

So...I'm forced to change my script to output the data into a CSV file containing only 2 columns. Column A lists the computer name and Column B lists each application assigned to that computer (like the following example)

Computer1,App1
Computer1,App2
Computer1,App3
Computer1,App4
Computer1,App5
Computer2,App2
Computer2,App4
Computer3,App1
Computer3,App3
Computer3,App5
(can be 40,000+ rows)

I can't seem to find info in any of my normal powershell forums that would allow me to format the data in this way.

Can I get some help?