Skip to content

Instantly share code, notes, and snippets.

@dmusicant-dk
Created January 21, 2021 17:48
Show Gist options
  • Save dmusicant-dk/c79a383d78e241f79d783b02b3c8a7b8 to your computer and use it in GitHub Desktop.
Save dmusicant-dk/c79a383d78e241f79d783b02b3c8a7b8 to your computer and use it in GitHub Desktop.
Bse64 Encode Username/Password with Powershell
# Base64 encode the username "root"
$userBytes = [System.Text.Encoding]::UTF8.GetBytes("root"); [System.Convert]::ToBase64String($userBytes)
# Base64 encode the password "dbpassword1"
$userBytes = [System.Text.Encoding]::UTF8.GetBytes("dbpassword1"); [System.Convert]::ToBase64String($userBytes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment