Powershell Tutorial Online


Using Add-Content cmdlet you can append data to a text/html file.

     Add-Content c:\test\test.txt "Footer"


     Add-Content c:\test\index.html "Footer"


     Add-Content c:\test\index.html "`nFooter"
I observed in my carrer that most of the people struggle to play with special characters and escape sequence as it is differnet for each language like new line characters. So here are the special characters used in Windows PowerShell output

        `0 -- Null
        `a -- Alert
        `b -- Backspace
        `n -- New line
        `r -- Carriage return
        `t -- Horizontal tab
        `' -- Single quote
        `" -- Double quote


     Add-Content c:\test\index.html "`nFooter"

you can find more details at Powershell language special characters

Powershell Tutorial is optimized for learning technology step by step. Examples might be simplified to improve reading and basic understanding. While using this site, you agree to have read and accepted our terms of use and privacy policy.
Send your suggestions or feedback to
Copyright © 2014 by Powershell Tutorial. All Rights Reserved.