$passwordfile = "~\kyazurespsecret.txt" $password = Get-Content $passwordfile|ConvertTo-SecureString -key (1..16) $clientsecret = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($password))