Day 6 of learning PowerShell
On day 6 of my PowerShell learning journey, I learned about the pipeline and how to use it with multiple commands. Below are some of my takeaway notes. Feel free to use them at your leisure.
My notes
Create two similar, but different, text files. Try comparing them by using Diff.
What happens if you run Get-Service | Export-CSV services.csv | Out-File? Will return with error since there is not path for Out-File, plus Export-CSV already created services.csv file.
What other means does Stop-Service provide for you to specify the service or services you want to stop?
What if you want to create a pipe-delimited file insta of a comma-seperated (CSV) file?
Is there a way to eliminate the # comment line from the top on a exported CSV file?
What parameter would prevent them from overwriting an existing file? What parameter would ask whether you were sure before proceedig to write the output file?
How can you tell Export-CSV to us the system’s default separator rather than a comma?