In reply to PippaRade.

Pippa, The technique is similar to the example here, except that you need to open the stream for writing, not reading:

$StreamOpenModeForWriting = 2
$objStream = $objFile.OpenBinaryStream($StreamOpenModeForWriting)

Then of course you'll have to reverse all of the stream copy activity so that the SAS fileref is the destination, rather than the source.