Force AnyConnect to remember profiles

Cisco AnyConnectI have quite a number of client systems I need to connect to using VPNs. While there is a large number of VPNs available, it is inevitable that I would have some used by more than one client. One such as Cisco AnyConnect.

By default AnyConnect will remember only the last VPN to which you connected, but it is possible to force it to remember multiple connections by adding a Profile.xml to the Profile folder located in C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Profile.

The xml file can contain a HostName and HostAddress (prior versions supported a User) which means I don’t have to look up the URL or IP address of a connection everytime I want to connect.

The XML file should contain the following:

<?xml version="1.0" encoding="UTF-8"?>
<AnyConnectProfile xmlns="http://schemas.xmlsoap.org/encoding/">
<ServerList>
     <HostEntry>
          <HostName>Connection 1</HostName>
          <HostAddress>162.168.1.125</HostAddress>
     </HostEntry>
</ServerList>
<ServerList>
     <HostEntry>
          <HostName>Connection 2</HostName>
          <HostAddress>192.168.1.152</HostAddress>
     </HostEntry>
</ServerList>
</AnyConnectProfile>

With the connection information saved into the xml file, you’ll be able to access them through a drop down list in AnyConnect.

The information above is based on this post by Pandiyan Murugan; I’m reposting so that I can find it easily.

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

4 thoughts on “Force AnyConnect to remember profiles

  1. I’m happy that my post has helped you!

  2. Andreas says:

    Hi. Thank you, this works!

    I think you may have made a small typo, though: the correct path is:
    \ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Profile\
    and the file Profile.xml file lives in there.

    In your post it says “adding a Profile.xml to the profiles folder” which is snallcaps and plural 🙂
    (Profile, not profiles) – or did you mean profile’s ?

    but it does what it promises. thank you!!!

    Andreas

    1. Ian Grieve says:

      Hi Andreas,

      I’ve changed the post to refer to the Profile folder for clarity.

Leave a Reply

Your email address will not be published. Required fields are marked *