Skip to content

Commit

Permalink
Merge pull request #49 from ElstonLewis/Set_mtu_8950
Browse files Browse the repository at this point in the history
Updated MTU 8950
  • Loading branch information
ElstonLewis authored Nov 16, 2023
2 parents bf1348c + 4eac41d commit 5730fac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions files/windows/scripts/start.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
.NOTES
Name of file : start.ps1
Author : Outscale
Date : February 10th, 2023
Version : 1.6
Date : November 16th, 2023
Version : 1.7
#>

<# Functions #>
Expand Down Expand Up @@ -298,7 +298,7 @@ try {

$mtu = (Get-NetIPInterface -InterfaceAlias "Ethernet").NlMtu
if ($mtu -ne 8950) {
Set-NetAdapterAdvancedProperty -Name "Ethernet" -DisplayName "Jumbo Packet" -DisplayValue "9014"
Set-NetAdapterAdvancedProperty -Name "Ethernet" -DisplayName "Jumbo Packet" -DisplayValue "8964"
WriteLog("Set-NetIPInterface Ethernet NlMtuBytes 8950")
} else {
WriteLog("Set-NetIPInterface Ethernet NlMtuBytes 8950 already set")
Expand All @@ -309,12 +309,12 @@ try {
$path = $adapter.ServiceName
try {
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\$path\" | Select-Object -ExpandProperty MTU -ErrorAction Stop | Out-Null
WriteLog("Registry ItemProperty Ethernet MTU 9000 already set")
WriteLog("Registry ItemProperty Ethernet MTU 8950 already set")
}
catch
{
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\$path\" -Name "MTU" -Value 9000 -PropertyType "DWord" | Out-Null
WriteLog("Applied Registry New-ItemProperty Ethernet MTU 9000")
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\$path\" -Name "MTU" -Value 8950 -PropertyType "DWord" | Out-Null
WriteLog("Applied Registry New-ItemProperty Ethernet MTU 8950")
}

WriteLog "Enable Remote Desktop"
Expand Down

0 comments on commit 5730fac

Please sign in to comment.