Skip to content

Instantly share code, notes, and snippets.

View jmvermeulen's full-sized avatar

jmvermeulen

  • Europe
View GitHub Profile
@jmvermeulen
jmvermeulen / PSFileTransferByClipboard.ps1
Created November 17, 2020 18:37 — forked from ethzero/PSFileTransferByClipboard.ps1
Transferring binary content by way of clipboard via Powershell
## Powershell method of transfering small (< 1 MB) binary files via Clipboard
##
## NB: Unwise to attempt to encode binary files exceeding 1 MB due to excessive memory consumption
## Powershell 5.0>
# On the transmission end:
$Content = Get-Content -Encoding Byte -Path binaryfile.xxx
[System.Convert]::ToBase64String($Content) | Set-Clipboard
# On the receiving end