Cisco vpn anyconnect

Hello,

I need help with uninstalling Cisco AnyConnect VPN from a group of users. We are using Microsoft Intune as our MDM to deploy the policy. We currently have a policy to install AnyConnect through Intune, and I am looking for a way to uninstall it using a Microsoft Intune policy in order to remove the app from this specific group of users. Please advise.

Thank you.

Are you packaging it as a Win32 app or installing as a LoB? Hopefully the former, if so, just scope the uninstall assignment assuming you set up your app correctly: Add and assign Win32 apps to Microsoft Intune | Microsoft Learn

As a generic alternative you can also uninstall via a powershell script that looks in the registry and calls the uninstall/silent uninstall, just have to make sure you get your detection set right.

Just add the group to the uninstall assignment

Hey.

I have this as my uninstall script that I package in my Cisco Anyconnect app.

$UninstallPath = "C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\Uninstall.exe"

If(Test-Path $UninstallPath) {

Remove-Item -LiteralPath $UninstallPath -force -recurse

    }

$removemsi = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*, HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | `
Where-Object {$_.Displayname -like "cisco anyconnect*"} | `
Select-Object DisplayName,DisplayVersion,UninstallString,QuietUninstallString

ForEach ($msi in $removemsi){
    $uninstall = ($msi.UninstallString -replace "/I", "/X " -replace "msiexec.exe","").Trim()
    $UninstallArgs = $uninstall, "/QN", "/NORESTART"
  Start-Process -FilePath "msiexec.exe" -ArgumentList $UninstallArgs -Wait -ErrorAction Continue
}

You are free to try and test this out if you want.

Any questions just holler.

I tend to use the foreach for most of the uninstalls which is why its got both the main and the wow6432node in it.

You should use displayname or publisher and set it as -eq but for this one it catches them all as we have 3 modules for the vpn installed.

AnyConnect

Start Before Login

Umbrella.