I have a powershell script that is run as a scheduled task and is triggered to run "On workstation unlock". The script is programmed to reconnect an SSTP VPN connection if the connection becomes disconnected during the time the workstation is locked. I would like to pass the username and password to the script so that the user is not prompted to enter the same information twice (once for the workstation unlock then again for the VPN connection) The domain username and pass are the same as the vpn username and pass. The [System.Security.Principal.WindowsIdentity]::GetCurrent() will not let me access the password of the currently logged in user. Is there another way??
- Changed type Alex ZhaozxMicrosoft contingent staff, Moderator Thursday, September 12, 2013 3:25 PM
The issue you are facing is better suited in Scriptcenter forum. We have a dedicated team to help you with this type of issues. I would suggest you to post the same question in Microsoft Scriptcenter forum for further assistance.