How to automate the connecting/disconnecting of a third-party VPN?

Welcome Forums General PowerShell Q&A How to automate the connecting/disconnecting of a third-party VPN?

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
1 month, 2 weeks ago.

  • Author
    Posts
  • #119462

    Participant
    Points: 32
    Rank: Member

    I have a third-party VPN software named "Pulse Secure VPN Client (64-bit)".

    Is there a way to automate the connecting/disconnecting of the VPN using PowerShell?

     

    Some info:

    PS > Get-VpnConnection

    (empty result)

     

    PS > Get-Service JuniperAccessService

    Status Name DisplayName
    —— —- ———–
    Running JuniperAccessSe... Pulse Secure Network Service

     

    Thank you in advance.

  • #119495

    Participant
    Points: 319
    Helping Hand
    Rank: Contributor

    This also means you have a shortcut this software put on your desktop or elsewhere that you'd use to kick it off.

    Just use Start-Process to fire off the shortcut and the Get-Process to get the PID, then when needed use Stop-Process.

    You can wrap that in a function called say Use-3rdPVpn with a switches that allows -Start or -Stop.

You must be logged in to reply to this topic.