PowerTip: Use PowerShell to Add Content to File Stream

Doctor Scripto

Summary: Use Windows PowerShell to add content to the file system stream of a file.

Hey, Scripting Guy! Question How can I use Windows PowerShell to add data to an alternate NTFS file system stream of a file?

Hey, Scripting Guy! Answer Use the Add-Content cmdlet and specify the name of the stream for the Stream parameter,
           then specify the data in the –Value parameter, for example:

Add-Content C:\fso\AnEmptyFile.txt -Stream Data -Value "datastream"

Note  If the stream does not exist, Windows PowerShell creates it. 


Discussion is closed.

Feedback usabilla icon