Hi folks. I have the code below that is correctly importing applications installed on machines and creating a new unique file for each machine with all of it’s listed installed applications (100s of files). I would like to import all the data into 1 single CSV file, instead of hundreds of individual files. Is there a way where i can import the data, so that 1 column will list the machine hostname (on the left), and to the right there will be another column that lists all the applications relevant to the specific hostname on the left column? Thanks much for your assistance
Appreciate your reply, but that does not resolve the problem. The last line is set to create a new CSV file, since the var is $node.csv (foreach loop). -Append won’t get what i need. Thanks for your input though.
Create an array to save all of results to. In this instance, I used $data. Each time your foreach loop iterates, it’ll save the results to $data. At the end, you can manipulate $data however you see fit. I added 2 examples.
Thanks Olaf for bringing that up. I’m a bit confused then, what other cmdlet would be needed to pull 64-bit applications? I included a link below from MSFT below, which shows them using the ‘Wow6432Node’ registry key. Should i point elsewhere as well? Thank you.
You could have piped the foreach to export-csv, but the bugaboo in powershell is you have to use the other version of foreach since you can’t pipe from powershell statements: