Skip to content

Instantly share code, notes, and snippets.

@MauRiEEZZZ
Last active October 12, 2019 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MauRiEEZZZ/207ba397df40ea9a1c57eb4a01c7e12f to your computer and use it in GitHub Desktop.
Save MauRiEEZZZ/207ba397df40ea9a1c57eb4a01c7e12f to your computer and use it in GitHub Desktop.
Read the file into memory
$fileAsByteArray = [System.IO.File]::ReadAllBytes($FilePath);
$Base64String = [System.Convert]::ToBase64String($fileAsByteArray);
$Base64String | Out-File '.\a file'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment