I need to update an existing CSV file by pulling some information on computers and adding that info to the csv file. This script will run on thousands of computers and each computer adds its info to the file. I’m testing on 3 only for now.
So far, everything works fine except a detail that I do not know how to fix: for each line that my script adds to the file, the column titles are repeated. which gives something like:
Without seeing your code we could only take a vague guess what’s wrong in your code. So you will have to show it here. You can edit your initial post and add the code - formatted as code please.
I think you are doing string building to create a csv file, this will be very simple in PowerShell way. But like @olaf-soyk mentioned, without seeing your code it’s very difficult to help. If original code sharing is not possible, you can share a sample code which is similar to you actual code.
[quote quote=146213]I think you are doing string building to create a csv file, this will be very simple in PowerShell way. But like @olaf-soyk mentioned, without seeing your code it’s very difficult to help. If original code sharing is not possible, you can share a sample code which is similar to you actual code.
[/quote]
you gave me the hint I needed, it now works as I want. I managed the data as a string and it now correctly reports to the csv file.