Powershell script for Base64 Encode

This small powershell script creates an Base64 encode of the username and, or password.

# Base64 encode the username "myusername"
$userBytes = [System.Text.Encoding]::UTF8.GetBytes("myusername@012345"); [System.Convert]::ToBase64String($userBytes)

# Base64 encode the password "mypassword"
$userBytes = [System.Text.Encoding]::UTF8.GetBytes("mypassword"); [System.Convert]::ToBase64String($userBytes)

# Base64 encode the myusername & mypassword into one line.
$auth = [System.Text.Encoding]::UTF8.GetBytes("myusername@012345:mypassword"); [System.Convert]::ToBase64String($auth)