Having trouble with what should be a simple task in powershell. I just want to be able to have one statement output to column A and the next statement output to column B. So far my code just puts both in one column, and I’m not sure this is even the right way to go about it:<\/p>\n
So, first column should contain $computer, and second column should contain the last line of the results.log file.<\/p>\n
Any help is greatly appreciated.<\/p>","upvoteCount":7,"answerCount":9,"datePublished":"2019-08-14T12:55:49.000Z","author":{"@type":"Person","name":"spiceuser-im217","url":"https://community.spiceworks.com/u/spiceuser-im217"},"suggestedAnswer":[{"@type":"Answer","text":"
Having trouble with what should be a simple task in powershell. I just want to be able to have one statement output to column A and the next statement output to column B. So far my code just puts both in one column, and I’m not sure this is even the right way to go about it:<\/p>\n
So, first column should contain $computer, and second column should contain the last line of the results.log file.<\/p>\n
Any help is greatly appreciated.<\/p>","upvoteCount":7,"datePublished":"2019-08-14T12:55:49.000Z","url":"https://community.spiceworks.com/t/powershell-output-to-columns-in-csv/725531/1","author":{"@type":"Person","name":"spiceuser-im217","url":"https://community.spiceworks.com/u/spiceuser-im217"}},{"@type":"Answer","text":"
If you post code, please use the ‘Insert Code’ button. Please and thank you!<\/p>\n