Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

PENDING Want to deploy Cisco AnyConnect Client but want to exclude users are connected via VPN

  • Thread starter Thread starter Boipora
  • Start date Start date
  • Replies Replies 3
  • Views Views 2K

Boipora

New Member
Messages
2
Reaction score
0
Points
1
As I have said in the Subject, had bit of issue in the past while installing the new version, the user lost internet connection for 15 minutes. Don't want to trouble people.

Is there a way where I can package an application and add something that will stop deploying the app when the user is using VPN and only deploy to the user are in the corporate network.
 
As I have said in the Subject, had bit of issue in the past while installing the new version, the user lost internet connection for 15 minutes. Don't want to trouble people.

Is there a way where I can package an application and add something that will stop deploying the app when the user is using VPN and only deploy to the user are in the corporate network.
use PowerShell wrapper to detect if they are connected to VPN.
 
We have used this in a script when deploying the new Cisco Secure Client while the users were on Cisco Anyconnect

Code:
$GWAddress = (Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=TRUE | Select-Object -Property DefaultIPGateway).DefaultIpGateway

Then we would use if statements to verify if they are on the correct IP and if they were on the VPN, we would exit the script.

Code:
If (($GWAddress -match "xx\.xxx\.*\.*") -or ($GWAddress -match "xx\.x\.x\.*") -or ($GWAddress -match "x\.x\.x\.*"))
{
    exit 200
    }
 
Back
Top