AutomoxAutomox

Script to unhide Cisco Secure Client VPN module

anuj.johri
March 28, 2024 at 5:12 pm UTC

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. 

 

 

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack

Replies (1)

slammertMarch 28, 2024
#1

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."
}