Combining multiple commands to an appending output. RRS feed

  • Question

  • Hello all,

    I am somewhat new to PowerShell and only use it to grab some details from time to time. I have been trying to put something together to grab information in a local device log for reference hoping it to be beneficial for me. I have basically 4 commands I would like to add as a login script to run at login and append information into a cvs file on the local C:\temp drive. The commands are as follows:

    gwmi win32_bios

    (Get-WmiObject -Class:Win32_ComputerSystem) .Model

    Get-Date -Format g

    Get-WmiObject -ComputerName . -Class Win32_ComputerSystem | Select Username

    Is there an easy way to do this?  I have been able to get it to work one command at a time, and piping them doesn't seem to work..  So as I work my way through this I thought I would throw it out here for any advice.

    Thanks TJ


    • Moved by Bill_Stewart Monday, April 30, 2018 9:33 PM This is not "teach me PowerShell basics step-by-step" forum
    Tuesday, February 27, 2018 3:13 PM

All replies