I am copying a new VPN profile to the Cisco profiles folder using a file sync.  We are trying to streamline the change with as little employee involvement as possible.

This adds a second site address to the Cisco anyconnect drop down since the old profile is still in the folder.  I am trying to figure out a way to have Kace manually remove the old profile form the Cisco profile folder.  

C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Profile

I cannot name the new profile the same as the old one and have it overwritten.  The old profile name has one of our older company names in it, which we would like removed.  I can either delete the file or change the file type which would remove it from the drop down.  Any help on this would be greatly welcomed.  

We are currently on Kace version 6.2.109329 and agent 6.2.1025

0 Comments   [ + ] Show Comments


Please log in to comment

Community Chosen Answer

Upload your .bat file as a dependency
If you just want to launch it regardless add a task to the Verify stage to "always fail"
Add the following to the remediation stage...

Make sure you change the file name to the one you have.
Answered 11/26/2014 by: h2opolo25
Red Belt

  • Works & Thanks. I'm now trying to add the new profile using the same script. I have the new profile as a dependency but its not uploaded to the location after running.
    • Dependencies are uploaded to the KACE Dependency Dir. You have to copy or move them from there.


      Same deal as before. Do it through batch file. You can append to the same batch file to move or copy the profile from the KACE dependency directory to the cisco profile directory.
      • Perfect! Thank you for your help with this. I have learned a lot and this will be helpful in the future. I just need to learn more batch scripting.
Please log in to comment


You can do this with the scripting feature of KACE. Just make a script that deletes that folder or files you need deleted and make that script check if the files are there and then deletes them if they are. You can also include in that script the new profile to copy over instead of doing t with file sync.
Answered 11/26/2014 by: h2opolo25
Red Belt

  • I was attempting to do this but there isn't a delete file or folder option in the scripting setup.
    • You don't need it there. Use a batch file to delete and just execute that batch file in the script.
      • I have no idea how to do this. I have a .bat created that will remove the needed profile. I cannot figure out how to get the .bat to execute on the target computer using a Kace script.
Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja