The lazy programmer scripts
scripts that work

Lazy set MTU on Windows GitHub

The script needs to be run as administrator in a Powershell session.

This script sets the MTU size on Windows.

Tested on Windows >= 6.0

# Set the name of the interface
# You can get the interface name by executing: Get-NetAdapter
$interfaceName = "Ethernet"
$mtuSize = 1450
netsh interface ipv4 show subinterface $interfaceName
netsh interface ipv4 set subinterface $interfaceName mtu=$mtuSize store=persistent

That's all, folks!

Written by kami on Tuesday September 15, 2015
Permalink - Tags: windows, powershell, netsh, networking

Leave a comment

comments powered by Disqus

« Lazy detect Linux distro - Lazy set MTU on Linux »