PowerShell Export & Out-File

  • The EXPORT-CSV allows you to export results into a CSV file

  • The -NoTypeInformation removes some unneeded text from the beginning of the output

  • The -Append allows one to append to a file

  • The Invoke-Item opens the file

   Get-Service | Select * | Export-Csv C:\temp\Services.csv -Append -NoTypeInformation
        
   Invoke-Item C:\temp\Services.csv 

Get-Service | Select Name, Status | Out-File C:\temp\MyText.txt

 

invoke-item C:\Temp\MyText.txt
 

2020 | Scott W. Head  |  Sr. Systems Admin | Certified Microsoft Windows Server Administrator