Decode Windows Autounattend.xml password using PowerShell

Decode Windows Autounattend.xml password using PowerShell

Recently I needed to recover the password that I forgot from Windows unattended installer file Autounattend.xml.

Password is stored in this file as Base64 encoded value which can be easily decoded with following lines of Powershell script.

$EncodedText = “UABhAHMAcwB3AG8AcgBkAA==”
$DecodedText = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($EncodedText))
$DecodedText

image

To encode using PowerShell:

$EncodedText = “UABhAHMAcwB3AG8AcgBkAA==”
$DecodedText = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($EncodedText))
$DecodedText

image

Comments are closed.