Question

Script to unhide Cisco Secure Client VPN module

  • 28 March 2024
  • 1 reply
  • 22 views

Badge

Hi all, 

 

I'm looking for PowerShell to unhide the Cisco Secure Client VPN Module. Cisco Secure Client is already on our machine, but the VPN module is hidden. I want to unhide it. 

 

 


1 reply

Userlevel 1
Badge

Try this.

 

# Check if the file exists
$fileToDelete = "C:\ProgramData\Cisco\Cisco Secure Client\VPN\Profile\VPNDisable_ServiceProfile.xml"

if (Test-Path $fileToDelete) {
    # Delete the file
    Remove-Item $fileToDelete -Force

    # Restart Cisco Secure Client - AnyConnect VPN Agent service
    Restart-Service "vpnagent" -Force
    Write-Host "File deleted and Cisco Secure Client - AnyConnect VPN Agent service restarted."
} else {
    Write-Host "File does not exist. No action taken."
}
 

Reply