Powershell script - VPN (working from home) / Office RRS feed

  • Question

  • Hi, does anyone have any powershell code snippets or advice to detect whether an end users machine is connecting to the company network from an off-site location, or connected to the network within an office. eg. detecting VPN is in use (fortinet) or not. 

    This code will be embedded into a powershell scripted software deployment to determine whether to run an install when the machine is in the office, or to postpone it if the machine is off site.

    thanks in advance.

    Wednesday, October 9, 2019 10:29 AM

All replies

  • A client connected to a particular VPN should have an IP address from a specific range. You should be able to detect this and proceed accordingly.

    Live long and prosper!


    Wednesday, October 9, 2019 11:19 AM