Try using Io.FIle class and method WriteAllText.
For example:
[io.file]::WriteAllText(“c:\test.txt”,”test”)
You’ll want [IO.File]::AppendAllText and not WriteAllText since that will override the existing file.

By admin

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.