November 2018
Intermediate to advanced
566 pages
17h 15m
English
Those comfortable with Bash use the > for sending the output to a file, and >> to append the output to an existing file. In PowerShell, we use the Out-File cmdlet. We run a command that sends output to the standard output and, through the pipe, redirects the output to Out-File, which handles writing the output to a file. Usually, Out-File is used to send content to a text file.
When there is a need to append the content to a file, we use the -Append switch with Out-File. This way, if the file that is being written to already contains content, the content isn't overwritten (overwriting content is the default behavior of Out-File).
Read now
Unlock full access