There’s one particular command that allows you output anything from shell to file, find that command and use with any commands like Get-Service or Get-Process. Does it behave differently than Export-CSV?
Programs often use CSV but don’t use comma for delimiter – try to exporting to CSV but change the delimiter
Can you print directly from shell? See if there are any commands available and if so, print some Event Logs!
# Connects multiple commands into one# Output from former command is sent to latter#Some examples we've been using so farGet-Serviceget-servicewuauserv,bits|Stop-ServiceGet-Serviceget-servicewuauserv,bits|Start-ServiceGet-Servicenotepadget-process-namenotepad|Stop-ProcessGet-EventLog-LogNameApplication-Newest10-EntryTypeError|Export-Csv-Path.\eventlogs.csv.\eventlogs.csv# You might have noticed there's more information in CSV than in the output screen, that's by design.# Outputting to shell often has special formatting to limit the amount of output due to better redabilityGet-ServiceGet-Service|FT *#FT is an alias for Format-Table. We will talk about aliases and formatting output later on in the course, however when convenient I'll let you know the alias know# Why pipeline works? It's because it's an object# We have properties and methodsGet-ServiceGet-Service|GM #GM Stands for Get-Member# Show that both commands use the same service typeHelpGet-Service-fullHelpStop-Service-full# Pipeline is not only limited to matching by type, it will try match property names, types etc.#Reading filesGet-Content.\eventlogs.csvImport-Csv.\eventlogs.csv