Skip to content

Instantly share code, notes, and snippets.

@rikwatson
Created April 1, 2019 07:15
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 rikwatson/2d47a6ea79a269edc677702135f9447d to your computer and use it in GitHub Desktop.
Save rikwatson/2d47a6ea79a269edc677702135f9447d to your computer and use it in GitHub Desktop.
Base64 decoding
#requires -version 2.0
#
# Convert `01.pdf.base64` to `01.pdf`
#
$file = "C:\Users\richard.watson\Desktop\01.pdf.base64"
$data = Get-Content $file
[System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($data)) | Out-File "C:\Users\richard.watson\Desktop\01.pdf"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment