Closed tillewolle closed 1 year ago
Moin tillewolle,
bist du dir sicher, dass du das PowerShell oder ISE als Administrator ausgeführt hast? (Rechte maustaste auf PowerShell oder ISE und dann "als Administrator ausführen" auswählen.) Den laut der Fehlermeldung "... Vorgang sind erhöhte Rechte erforderlich ..." ist das nicht so.
Gruss Alex
I tried the two commands from above in PowerShell ISE with elevated priviligues in Windows 10 22H2 with no DeSuboptimization script applied:
PS C:\Windows\system32> Invoke-Expression -Command "netsh int tcp set supplemental template=Datacenter congestionprovider=DCTCP" -ErrorAction Stop | Out-String -Stream OK.
PS C:\Windows\system32> Invoke-Expression -Command "netsh int tcp set global ECN=Enabled" -ErrorAction Stop | Out-String -Stream OK.
Tried it again in PowerShell as admin and also in PowerShell ISE as admin. Same results for both:
The Update of the congestionprovider of the Datacenter TCP profile to DCTCP was NOT successfully. :-( Die angegebene Vorlage konnte vom Befehl zum Festlegen von "supplemental" nicht aktualisiert werden. Für den angeforderten Vorgang sind erhöhte Rechte erforderlich (Als Administrator ausführen).
The only difference while trying it with PowerShell ISE is that it breaks the umlauts.
Hi tillewolle,
can you please run "Get-Netadapter | FL" on your computer and post the output here, thanks. (This option cannot be set for some very special network adapters.)
Best Regards from Germany Alex
Get-Netadapter | FL
shows:
Name: Ethernet0 InterfaceDescription: Intel(R) 82574L Gigabit Network Connection InterfaceIndex: 8 MacAdress: XX-XX-XX-XX-XX-XX MediaType: 802.3 PhysicalMediaType: 802.3 InterfaceOperationalStatus: Up AdminStatus: Up LinkSpeed(Gbps): 1 MediaConnectionState: Connected ConnectorPresent: True DriverInformation: Driver Date 2018-06-12 Version 12.17.10.8 NDIS 6.50
Tried it with a different Win10 machine and it runs flawlessly on there. Version is Win10 Pro 22H2 Build 19045.2193.
You can try to run the netsh commands at cmd for testing (minimizes the PowerShell overhead). Monitor it with Procmon and filter for errors (probably registry error). Or try with system rights with PSExec (or ExecTi, RunAsSystem, RunX).
Tried the netsh with cmd as administrator and also within the netsh shell but it always tells me that I need higher privileges. On the other machine that worked earlier the same commands work flawlessly in cmd and netsh.
Tried the netsh with cmd as administrator and also within the netsh shell but it always tells me that I need higher privileges. On the other machine that worked earlier the same commands work flawlessly in cmd and netsh.
Running in cmd just minimizes the overhead of events in ProcMon, but doesn't give you any additional permissions. You still need to track down the permission issues aka errors in ProcMon. Or run with system rights, then there shouldn't be any permission issues.
See #8
Moin tillewolle, can you please check whether the problem is solved by Karl's additions, thank you. Best Regards Alex
Works like a charm! No errors spotted!
The TCP Congestion Control change does not apply because of wrong privileges. The script errors out with
Provoking it manually with
Invoke-Expression -Command "netsh int tcp set supplemental template=Datacenter congestionprovider=DCTCP" -ErrorAction Stop | Out-String -Stream
gives the same error message without your custom text.Similar behaviour for enabling ECN. It errors out with
This error refers to congestion control but also to ECN which I know as Explicit Congestion Notification. Is this right or is the wrong error message displayed? Also please change it to
Trying it manually with
Invoke-Expression -Command "netsh int tcp set global ECN=Enabled" -ErrorAction Stop | Out-String -Stream
gives the same error message without your custom text.I executed the script with powershell as admin on W10 Pro 22H2 (Build 19045.2251). All other changes were successful.