AnyConnect connection using scripting not working on remote machine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2019 01:52 AM - edited 02-21-2020 09:49 PM
Hi,
I am trying to establish a VPN connection using Cisco AnyConnect on a remote machine (Google Compute VM) using vpncli.
I am currently faced with 2 issues.
1. I am able to get the VPN connect if I am logged into that remote VM (using RDP). But if I close that RDP session, AnyConnect would simply just not connect.
If I am RDP in the server (minimised) and then my script triggers the also VPN connects successfully. Issue connect when there is no active display to the VPN.
Now the Client VPN provider has told me that they have WinodowsLogonEnforcement = SingleSignOn and I verified this in the location profile, so that's not a problem.
Has anyone experienced the same issue earlier? What I want to achieve is that my automated processes should run uninterrupted without someone having to login to the VM or RDP into the VM.
This is the command I am using -
"C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpncli.exe" -s < C:\client\anyconnect-profile.txt
Again, this works for me if I am logged in.
I am printing the input and error stream from the vpncli process, but there is nothing there. Here is the log from vpncli. I am using vpn host, group number, username and password to connect.
Cisco AnyConnect Secure Mobility Client (version 4.6.02074) .
Copyright (c) 2004 - 2018 Cisco Systems, Inc. All Rights Reserved.
>> state: Disconnected
>> state: Disconnected
>> state: Disconnected
>> notice: Ready to connect.
VPN>
>> registered with local VPN subsystem.
VPN>
2. Another issue that I am facing is this error message.
- Labels:
-
AnyConnect
-
Other VPN Topics
-
Remote Access
