Base64 decode in powershell

In this article let’s discuss about Base64 decode in powershell. Let’s go through the following methods without any delay.

Method 1:

---decode
$input = “vikivikivikivikivikivyapvyapvyapvyapvyapnandnandnandnandnandviki”
$output = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($input))
$output

--encode
$input = ‘text to be encoded’
$By = [System.Text.Encoding]::Unicode.GetBytes($input)
$output =[Convert]::ToBase64String($By)
$output

Hope the above solution works.

Realted Posts : How to clean local branches git