This Video Discusses about How to Append contents to a File in PowerShell and How to redirect contents to a file and down the pipeline at the same time
In This Video You will learn many things about File Management like -
------------ How to Append contents to a File Using redirection
------------ How to Send Output of a Command to a File and Down the Pipeline simultaneously
------------ Append Contents to a File Using Redirection Operators
------------ How to send output of a file using Out-File command
----------------------------------------------------------------------------------------------------------------------------------
Commands and Code that has been used in this Video is mentioned here -
----------------------------------------------------------------------------------------------------------------------------------
Prepare demo Environment
Set-Location "D:\PSTraining\PracticeGround" # Setting My Working Location, Create this folder, Incase not exist Already
############################
Running our Examples
############################
1 Executing a simple command and seeing its output
Ping fakehost
2 Send Command Output/Stream to file using Out-File Cmdlet
Ping fakehost|Out-File .\outfile.txt
3 Send Command output/Stream to file and and also pipeline output to following command or Console
Ping fakehost|Tee-Object .\teeout.txt # Send output to a file and also to console
gci .|Tee-Object .\filelist_CurrentFolder.txt|Measure-Object # Send output to a file and also to console
************************************************************************
************************************************************************
Join Me on --
Facebook Group
/ mylearningsonline
Facebook Page
/ mylearningsonline
YouTube Channel
/ mylearningsonline
**************************************************************************
#PowerShell #PowerShellScripting #PowerShellForBeginners #learnPowerShell #PowerShelltraining #PowerShellTutorial #MyLearningsOnline #WindowsPowerShell
PowerShell Scripting for Beginners
PowerShell Tutorial for Beginners
PowerShell Full Course
PowerShell Training for Beginners