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??
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.
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.