ApplicGate
(v12.0.8874.35714 started 2024-04-18 18:00:37 on VM2)

Example commands/scripts to enable/disable network interfaces:
Remarks:
- If arguments are specified the program name must be enclosed with double quotes " e.g.
-- "Enable.bat" Arg1 Arg2
- The commands must run as Administrator,
-- e.g. the scheduled task (where the Application Gateway is running) uses the account SYSTEM.

The recommended tool is PowerShell:
Here is an example that also writes some log files:
Ethernet is an example for an interface name. The actual name can be shown using the command Get-NetAdapter.

Enable the interface: Use a .bat file with content like this:
echo %Date% %Time% >> Enable.log
powershell.exe -Command Get-NetAdapter >> Enable.log
powershell.exe -Command Enable-NetAdapter -Name Ethernet -Confirm:$false >> Enable.log
Disable the interface: Use a .bat file with content like this:
echo %Date% %Time% >> Disable.log
powershell.exe -Command Get-NetAdapter >> Disable.log
powershell.exe -Command Disable-NetAdapter -Name Ethernet -Confirm:$false >> Disable.log

Where PowerShell is not available netsh can be used, see example:
"netsh" interface show interface ... to look for the interface name to be used below
"netsh" interface set interface Ethernet enabled ... enable interface
"netsh" interface set interface Ethernet disabled ... disable interface


ApplicGate Logo  reinhold.leitner@applicgate.com (C) April 2024
www.applicgate.com