V4.1.8 - Show-ADTInstallationProgress not recognising -secureinput

I am currently packaging some SQL software where we would like the users to set their own password for the database it installs but we need to encrypt the input so it doesn't show in the logs.

-secureinput should work fine but the parameter is not recognised. Whats the issue?

$su_pwd = Show-ADTInstallationPrompt -RequestInput -Message 'Please enter a super user password' -ButtonRightText 'Submit' -SecureInput

The variable is then used for the password parameter for the app to use.

Edit -> we are using v4.1.8 of the tool.

Good news/bad news

I was able to reproduce your issue. Bad news is this:

Error Record:
-------------

Message      : A parameter cannot be found that matches parameter name 'SecureInput'.

How did this happen?
To automatically generate the Reference docs for PSADT, each function's header contains the information to create the docs. I'm guessing they generate and publish from the Develop branch and not the default Main branch of the PSADT code.

TL;DR: The -SecureInput parameter is coming to a future release of PSADT. It's not in V4.1.8.

1 Like

I'm sorry about this. We do know about it... The 4.1.x documentation is reflecting the state of `main`, not the `4.1.x` branch. · Issue #241 · PSAppDeployToolkit/website · GitHub

1 Like

Fair enough, suppose this isnt a PSADT query now but, does anyone have any examples where I can encrypt the user input so it should not show in the PSADT logs?

## sets password for database
    $su_pwd = Show-ADTInstallationPrompt -RequestInput -Message 'Please enter a super user password' -ButtonRightText 'Submit' 

    ## main install
    Write-ADTLogEntry -Message "Installing $($adtsession.appvendor),$($adtsession.appname), $($adtsession.appversion)"
    Start-ADTProcess -FilePath "$($adtSession.dirfiles)\postgresql-18.1-2-windows-x64.exe" `
    -ArgumentList "--unattendedmodeui none --superpassword `"$su_pwd`" --mode unattended --enable-components server,stackbuilder,commandlinetools --install_runtimes 1"

Thats the full install command which works great but as I said, we dont really want the user input showing plain text in the logs.

For Start-ADTProcess you are in luck

Works perfectly. Thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.