It would be great to be able to have the password as a cypher and stored in an ini file and be able to decrypt and use it during installs (UI & Silent), as needed. Something like this:
[Byte[]] $key = (16, 2, 15, 3, 14, 4, 13, 5, 11, 8, 12, 1, 13, 14, 15, 16)
$Password = "pssword"
$path = "path"
$Secure = ConvertTo-SecureString -string $Password -AsPlainText -Force
$Encrypted = ConvertFrom-SecureString -SecureString $Secure -Key $key
$Encrypted > "${path}file.ini"
$Secure2 = Get-Content -path "${path}file.ini" | ConvertTo-SecureString -Key $key
$user_user=[system.runtime.interopservices.marshal]::securestringtobstr($Secure2)
$Pw=[system.runtime.interopservices.marshal]::ptrtostringauto($user_user)
$Pw