Credential prompt: command line or dialog box?

Technically there is no security difference between the two methods.
It’s only a matter of preferences and the behavior depends of a single registry value.

Be prompted at the command line

Set the ConsolePrompting value to True

Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds" -Name "ConsolePrompting" -Value $True

Be prompted from a dialog box

Set the ConsolePrompting value to False or anything else than True.

Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds" -Name "ConsolePrompting" -Value $False

Or just remove the ConsolePrompting registry value to fall back to the default value which is False.

Remove-ItemProperty "HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds" -Name "ConsolePrompting"

Please note:

The ConsolePrompting registry entry works in some host programs, such as the Windows PowerShell console. It might not work in all host programs.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s