Skip to content

Commit a2c078e

Browse files
committed
Merge remote-tracking branch 'upstream/main' into Misc
2 parents 461166c + a830466 commit a2c078e

3 files changed

Lines changed: 15 additions & 13 deletions

File tree

Configurations/2009/Autologgers.Json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@
3939
"KeyName": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\WMI\\Autologger\\Mellanox-Kernel\\",
4040
"URL": "N/A",
4141
"OptimizationState": "Apply",
42-
"Description": "Diagnostic log for ReFS. Unless using ReFS, this trace log should not be needed"
42+
"Description": "Diagnostic log for Mellanox kernel driver. Unless using Mellanox network adapters, this trace log should not be needed"
4343
}
4444
]

Functions/Optimize-WDOTNetworkOptimizations.ps1

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,20 @@ Function Optimize-WDOTNetworkOptimization
9292
}
9393

9494
# NIC Advanced Properties performance settings for network biased environments
95-
Write-EventLog -Message "Configuring Network Adapter Buffer Size" @EVT @eId70Info @sHT
96-
Write-Host -Object "[Windows Optimize] Configuring Network Adapter Buffer Size" -ForegroundColor Cyan
97-
try {
98-
Set-NetAdapterAdvancedProperty -DisplayName "Send Buffer Size" -DisplayValue 4MB -NoRestart @HT
99-
} catch {
100-
Write-Waring -Message "Failed to set Send Buffer Size because $($_.Exception.Message)"
101-
}
102-
<# NOTE:
95+
if (Get-NetAdapterAdvancedProperty | Where-Object { $_.DisplayName -eq 'Send Buffer Size' }) {
96+
Write-EventLog -Message "Configuring Network Adapter Buffer Size" @EVT @eId70Info @sHT
97+
Write-Host -Object "[Windows Optimize] Configuring Network Adapter Buffer Size" -ForegroundColor Cyan
98+
try {
99+
Set-NetAdapterAdvancedProperty -DisplayName "Send Buffer Size" -DisplayValue 4MB -NoRestart @HT
100+
} catch {
101+
Write-Waring -Message "Failed to set Send Buffer Size because $($_.Exception.Message)"
102+
}
103+
<# NOTE:
103104
Note that the above setting is for a Microsoft Hyper-V VM. You can adjust these values in your environment...
104105
by querying in PowerShell using Get-NetAdapterAdvancedProperty, and then adjusting values using the...
105106
Set-NetAdapterAdvancedProperty command.
106-
#>
107-
107+
#>
108+
}
108109
}
109110
End
110111
{

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,9 @@ Get-ExecutionPolicy
352352
Get-ChildItem .\Configurations -Directory
353353
354354
# Test configuration file validity
355-
Test-Json -Path ".\Configurations\MyConfig\Services.json"
356-
355+
if ($PSVersionTable.PSVersion -gt [version]'6.0.0') {
356+
Test-Json -Path ".\Configurations\MyConfig\Services.json"
357+
}
357358
# Check WDOT version and last run
358359
Get-ItemProperty "HKLM:\SOFTWARE\WDOT"
359360
```

0 commit comments

Comments
 (0)