Configure WANem via PowerShell

Written by Ingmar Verheij on June 11th, 2012. Posted in PowerShell

If you want to simulate a WAN connection (lower bandwidth, add delay, jitter, etc.) then WANem is a solution that is (relatively) easy to use and free.

 

Configuring the WAN emulator is done via a webpage, but unfortunately there are no API’s exposed to automate the configuration.

Since I needed to automate the configuration of the WAN emulator I wrote a PowerShell script. You can find the PowerShell scrip below.

Download

ConfigureWanEm.ps1

 

Functions

The PowerShell script contains two WANem functions

  • WANEmulator_Reset – Resets the configuration (of the optional interface)
  • WANEmulator_Set – Sets the specified parameters (for the optional interface)

 

Usage

WANEmulator_Reset –HostName [-Interface]

  • HostName : The hostname of the WANem appliance (FQDN or IP address)
  • Interface : The interface to configure (default 0)

 

WANEmulator_Set –HostName [-Interface]

  • HostName : The hostname of the WANem appliance (FQDN or IP address)
  • Interface : The interface to configure (default 0)
  • PacketLimit : The packet limit (default 1000)
  • SymmetricalNetwork : Symmetrical network (Default Yes)
  • BandwidthPreset : A preset bandwidhth configuration (Default Other)
  • BandwidthSpecify : A bandwidth limit in Kbps (Default 0)
  • DelayTime : Delay time in milliseconds (Default 0)
  • Etcetera

All items that are configurable in the advanced configuration page of WANem are available as a parameter. The parameters that are shown in a dropbown box, like the bandwidth preset, are presented as an enumerable type. WYSIWYG.

Ingmar Verheij

At the time Ingmar wrote this article he worked for PepperByte as a Senior Consultant (up to May 2014). His work consisted of designing, migrating and troubleshooting Microsoft and Citrix infrastructures. He was working with technologies like Microsoft RDS, user environment management and (performance) monitoring. Ingmar is User Group leader of the Dutch Citrix User Group (DuCUG). RES Software named Ingmar RES Software Valued Professional in 2014.

More Posts - Website

Follow Me:
TwitterLinkedInGoogle Plus

Tags: , ,

Comments (2)

  • 4 May 2013 at 13:13 |

    Ingmar, thank you for sharing this. I’m using it to write a robocopy benchmarking test with WANem. I’ll publish my script once I’ve cleaned it up and will link back to this page.

    Again, thank you! 🙂

    • Ingmar Verheij
      4 May 2013 at 14:21 |

      Sounds cool!
      Feel free to drop me a mail with the link

Leave a comment

*

Donate

%d bloggers like this: