![]() It seemed as though the ASA was confused about which script to execute when there were two of them, or that it was executing the PowerShell script first which would never work because its PowerShell. I had originally tried this method, and the ASA would download both scripts, but I could never get the PowerShell one to execute. Then its just a matter of having the batch script call the PowerShell script in the path it gets downloaded to by the ASA. If you make a change to the scripts, you just re-upload them to the ASA, re-configured the VPN configuration to use them, and your changes get re-downloaded to the client upon connecting to the VPN. Whats more, is that the scripts get downloaded anytime they are changed. No more having to connect to a share to copy the files, potentially exposing passwords or perhaps not being able to download the files needed at all from the share. Since the ASA is configured to use two scripts, each one gets downloaded to the local client. ![]() One script is just a batch script that just has code in it to execute the second script, which is my PowerShell code. So what happens here is that when an Anåonnect client connects to the VPN, the ASA actually automatically downloads two different scripts to the clients local hard drive. First I configured one script for use on the ASA, and then configured a second script for use on the ASA for VPN Onconnect execution. I ended up configuring the ASA device to use two different scripts for Windows clients when they log in. I searched for a different way and finally came up with the fix which as it turns out so much less complicated than the way I was originally trying to do this. Some clients have differing AV clients which might block files from being downloaded. ![]() We recently replaced the NAS device this share was hosted on which for whatever reason resulted in certain clients being unable to access the share and thus download the PowerShell script for execution. This worked fine initially and got the desired result. The batch would then execute the PowerShell script that was downloaded. This batch script would connect to a Windows share on our internal network, copy down a PowerShell script along with the related support files to the users local machine. Originally what I did was create a batch script that was executed when a user logged into the VPN. I know this is somewhat old now, but I wanted to add how I ended up finally fixing this.
0 Comments
Leave a Reply. |