Search code examples
user-interfacepowershelllogin-script

Powershell logon script, is it possible to show dialog to user or read some user input?


So is it possible ?

I need to get some user credential to map certain network share. This share is not part of our domain and each user have different credentials.

EDIT

The script works fine if I run it from powershell console. Problem is that it doesn't show any promp or dialgo when I use it as a login script. When I log into desktop, the script starts, because it writes an debug log, but it doesn't show any dialog or promt user for input.


Solution

  • In your GPO enable the following setting: "Run logon scripts visible" to ensure that the logon script is visible. You can find it under User Configuration\Administrative Templates\System\Scripts