File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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]
Original file line number Diff line number Diff 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 4 MB - 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 4 MB - 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 {
Original file line number Diff line number Diff line change @@ -352,8 +352,9 @@ Get-ExecutionPolicy
352352Get-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
358359Get-ItemProperty "HKLM:\SOFTWARE\WDOT"
359360```
You can’t perform that action at this time.
0 commit comments