Alternate Data Streams

echo "text" > <file>:<StreamName>

Create/overwrite ADS

Set-Content <file> -Value "text" -Stream <StreamName>

Create/overwrite ADS

echo "text" >> <file>:<StreamName>

Append data to ADS

Add-Content <file> -Value "text" -Stream <StreamName>

Append data to ADS

echo "text" >> <file>:<StreamName> "more stuff"

Append "text more stuff" to the stream (note the space)

Clear-Content -Path <Path\FileName> -Stream <StreamName>

Clear ADS

You can add more than one stream to a file.

Last updated

Was this helpful?