[ Home ] [ Tech Tips ] [ Raspberry Pi ] [ Powershell ] [ Ubuntu ] [ Django ] [ About ]
PowerShell | Base64 encoding / decoding

PowerShell | Base64 encoding / decoding

How handy is to encode stuff?

Very for some people and sometimes it’s just for fun Feel free to read up more on Base64 https://en.wikipedia.org/wiki/Base64

Lets fire up the sHeLl!    

# Convert to Bas64

$text = 'Morning All'

$b = [System.Text.Encoding]::UTF8.GetBytes($text)

$output = [System.Convert]::ToBase64String($b)

$output

 

# Convert from Base64

$ConvertFrom = $output

# $ConvertFrom = ''

$c = [System.Convert]::FromBase64String($ConvertFrom)

[System.Text.Encoding]::UTF8.GetString($c)

 

And it’s that simple, super fun happy time


Luke Keam
Thank you for reading. Any questions, comments or suggestions email me [email protected]
Luke Keam
techgeek.biz

FOLLOW US

Name
Email:

AD