Advertisement
St1cky

Network Tweaker 20230709

Jul 8th, 2023
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 260.08 KB | None | 0 0
  1. <#
  2. .NAME
  3. Tweaking Adapter
  4. #>
  5.  
  6. Add-Type -AssemblyName System.Windows.Forms
  7. [System.Windows.Forms.Application]::EnableVisualStyles()
  8.  
  9. $Form = New-Object system.Windows.Forms.Form
  10. $Form.ClientSize = New-Object System.Drawing.Point(1606,934)
  11. $Form.text = "[St1cky] Network Pro - Tweaker v1.0a"
  12. $Form.TopMost = $false
  13. $Form.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  14.  
  15. $cb_AdapterNamesCombo = New-Object system.Windows.Forms.ComboBox
  16. $cb_AdapterNamesCombo.width = 262
  17. $cb_AdapterNamesCombo.height = 20
  18. $cb_AdapterNamesCombo.location = New-Object System.Drawing.Point(64,16)
  19. $cb_AdapterNamesCombo.Font = New-Object System.Drawing.Font('Calibri',9)
  20. $cb_AdapterNamesCombo.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  21. $cb_AdapterNamesCombo.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  22.  
  23. $Label1 = New-Object system.Windows.Forms.Label
  24. $Label1.text = "Adapter:"
  25. $Label1.AutoSize = $true
  26. $Label1.width = 25
  27. $Label1.height = 10
  28. $Label1.location = New-Object System.Drawing.Point(10,20)
  29. $Label1.Font = New-Object System.Drawing.Font('Calibri',10)
  30. $Label1.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  31.  
  32. $Label2 = New-Object system.Windows.Forms.Label
  33. $Label2.text = "Registry:"
  34. $Label2.AutoSize = $true
  35. $Label2.width = 25
  36. $Label2.height = 10
  37. $Label2.location = New-Object System.Drawing.Point(10,43)
  38. $Label2.Font = New-Object System.Drawing.Font('Calibri',10)
  39. $Label2.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  40.  
  41. $lbl_Path = New-Object system.Windows.Forms.Label
  42. $lbl_Path.AutoSize = $true
  43. $lbl_Path.width = 25
  44. $lbl_Path.height = 10
  45. $lbl_Path.location = New-Object System.Drawing.Point(63,45)
  46. $lbl_Path.Font = New-Object System.Drawing.Font('Calibri',9)
  47. $lbl_Path.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  48.  
  49. $Label3 = New-Object system.Windows.Forms.Label
  50. $Label3.text = "NDIS:"
  51. $Label3.AutoSize = $true
  52. $Label3.width = 25
  53. $Label3.height = 10
  54. $Label3.location = New-Object System.Drawing.Point(10,66)
  55. $Label3.Font = New-Object System.Drawing.Font('Calibri',10)
  56. $Label3.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  57.  
  58. $lbl_ndisver = New-Object system.Windows.Forms.Label
  59. $lbl_ndisver.AutoSize = $true
  60. $lbl_ndisver.width = 25
  61. $lbl_ndisver.height = 10
  62. $lbl_ndisver.location = New-Object System.Drawing.Point(63,65)
  63. $lbl_ndisver.Font = New-Object System.Drawing.Font('Calibri',10)
  64. $lbl_ndisver.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  65.  
  66. $Groupbox1 = New-Object system.Windows.Forms.Groupbox
  67. $Groupbox1.height = 213
  68. $Groupbox1.width = 233
  69. $Groupbox1.text = "RSS Settings"
  70. $Groupbox1.location = New-Object System.Drawing.Point(10,93)
  71.  
  72. $Label4 = New-Object system.Windows.Forms.Label
  73. $Label4.text = "Profile:"
  74. $Label4.AutoSize = $true
  75. $Label4.width = 25
  76. $Label4.height = 10
  77. $Label4.location = New-Object System.Drawing.Point(8,66)
  78. $Label4.Font = New-Object System.Drawing.Font('Calibri',10)
  79. $Label4.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  80.  
  81. $Label5 = New-Object system.Windows.Forms.Label
  82. $Label5.text = "NumberOfReceiveQueues:"
  83. $Label5.AutoSize = $true
  84. $Label5.width = 25
  85. $Label5.height = 10
  86. $Label5.location = New-Object System.Drawing.Point(8,43)
  87. $Label5.Font = New-Object System.Drawing.Font('Calibri',10)
  88. $Label5.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  89.  
  90. $Label6 = New-Object system.Windows.Forms.Label
  91. $Label6.text = "Status:"
  92. $Label6.AutoSize = $true
  93. $Label6.width = 25
  94. $Label6.height = 10
  95. $Label6.location = New-Object System.Drawing.Point(8,20)
  96. $Label6.Font = New-Object System.Drawing.Font('Calibri',10)
  97. $Label6.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  98.  
  99. $lbl_rssstatus = New-Object system.Windows.Forms.Label
  100. $lbl_rssstatus.AutoSize = $true
  101. $lbl_rssstatus.width = 25
  102. $lbl_rssstatus.height = 10
  103. $lbl_rssstatus.location = New-Object System.Drawing.Point(61,20)
  104. $lbl_rssstatus.Font = New-Object System.Drawing.Font('Calibri',10)
  105. $lbl_rssstatus.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  106.  
  107. $cb_rss_onoff = New-Object system.Windows.Forms.ComboBox
  108. $cb_rss_onoff.width = 108
  109. $cb_rss_onoff.height = 20
  110. @('Enable','Disable') | ForEach-Object {[void] $cb_rss_onoff.Items.Add($_)}
  111. $cb_rss_onoff.location = New-Object System.Drawing.Point(117,17)
  112. $cb_rss_onoff.Font = New-Object System.Drawing.Font('Calibri',9)
  113. $cb_rss_onoff.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  114. $cb_rss_onoff.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  115.  
  116. $btn_apply = New-Object system.Windows.Forms.Button
  117. $btn_apply.text = "Apply"
  118. $btn_apply.width = 60
  119. $btn_apply.height = 21
  120. $btn_apply.location = New-Object System.Drawing.Point(10,312)
  121. $btn_apply.Font = New-Object System.Drawing.Font('Calibri',10)
  122. $btn_apply.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  123.  
  124. $cb_rssqueues = New-Object system.Windows.Forms.ComboBox
  125. $cb_rssqueues.width = 60
  126. $cb_rssqueues.height = 20
  127. $cb_rssqueues.location = New-Object System.Drawing.Point(165,41)
  128. $cb_rssqueues.Font = New-Object System.Drawing.Font('Calibri',9)
  129. $cb_rssqueues.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  130. $cb_rssqueues.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  131.  
  132. $btn_unqueues = New-Object system.Windows.Forms.Button
  133. $btn_unqueues.text = "Unlock RSSQueues"
  134. $btn_unqueues.width = 112
  135. $btn_unqueues.height = 21
  136. $btn_unqueues.location = New-Object System.Drawing.Point(76,312)
  137. $btn_unqueues.Font = New-Object System.Drawing.Font('Calibri',9)
  138. $btn_unqueues.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#f8e71c")
  139.  
  140. $cb_rssprofile = New-Object system.Windows.Forms.ComboBox
  141. $cb_rssprofile.width = 108
  142. $cb_rssprofile.height = 20
  143. $cb_rssprofile.location = New-Object System.Drawing.Point(117,66)
  144. $cb_rssprofile.Font = New-Object System.Drawing.Font('Calibri',9)
  145. $cb_rssprofile.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  146. $cb_rssprofile.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  147.  
  148. $Label7 = New-Object system.Windows.Forms.Label
  149. $Label7.text = "BaseProcessor:"
  150. $Label7.AutoSize = $true
  151. $Label7.width = 25
  152. $Label7.height = 10
  153. $Label7.location = New-Object System.Drawing.Point(8,92)
  154. $Label7.Font = New-Object System.Drawing.Font('Calibri',10)
  155. $Label7.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  156.  
  157. $cb_rssbaseproc = New-Object system.Windows.Forms.ComboBox
  158. $cb_rssbaseproc.width = 108
  159. $cb_rssbaseproc.height = 20
  160. @('0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15') | ForEach-Object {[void] $cb_rssbaseproc.Items.Add($_)}
  161. $cb_rssbaseproc.location = New-Object System.Drawing.Point(117,89)
  162. $cb_rssbaseproc.Font = New-Object System.Drawing.Font('Calibri',9)
  163. $cb_rssbaseproc.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  164. $cb_rssbaseproc.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  165.  
  166. $Label8 = New-Object system.Windows.Forms.Label
  167. $Label8.text = "MaxProcessor:"
  168. $Label8.AutoSize = $true
  169. $Label8.width = 25
  170. $Label8.height = 10
  171. $Label8.location = New-Object System.Drawing.Point(7,115)
  172. $Label8.Font = New-Object System.Drawing.Font('Calibri',10)
  173. $Label8.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  174.  
  175. $cb_rssmaxproc = New-Object system.Windows.Forms.ComboBox
  176. $cb_rssmaxproc.width = 108
  177. $cb_rssmaxproc.height = 20
  178. @('0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15') | ForEach-Object {[void] $cb_rssmaxproc.Items.Add($_)}
  179. $cb_rssmaxproc.location = New-Object System.Drawing.Point(117,112)
  180. $cb_rssmaxproc.Font = New-Object System.Drawing.Font('Calibri',9)
  181. $cb_rssmaxproc.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  182. $cb_rssmaxproc.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  183.  
  184. $Label9 = New-Object system.Windows.Forms.Label
  185. $Label9.text = "MaxProcessors:"
  186. $Label9.AutoSize = $true
  187. $Label9.width = 25
  188. $Label9.height = 10
  189. $Label9.location = New-Object System.Drawing.Point(7,139)
  190. $Label9.Font = New-Object System.Drawing.Font('Calibri',10)
  191. $Label9.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  192.  
  193. $cb_rssmaxprocs = New-Object system.Windows.Forms.ComboBox
  194. $cb_rssmaxprocs.width = 108
  195. $cb_rssmaxprocs.height = 20
  196. @('0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15') | ForEach-Object {[void] $cb_rssmaxprocs.Items.Add($_)}
  197. $cb_rssmaxprocs.location = New-Object System.Drawing.Point(117,136)
  198. $cb_rssmaxprocs.Font = New-Object System.Drawing.Font('Calibri',9)
  199. $cb_rssmaxprocs.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  200. $cb_rssmaxprocs.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  201.  
  202. $btn_openreg = New-Object system.Windows.Forms.Button
  203. $btn_openreg.text = "Open"
  204. $btn_openreg.width = 86
  205. $btn_openreg.height = 20
  206. $btn_openreg.location = New-Object System.Drawing.Point(334,16)
  207. $btn_openreg.Font = New-Object System.Drawing.Font('Calibri',10)
  208. $btn_openreg.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  209.  
  210. $Groupbox2 = New-Object system.Windows.Forms.Groupbox
  211. $Groupbox2.height = 190
  212. $Groupbox2.width = 311
  213. $Groupbox2.text = "Global Settings"
  214. $Groupbox2.location = New-Object System.Drawing.Point(250,93)
  215.  
  216. $Label10 = New-Object system.Windows.Forms.Label
  217. $Label10.text = "ReceiveSideScaling:"
  218. $Label10.AutoSize = $true
  219. $Label10.width = 25
  220. $Label10.height = 10
  221. $Label10.location = New-Object System.Drawing.Point(10,20)
  222. $Label10.Font = New-Object System.Drawing.Font('Calibri',10)
  223. $Label10.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  224.  
  225. $cb_osrss = New-Object system.Windows.Forms.ComboBox
  226. $cb_osrss.width = 108
  227. $cb_osrss.height = 20
  228. @('Enabled','Disabled') | ForEach-Object {[void] $cb_osrss.Items.Add($_)}
  229. $cb_osrss.location = New-Object System.Drawing.Point(194,17)
  230. $cb_osrss.Font = New-Object System.Drawing.Font('Calibri',9)
  231. $cb_osrss.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  232. $cb_osrss.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  233.  
  234. $Label11 = New-Object system.Windows.Forms.Label
  235. $Label11.text = "ReceiveSegmentCoalescing:"
  236. $Label11.AutoSize = $true
  237. $Label11.width = 148
  238. $Label11.height = 10
  239. $Label11.location = New-Object System.Drawing.Point(10,44)
  240. $Label11.Font = New-Object System.Drawing.Font('Calibri',10)
  241. $Label11.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  242.  
  243. $cb_osrsc = New-Object system.Windows.Forms.ComboBox
  244. $cb_osrsc.width = 108
  245. $cb_osrsc.height = 20
  246. @('Enabled','Disabled') | ForEach-Object {[void] $cb_osrsc.Items.Add($_)}
  247. $cb_osrsc.location = New-Object System.Drawing.Point(194,40)
  248. $cb_osrsc.Font = New-Object System.Drawing.Font('Calibri',9)
  249. $cb_osrsc.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  250. $cb_osrsc.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  251.  
  252. $Label12 = New-Object system.Windows.Forms.Label
  253. $Label12.text = "Chimney:"
  254. $Label12.AutoSize = $true
  255. $Label12.width = 25
  256. $Label12.height = 10
  257. $Label12.location = New-Object System.Drawing.Point(11,68)
  258. $Label12.Font = New-Object System.Drawing.Font('Calibri',10)
  259. $Label12.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  260.  
  261. $cb_oschimney = New-Object system.Windows.Forms.ComboBox
  262. $cb_oschimney.width = 108
  263. $cb_oschimney.height = 20
  264. @('Enabled','Disabled') | ForEach-Object {[void] $cb_oschimney.Items.Add($_)}
  265. $cb_oschimney.location = New-Object System.Drawing.Point(194,63)
  266. $cb_oschimney.Font = New-Object System.Drawing.Font('Calibri',9)
  267. $cb_oschimney.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  268. $cb_oschimney.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  269.  
  270. $Label13 = New-Object system.Windows.Forms.Label
  271. $Label13.text = "TaskOffload:"
  272. $Label13.AutoSize = $true
  273. $Label13.width = 25
  274. $Label13.height = 10
  275. $Label13.location = New-Object System.Drawing.Point(10,91)
  276. $Label13.Font = New-Object System.Drawing.Font('Calibri',10)
  277. $Label13.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  278.  
  279. $cb_ostaskoff = New-Object system.Windows.Forms.ComboBox
  280. $cb_ostaskoff.width = 108
  281. $cb_ostaskoff.height = 20
  282. @('Enabled','Disabled') | ForEach-Object {[void] $cb_ostaskoff.Items.Add($_)}
  283. $cb_ostaskoff.location = New-Object System.Drawing.Point(194,86)
  284. $cb_ostaskoff.Font = New-Object System.Drawing.Font('Calibri',9)
  285. $cb_ostaskoff.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  286. $cb_ostaskoff.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  287.  
  288. $cb_osntd = New-Object system.Windows.Forms.ComboBox
  289. $cb_osntd.width = 108
  290. $cb_osntd.height = 20
  291. @('Enabled','Disabled') | ForEach-Object {[void] $cb_osntd.Items.Add($_)}
  292. $cb_osntd.location = New-Object System.Drawing.Point(194,109)
  293. $cb_osntd.Font = New-Object System.Drawing.Font('Calibri',9)
  294. $cb_osntd.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  295. $cb_osntd.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  296.  
  297. $Label14 = New-Object system.Windows.Forms.Label
  298. $Label14.text = "NetworkDirect:"
  299. $Label14.AutoSize = $true
  300. $Label14.width = 25
  301. $Label14.height = 10
  302. $Label14.location = New-Object System.Drawing.Point(10,114)
  303. $Label14.Font = New-Object System.Drawing.Font('Calibri',10)
  304. $Label14.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  305.  
  306. $cb_osntdais = New-Object system.Windows.Forms.ComboBox
  307. $cb_osntdais.width = 108
  308. $cb_osntdais.height = 20
  309. @('Blocked','Allowed') | ForEach-Object {[void] $cb_osntdais.Items.Add($_)}
  310. $cb_osntdais.location = New-Object System.Drawing.Point(194,132)
  311. $cb_osntdais.Font = New-Object System.Drawing.Font('Calibri',9)
  312. $cb_osntdais.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  313. $cb_osntdais.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  314.  
  315. $Label15 = New-Object system.Windows.Forms.Label
  316. $Label15.text = "NetworkDirectAcrossIPSubnets:"
  317. $Label15.AutoSize = $true
  318. $Label15.width = 25
  319. $Label15.height = 10
  320. $Label15.location = New-Object System.Drawing.Point(10,137)
  321. $Label15.Font = New-Object System.Drawing.Font('Calibri',10)
  322. $Label15.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  323.  
  324. $cb_ospcf = New-Object system.Windows.Forms.ComboBox
  325. $cb_ospcf.width = 108
  326. $cb_ospcf.height = 20
  327. @('Enabled','Disabled') | ForEach-Object {[void] $cb_ospcf.Items.Add($_)}
  328. $cb_ospcf.location = New-Object System.Drawing.Point(194,156)
  329. $cb_ospcf.Font = New-Object System.Drawing.Font('Calibri',9)
  330. $cb_ospcf.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  331. $cb_ospcf.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  332.  
  333. $Label16 = New-Object system.Windows.Forms.Label
  334. $Label16.text = "PacketCoalescingFilter:"
  335. $Label16.AutoSize = $true
  336. $Label16.width = 25
  337. $Label16.height = 10
  338. $Label16.location = New-Object System.Drawing.Point(10,161)
  339. $Label16.Font = New-Object System.Drawing.Font('Calibri',10)
  340. $Label16.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  341.  
  342. $btn_applyglobal = New-Object system.Windows.Forms.Button
  343. $btn_applyglobal.text = "Apply"
  344. $btn_applyglobal.width = 60
  345. $btn_applyglobal.height = 21
  346. $btn_applyglobal.location = New-Object System.Drawing.Point(251,286)
  347. $btn_applyglobal.Font = New-Object System.Drawing.Font('Calibri',10)
  348. $btn_applyglobal.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  349.  
  350. $Groupbox3 = New-Object system.Windows.Forms.Groupbox
  351. $Groupbox3.height = 584
  352. $Groupbox3.width = 399
  353. $Groupbox3.text = "Adv. Adapter"
  354. $Groupbox3.location = New-Object System.Drawing.Point(570,93)
  355.  
  356. $Label17 = New-Object system.Windows.Forms.Label
  357. $Label17.text = "FlowControl:"
  358. $Label17.AutoSize = $true
  359. $Label17.width = 25
  360. $Label17.height = 10
  361. $Label17.location = New-Object System.Drawing.Point(9,20)
  362. $Label17.Font = New-Object System.Drawing.Font('Calibri',10)
  363. $Label17.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  364.  
  365. $cb_flowcontrol = New-Object system.Windows.Forms.ComboBox
  366. $cb_flowcontrol.width = 190
  367. $cb_flowcontrol.height = 20
  368. @('0 - Disabled','1 - Tx Enabled','2 - Rx Enabled','3 - Rx and Tx Enabled') | ForEach-Object {[void] $cb_flowcontrol.Items.Add($_)}
  369. $cb_flowcontrol.location = New-Object System.Drawing.Point(193,17)
  370. $cb_flowcontrol.Font = New-Object System.Drawing.Font('Calibri',9)
  371. $cb_flowcontrol.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  372. $cb_flowcontrol.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  373.  
  374. $Label18 = New-Object system.Windows.Forms.Label
  375. $Label18.text = "IPChecksumOffloadIPv4:"
  376. $Label18.AutoSize = $true
  377. $Label18.width = 25
  378. $Label18.height = 10
  379. $Label18.location = New-Object System.Drawing.Point(9,42)
  380. $Label18.Font = New-Object System.Drawing.Font('Calibri',10)
  381. $Label18.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  382.  
  383. $Label19 = New-Object system.Windows.Forms.Label
  384. $Label19.text = "TCPChecksumOffloadIPv4:"
  385. $Label19.AutoSize = $true
  386. $Label19.width = 25
  387. $Label19.height = 10
  388. $Label19.location = New-Object System.Drawing.Point(9,64)
  389. $Label19.Font = New-Object System.Drawing.Font('Calibri',10)
  390. $Label19.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  391.  
  392. $Label20 = New-Object system.Windows.Forms.Label
  393. $Label20.text = "TCPChecksumOffloadIPv6:"
  394. $Label20.AutoSize = $true
  395. $Label20.width = 25
  396. $Label20.height = 10
  397. $Label20.location = New-Object System.Drawing.Point(9,86)
  398. $Label20.Font = New-Object System.Drawing.Font('Calibri',10)
  399. $Label20.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  400.  
  401. $Label21 = New-Object system.Windows.Forms.Label
  402. $Label21.text = "UDPChecksumOffloadIPv4:"
  403. $Label21.AutoSize = $true
  404. $Label21.width = 25
  405. $Label21.height = 10
  406. $Label21.location = New-Object System.Drawing.Point(9,108)
  407. $Label21.Font = New-Object System.Drawing.Font('Calibri',10)
  408. $Label21.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  409.  
  410. $Label22 = New-Object system.Windows.Forms.Label
  411. $Label22.text = "UDPChecksumOffloadIPv6:"
  412. $Label22.AutoSize = $true
  413. $Label22.width = 25
  414. $Label22.height = 10
  415. $Label22.location = New-Object System.Drawing.Point(9,130)
  416. $Label22.Font = New-Object System.Drawing.Font('Calibri',10)
  417. $Label22.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  418.  
  419. $Label23 = New-Object system.Windows.Forms.Label
  420. $Label23.text = "InterruptModeration:"
  421. $Label23.AutoSize = $true
  422. $Label23.width = 25
  423. $Label23.height = 10
  424. $Label23.location = New-Object System.Drawing.Point(9,324)
  425. $Label23.Font = New-Object System.Drawing.Font('Calibri',10)
  426. $Label23.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  427.  
  428. $cb_InterruptModeration = New-Object system.Windows.Forms.ComboBox
  429. $cb_InterruptModeration.width = 190
  430. $cb_InterruptModeration.height = 20
  431. @('0 - Disabled','1 - Enabled') | ForEach-Object {[void] $cb_InterruptModeration.Items.Add($_)}
  432. $cb_InterruptModeration.location = New-Object System.Drawing.Point(193,321)
  433. $cb_InterruptModeration.Font = New-Object System.Drawing.Font('Calibri',9)
  434. $cb_InterruptModeration.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  435. $cb_InterruptModeration.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  436.  
  437. $btn_applyadv = New-Object system.Windows.Forms.Button
  438. $btn_applyadv.text = "Apply"
  439. $btn_applyadv.width = 60
  440. $btn_applyadv.height = 21
  441. $btn_applyadv.location = New-Object System.Drawing.Point(570,682)
  442. $btn_applyadv.Font = New-Object System.Drawing.Font('Calibri',10)
  443. $btn_applyadv.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  444.  
  445. $btn_adaptrest = New-Object system.Windows.Forms.Button
  446. $btn_adaptrest.text = "Restart Adapter"
  447. $btn_adaptrest.width = 112
  448. $btn_adaptrest.height = 20
  449. $btn_adaptrest.location = New-Object System.Drawing.Point(511,16)
  450. $btn_adaptrest.Font = New-Object System.Drawing.Font('Calibri',10)
  451. $btn_adaptrest.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#d0021b")
  452.  
  453. $cb_IPChecksumOffloadIPv4 = New-Object system.Windows.Forms.ComboBox
  454. $cb_IPChecksumOffloadIPv4.width = 190
  455. $cb_IPChecksumOffloadIPv4.height = 20
  456. @('0 - Disabled','1 - Tx Enabled','2 - Rx Enabled','3 - Rx and Tx Enabled') | ForEach-Object {[void] $cb_IPChecksumOffloadIPv4.Items.Add($_)}
  457. $cb_IPChecksumOffloadIPv4.location = New-Object System.Drawing.Point(193,39)
  458. $cb_IPChecksumOffloadIPv4.Font = New-Object System.Drawing.Font('Calibri',9)
  459. $cb_IPChecksumOffloadIPv4.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  460. $cb_IPChecksumOffloadIPv4.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  461.  
  462. $cb_TCPChecksumOffloadIPv4 = New-Object system.Windows.Forms.ComboBox
  463. $cb_TCPChecksumOffloadIPv4.width = 190
  464. $cb_TCPChecksumOffloadIPv4.height = 20
  465. @('0 - Disabled','1 - Tx Enabled','2 - Rx Enabled','3 - Rx and Tx Enabled') | ForEach-Object {[void] $cb_TCPChecksumOffloadIPv4.Items.Add($_)}
  466. $cb_TCPChecksumOffloadIPv4.location = New-Object System.Drawing.Point(193,61)
  467. $cb_TCPChecksumOffloadIPv4.Font = New-Object System.Drawing.Font('Calibri',9)
  468. $cb_TCPChecksumOffloadIPv4.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  469. $cb_TCPChecksumOffloadIPv4.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  470.  
  471. $cb_TCPChecksumOffloadIPv6 = New-Object system.Windows.Forms.ComboBox
  472. $cb_TCPChecksumOffloadIPv6.width = 190
  473. $cb_TCPChecksumOffloadIPv6.height = 20
  474. @('0 - Disabled','1 - Tx Enabled','2 - Rx Enabled','3 - Rx and Tx Enabled') | ForEach-Object {[void] $cb_TCPChecksumOffloadIPv6.Items.Add($_)}
  475. $cb_TCPChecksumOffloadIPv6.location = New-Object System.Drawing.Point(193,83)
  476. $cb_TCPChecksumOffloadIPv6.Font = New-Object System.Drawing.Font('Calibri',9)
  477. $cb_TCPChecksumOffloadIPv6.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  478. $cb_TCPChecksumOffloadIPv6.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  479.  
  480. $cb_UDPChecksumOffloadIPv4 = New-Object system.Windows.Forms.ComboBox
  481. $cb_UDPChecksumOffloadIPv4.width = 190
  482. $cb_UDPChecksumOffloadIPv4.height = 20
  483. @('0 - Disabled','1 - Tx Enabled','2 - Rx Enabled','3 - Rx and Tx Enabled') | ForEach-Object {[void] $cb_UDPChecksumOffloadIPv4.Items.Add($_)}
  484. $cb_UDPChecksumOffloadIPv4.location = New-Object System.Drawing.Point(193,105)
  485. $cb_UDPChecksumOffloadIPv4.Font = New-Object System.Drawing.Font('Calibri',9)
  486. $cb_UDPChecksumOffloadIPv4.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  487. $cb_UDPChecksumOffloadIPv4.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  488.  
  489. $cb_UDPChecksumOffloadIPv6 = New-Object system.Windows.Forms.ComboBox
  490. $cb_UDPChecksumOffloadIPv6.width = 190
  491. $cb_UDPChecksumOffloadIPv6.height = 20
  492. @('0 - Disabled','1 - Tx Enabled','2 - Rx Enabled','3 - Rx and Tx Enabled') | ForEach-Object {[void] $cb_UDPChecksumOffloadIPv6.Items.Add($_)}
  493. $cb_UDPChecksumOffloadIPv6.location = New-Object System.Drawing.Point(193,127)
  494. $cb_UDPChecksumOffloadIPv6.Font = New-Object System.Drawing.Font('Calibri',9)
  495. $cb_UDPChecksumOffloadIPv6.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  496. $cb_UDPChecksumOffloadIPv6.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  497.  
  498. $Label24 = New-Object system.Windows.Forms.Label
  499. $Label24.text = "InterruptModerationRate:"
  500. $Label24.AutoSize = $true
  501. $Label24.width = 25
  502. $Label24.height = 10
  503. $Label24.location = New-Object System.Drawing.Point(9,346)
  504. $Label24.Font = New-Object System.Drawing.Font('Calibri',10)
  505. $Label24.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  506.  
  507. $cb_InterruptModerationRate = New-Object system.Windows.Forms.ComboBox
  508. $cb_InterruptModerationRate.width = 190
  509. $cb_InterruptModerationRate.height = 20
  510. @('0 - Disabled','200 - Minimal','400 - Low','950 - Medium','2000 - High','3600 - Extreme','65535 - Adaptive') | ForEach-Object {[void] $cb_InterruptModerationRate.Items.Add($_)}
  511. $cb_InterruptModerationRate.location = New-Object System.Drawing.Point(193,343)
  512. $cb_InterruptModerationRate.Font = New-Object System.Drawing.Font('Calibri',9)
  513. $cb_InterruptModerationRate.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  514. $cb_InterruptModerationRate.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  515.  
  516. $Label25 = New-Object system.Windows.Forms.Label
  517. $Label25.text = "LsoV2IPv4"
  518. $Label25.AutoSize = $true
  519. $Label25.width = 25
  520. $Label25.height = 10
  521. $Label25.location = New-Object System.Drawing.Point(9,174)
  522. $Label25.Font = New-Object System.Drawing.Font('Calibri',10)
  523. $Label25.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  524.  
  525. $Label26 = New-Object system.Windows.Forms.Label
  526. $Label26.text = "LsoV2IPv6"
  527. $Label26.AutoSize = $true
  528. $Label26.width = 25
  529. $Label26.height = 10
  530. $Label26.location = New-Object System.Drawing.Point(9,196)
  531. $Label26.Font = New-Object System.Drawing.Font('Calibri',10)
  532. $Label26.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  533.  
  534. $cb_LsoV2IPv4 = New-Object system.Windows.Forms.ComboBox
  535. $cb_LsoV2IPv4.width = 190
  536. $cb_LsoV2IPv4.height = 20
  537. @('0 - Disabled','1 - Enabled') | ForEach-Object {[void] $cb_LsoV2IPv4.Items.Add($_)}
  538. $cb_LsoV2IPv4.location = New-Object System.Drawing.Point(193,171)
  539. $cb_LsoV2IPv4.Font = New-Object System.Drawing.Font('Calibri',9)
  540. $cb_LsoV2IPv4.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  541. $cb_LsoV2IPv4.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  542.  
  543. $cb_LsoV2IPv6 = New-Object system.Windows.Forms.ComboBox
  544. $cb_LsoV2IPv6.width = 190
  545. $cb_LsoV2IPv6.height = 20
  546. @('0 - Disabled','1 - Enabled') | ForEach-Object {[void] $cb_LsoV2IPv6.Items.Add($_)}
  547. $cb_LsoV2IPv6.location = New-Object System.Drawing.Point(193,193)
  548. $cb_LsoV2IPv6.Font = New-Object System.Drawing.Font('Calibri',9)
  549. $cb_LsoV2IPv6.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  550. $cb_LsoV2IPv6.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  551.  
  552. $Label27 = New-Object system.Windows.Forms.Label
  553. $Label27.text = "LsoV1IPv4"
  554. $Label27.AutoSize = $true
  555. $Label27.width = 25
  556. $Label27.height = 10
  557. $Label27.location = New-Object System.Drawing.Point(9,152)
  558. $Label27.Font = New-Object System.Drawing.Font('Calibri',10)
  559. $Label27.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  560.  
  561. $cb_LsoV1IPv4 = New-Object system.Windows.Forms.ComboBox
  562. $cb_LsoV1IPv4.width = 190
  563. $cb_LsoV1IPv4.height = 20
  564. @('0 - Disabled','1 - Enabled') | ForEach-Object {[void] $cb_LsoV1IPv4.Items.Add($_)}
  565. $cb_LsoV1IPv4.location = New-Object System.Drawing.Point(193,149)
  566. $cb_LsoV1IPv4.Font = New-Object System.Drawing.Font('Calibri',9)
  567. $cb_LsoV1IPv4.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  568. $cb_LsoV1IPv4.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  569.  
  570. $Label28 = New-Object system.Windows.Forms.Label
  571. $Label28.text = "PMNSOffload"
  572. $Label28.AutoSize = $true
  573. $Label28.width = 25
  574. $Label28.height = 10
  575. $Label28.location = New-Object System.Drawing.Point(9,238)
  576. $Label28.Font = New-Object System.Drawing.Font('Calibri',10)
  577. $Label28.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  578.  
  579. $cb_PMNSOffload = New-Object system.Windows.Forms.ComboBox
  580. $cb_PMNSOffload.width = 190
  581. $cb_PMNSOffload.height = 20
  582. @('0 - Disabled','1 - Enabled') | ForEach-Object {[void] $cb_PMNSOffload.Items.Add($_)}
  583. $cb_PMNSOffload.location = New-Object System.Drawing.Point(193,235)
  584. $cb_PMNSOffload.Font = New-Object System.Drawing.Font('Calibri',9)
  585. $cb_PMNSOffload.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  586. $cb_PMNSOffload.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  587.  
  588. $Label29 = New-Object system.Windows.Forms.Label
  589. $Label29.text = "PMARPOffload"
  590. $Label29.AutoSize = $true
  591. $Label29.width = 25
  592. $Label29.height = 10
  593. $Label29.location = New-Object System.Drawing.Point(9,216)
  594. $Label29.Font = New-Object System.Drawing.Font('Calibri',10)
  595. $Label29.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  596.  
  597. $cb_PMARPOffload = New-Object system.Windows.Forms.ComboBox
  598. $cb_PMARPOffload.width = 190
  599. $cb_PMARPOffload.height = 20
  600. @('0 - Disabled','1 - Enabled') | ForEach-Object {[void] $cb_PMARPOffload.Items.Add($_)}
  601. $cb_PMARPOffload.location = New-Object System.Drawing.Point(193,213)
  602. $cb_PMARPOffload.Font = New-Object System.Drawing.Font('Calibri',9)
  603. $cb_PMARPOffload.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  604. $cb_PMARPOffload.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  605.  
  606. $cb_PriorityVLANTag = New-Object system.Windows.Forms.ComboBox
  607. $cb_PriorityVLANTag.width = 190
  608. $cb_PriorityVLANTag.height = 20
  609. @('0 - Paketpriorität and VLAN disabled','1 - Paketpriorität enabled','2 - VLAN enabled','3 - Paketpriorität and VLAN enabled') | ForEach-Object {[void] $cb_PriorityVLANTag.Items.Add($_)}
  610. $cb_PriorityVLANTag.location = New-Object System.Drawing.Point(193,256)
  611. $cb_PriorityVLANTag.Font = New-Object System.Drawing.Font('Calibri',9)
  612. $cb_PriorityVLANTag.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  613. $cb_PriorityVLANTag.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  614.  
  615. $Label00 = New-Object system.Windows.Forms.Label
  616. $Label00.text = "PriorityVLANTag"
  617. $Label00.AutoSize = $true
  618. $Label00.width = 25
  619. $Label00.height = 10
  620. $Label00.location = New-Object System.Drawing.Point(9,259)
  621. $Label00.Font = New-Object System.Drawing.Font('Calibri',10)
  622. $Label00.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  623.  
  624. $Label30 = New-Object system.Windows.Forms.Label
  625. $Label30.text = "ReceiveBuffers"
  626. $Label30.AutoSize = $true
  627. $Label30.width = 25
  628. $Label30.height = 10
  629. $Label30.location = New-Object System.Drawing.Point(9,281)
  630. $Label30.Font = New-Object System.Drawing.Font('Calibri',10)
  631. $Label30.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  632.  
  633. $cb_ReceiveBuffers = New-Object system.Windows.Forms.ComboBox
  634. $cb_ReceiveBuffers.width = 190
  635. $cb_ReceiveBuffers.height = 20
  636. $cb_ReceiveBuffers.location = New-Object System.Drawing.Point(193,278)
  637. $cb_ReceiveBuffers.Font = New-Object System.Drawing.Font('Calibri',9)
  638. $cb_ReceiveBuffers.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  639. $cb_ReceiveBuffers.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  640.  
  641. $Label31 = New-Object system.Windows.Forms.Label
  642. $Label31.text = "TransmitBuffers"
  643. $Label31.AutoSize = $true
  644. $Label31.width = 25
  645. $Label31.height = 10
  646. $Label31.location = New-Object System.Drawing.Point(9,303)
  647. $Label31.Font = New-Object System.Drawing.Font('Calibri',10)
  648. $Label31.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  649.  
  650. $cb_TransmitBuffers = New-Object system.Windows.Forms.ComboBox
  651. $cb_TransmitBuffers.width = 190
  652. $cb_TransmitBuffers.height = 20
  653. $cb_TransmitBuffers.location = New-Object System.Drawing.Point(193,300)
  654. $cb_TransmitBuffers.Font = New-Object System.Drawing.Font('Calibri',9)
  655. $cb_TransmitBuffers.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  656. $cb_TransmitBuffers.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  657.  
  658. $Groupbox5 = New-Object system.Windows.Forms.Groupbox
  659. $Groupbox5.height = 66
  660. $Groupbox5.width = 230
  661. $Groupbox5.text = "RSS Global"
  662. $Groupbox5.location = New-Object System.Drawing.Point(10,369)
  663.  
  664. $Label32 = New-Object system.Windows.Forms.Label
  665. $Label32.text = "TCP/IP_RssBaseCpu:"
  666. $Label32.AutoSize = $true
  667. $Label32.width = 25
  668. $Label32.height = 10
  669. $Label32.location = New-Object System.Drawing.Point(7,16)
  670. $Label32.Font = New-Object System.Drawing.Font('Calibri',10)
  671. $Label32.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  672.  
  673. $Label33 = New-Object system.Windows.Forms.Label
  674. $Label33.text = "NDIS_RssBaseCpu:"
  675. $Label33.AutoSize = $true
  676. $Label33.width = 25
  677. $Label33.height = 10
  678. $Label33.location = New-Object System.Drawing.Point(7,40)
  679. $Label33.Font = New-Object System.Drawing.Font('Calibri',10)
  680. $Label33.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  681.  
  682. $cb_tcpiprssbasecpu = New-Object system.Windows.Forms.TextBox
  683. $cb_tcpiprssbasecpu.multiline = $false
  684. $cb_tcpiprssbasecpu.width = 89
  685. $cb_tcpiprssbasecpu.height = 20
  686. $cb_tcpiprssbasecpu.location = New-Object System.Drawing.Point(133,14)
  687. $cb_tcpiprssbasecpu.Font = New-Object System.Drawing.Font('Calibri',10)
  688. $cb_tcpiprssbasecpu.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  689. $cb_tcpiprssbasecpu.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  690.  
  691. $cb_ndisrssbasecpu = New-Object system.Windows.Forms.TextBox
  692. $cb_ndisrssbasecpu.multiline = $false
  693. $cb_ndisrssbasecpu.width = 89
  694. $cb_ndisrssbasecpu.height = 20
  695. $cb_ndisrssbasecpu.location = New-Object System.Drawing.Point(133,38)
  696. $cb_ndisrssbasecpu.Font = New-Object System.Drawing.Font('Calibri',10)
  697. $cb_ndisrssbasecpu.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  698. $cb_ndisrssbasecpu.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  699.  
  700. $Groupbox4 = New-Object system.Windows.Forms.Groupbox
  701. $Groupbox4.height = 173
  702. $Groupbox4.width = 321
  703. $Groupbox4.text = "PowerSaving Settings"
  704. $Groupbox4.location = New-Object System.Drawing.Point(570,715)
  705.  
  706. $Label34 = New-Object system.Windows.Forms.Label
  707. $Label34.text = "(APM) sleep states:"
  708. $Label34.AutoSize = $true
  709. $Label34.width = 25
  710. $Label34.height = 10
  711. $Label34.location = New-Object System.Drawing.Point(8,18)
  712. $Label34.Font = New-Object System.Drawing.Font('Calibri',10)
  713. $Label34.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  714.  
  715. $cb_EnablePME = New-Object system.Windows.Forms.ComboBox
  716. $cb_EnablePME.width = 108
  717. $cb_EnablePME.height = 20
  718. @('Disabled','Enabled') | ForEach-Object {[void] $cb_EnablePME.Items.Add($_)}
  719. $cb_EnablePME.location = New-Object System.Drawing.Point(204,15)
  720. $cb_EnablePME.Font = New-Object System.Drawing.Font('Calibri',9)
  721. $cb_EnablePME.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  722. $cb_EnablePME.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  723.  
  724. $btn_applypowersettings = New-Object system.Windows.Forms.Button
  725. $btn_applypowersettings.text = "Apply"
  726. $btn_applypowersettings.width = 60
  727. $btn_applypowersettings.height = 21
  728. $btn_applypowersettings.location = New-Object System.Drawing.Point(570,893)
  729. $btn_applypowersettings.Font = New-Object System.Drawing.Font('Calibri',10)
  730. $btn_applypowersettings.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  731.  
  732. $Label36 = New-Object system.Windows.Forms.Label
  733. $Label36.text = "DynamicPowerGating:"
  734. $Label36.AutoSize = $true
  735. $Label36.width = 25
  736. $Label36.height = 10
  737. $Label36.location = New-Object System.Drawing.Point(8,40)
  738. $Label36.Font = New-Object System.Drawing.Font('Calibri',10)
  739. $Label36.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  740.  
  741. $cb_EnableDynamicPowerGating = New-Object system.Windows.Forms.ComboBox
  742. $cb_EnableDynamicPowerGating.width = 108
  743. $cb_EnableDynamicPowerGating.height = 20
  744. @('Disabled','Enabled') | ForEach-Object {[void] $cb_EnableDynamicPowerGating.Items.Add($_)}
  745. $cb_EnableDynamicPowerGating.location = New-Object System.Drawing.Point(204,37)
  746. $cb_EnableDynamicPowerGating.Font = New-Object System.Drawing.Font('Calibri',9)
  747. $cb_EnableDynamicPowerGating.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  748. $cb_EnableDynamicPowerGating.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  749.  
  750. $Label37 = New-Object system.Windows.Forms.Label
  751. $Label37.text = "ConnectedPowerGating:"
  752. $Label37.AutoSize = $true
  753. $Label37.width = 25
  754. $Label37.height = 10
  755. $Label37.location = New-Object System.Drawing.Point(8,62)
  756. $Label37.Font = New-Object System.Drawing.Font('Calibri',10)
  757. $Label37.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  758.  
  759. $cb_EnableConnectedPowerGating = New-Object system.Windows.Forms.ComboBox
  760. $cb_EnableConnectedPowerGating.width = 108
  761. $cb_EnableConnectedPowerGating.height = 20
  762. @('Disabled','Enabled') | ForEach-Object {[void] $cb_EnableConnectedPowerGating.Items.Add($_)}
  763. $cb_EnableConnectedPowerGating.location = New-Object System.Drawing.Point(204,59)
  764. $cb_EnableConnectedPowerGating.Font = New-Object System.Drawing.Font('Calibri',9)
  765. $cb_EnableConnectedPowerGating.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  766. $cb_EnableConnectedPowerGating.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  767.  
  768. $Label38 = New-Object system.Windows.Forms.Label
  769. $Label38.text = "AutoPowerSaveMode:"
  770. $Label38.AutoSize = $true
  771. $Label38.width = 25
  772. $Label38.height = 10
  773. $Label38.location = New-Object System.Drawing.Point(8,84)
  774. $Label38.Font = New-Object System.Drawing.Font('Calibri',10)
  775. $Label38.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  776.  
  777. $cb_AutoPowerSaveModeEnabled = New-Object system.Windows.Forms.ComboBox
  778. $cb_AutoPowerSaveModeEnabled.width = 108
  779. $cb_AutoPowerSaveModeEnabled.height = 20
  780. @('Disabled','Enabled') | ForEach-Object {[void] $cb_AutoPowerSaveModeEnabled.Items.Add($_)}
  781. $cb_AutoPowerSaveModeEnabled.location = New-Object System.Drawing.Point(204,81)
  782. $cb_AutoPowerSaveModeEnabled.Font = New-Object System.Drawing.Font('Calibri',9)
  783. $cb_AutoPowerSaveModeEnabled.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  784. $cb_AutoPowerSaveModeEnabled.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  785.  
  786. $cb_NicAutoPowerSaver = New-Object system.Windows.Forms.ComboBox
  787. $cb_NicAutoPowerSaver.width = 108
  788. $cb_NicAutoPowerSaver.height = 20
  789. @('Disabled','Enabled') | ForEach-Object {[void] $cb_NicAutoPowerSaver.Items.Add($_)}
  790. $cb_NicAutoPowerSaver.location = New-Object System.Drawing.Point(204,103)
  791. $cb_NicAutoPowerSaver.Font = New-Object System.Drawing.Font('Calibri',9)
  792. $cb_NicAutoPowerSaver.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  793. $cb_NicAutoPowerSaver.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  794.  
  795. $Label39 = New-Object system.Windows.Forms.Label
  796. $Label39.text = "NicAutoPowerSaver:"
  797. $Label39.AutoSize = $true
  798. $Label39.width = 25
  799. $Label39.height = 10
  800. $Label39.location = New-Object System.Drawing.Point(9,106)
  801. $Label39.Font = New-Object System.Drawing.Font('Calibri',10)
  802. $Label39.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  803.  
  804. $Label40 = New-Object system.Windows.Forms.Label
  805. $Label40.text = "DelayedPowerUp:"
  806. $Label40.AutoSize = $true
  807. $Label40.width = 25
  808. $Label40.height = 10
  809. $Label40.location = New-Object System.Drawing.Point(9,128)
  810. $Label40.Font = New-Object System.Drawing.Font('Calibri',10)
  811. $Label40.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  812.  
  813. $cb_DisableDelayedPowerUp = New-Object system.Windows.Forms.ComboBox
  814. $cb_DisableDelayedPowerUp.width = 108
  815. $cb_DisableDelayedPowerUp.height = 20
  816. @('Enabled','Disabled') | ForEach-Object {[void] $cb_DisableDelayedPowerUp.Items.Add($_)}
  817. $cb_DisableDelayedPowerUp.location = New-Object System.Drawing.Point(204,125)
  818. $cb_DisableDelayedPowerUp.Font = New-Object System.Drawing.Font('Calibri',9)
  819. $cb_DisableDelayedPowerUp.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  820. $cb_DisableDelayedPowerUp.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  821.  
  822. $Label41 = New-Object system.Windows.Forms.Label
  823. $Label41.text = "ReduceSpeedOnPowerDown:"
  824. $Label41.AutoSize = $true
  825. $Label41.width = 25
  826. $Label41.height = 10
  827. $Label41.location = New-Object System.Drawing.Point(9,150)
  828. $Label41.Font = New-Object System.Drawing.Font('Calibri',10)
  829. $Label41.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  830.  
  831. $cb_ReduceSpeedOnPowerDown = New-Object system.Windows.Forms.ComboBox
  832. $cb_ReduceSpeedOnPowerDown.width = 108
  833. $cb_ReduceSpeedOnPowerDown.height = 20
  834. @('Disabled','Enabled') | ForEach-Object {[void] $cb_ReduceSpeedOnPowerDown.Items.Add($_)}
  835. $cb_ReduceSpeedOnPowerDown.location = New-Object System.Drawing.Point(204,147)
  836. $cb_ReduceSpeedOnPowerDown.Font = New-Object System.Drawing.Font('Calibri',9)
  837. $cb_ReduceSpeedOnPowerDown.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  838. $cb_ReduceSpeedOnPowerDown.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  839.  
  840. $Label35 = New-Object system.Windows.Forms.Label
  841. $Label35.text = "DisablePortScaling:"
  842. $Label35.AutoSize = $true
  843. $Label35.width = 25
  844. $Label35.height = 10
  845. $Label35.location = New-Object System.Drawing.Point(5,162)
  846. $Label35.Font = New-Object System.Drawing.Font('Calibri',10)
  847. $Label35.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  848.  
  849. $cb_DisablePortScaling = New-Object system.Windows.Forms.ComboBox
  850. $cb_DisablePortScaling.width = 108
  851. $cb_DisablePortScaling.height = 20
  852. @('Disabled','Enabled') | ForEach-Object {[void] $cb_DisablePortScaling.Items.Add($_)}
  853. $cb_DisablePortScaling.location = New-Object System.Drawing.Point(117,160)
  854. $cb_DisablePortScaling.Font = New-Object System.Drawing.Font('Calibri',9)
  855. $cb_DisablePortScaling.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  856. $cb_DisablePortScaling.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  857.  
  858. $Label42 = New-Object system.Windows.Forms.Label
  859. $Label42.text = "ManyCoreScaling:"
  860. $Label42.AutoSize = $true
  861. $Label42.width = 25
  862. $Label42.height = 10
  863. $Label42.location = New-Object System.Drawing.Point(5,186)
  864. $Label42.Font = New-Object System.Drawing.Font('Calibri',10)
  865. $Label42.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  866.  
  867. $cb_ManyCoreScaling = New-Object system.Windows.Forms.ComboBox
  868. $cb_ManyCoreScaling.width = 108
  869. $cb_ManyCoreScaling.height = 20
  870. @('Disabled','Enabled') | ForEach-Object {[void] $cb_ManyCoreScaling.Items.Add($_)}
  871. $cb_ManyCoreScaling.location = New-Object System.Drawing.Point(117,184)
  872. $cb_ManyCoreScaling.Font = New-Object System.Drawing.Font('Calibri',9)
  873. $cb_ManyCoreScaling.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  874. $cb_ManyCoreScaling.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  875.  
  876. $Groupbox7 = New-Object system.Windows.Forms.Groupbox
  877. $Groupbox7.height = 576
  878. $Groupbox7.width = 312
  879. $Groupbox7.text = "Interface Settings"
  880. $Groupbox7.location = New-Object System.Drawing.Point(252,314)
  881.  
  882. $Label44 = New-Object system.Windows.Forms.Label
  883. $Label44.text = "AdvertiseDefaultRoute:"
  884. $Label44.AutoSize = $true
  885. $Label44.width = 25
  886. $Label44.height = 10
  887. $Label44.location = New-Object System.Drawing.Point(10,40)
  888. $Label44.Font = New-Object System.Drawing.Font('Calibri',10)
  889. $Label44.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  890.  
  891. $cb_AdvertiseDefaultRoute = New-Object system.Windows.Forms.ComboBox
  892. $cb_AdvertiseDefaultRoute.width = 108
  893. $cb_AdvertiseDefaultRoute.height = 20
  894. $cb_AdvertiseDefaultRoute.location = New-Object System.Drawing.Point(194,37)
  895. $cb_AdvertiseDefaultRoute.Font = New-Object System.Drawing.Font('Calibri',9)
  896. $cb_AdvertiseDefaultRoute.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  897. $cb_AdvertiseDefaultRoute.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  898.  
  899. $Label45 = New-Object system.Windows.Forms.Label
  900. $Label45.text = "Advertising:"
  901. $Label45.AutoSize = $true
  902. $Label45.width = 25
  903. $Label45.height = 10
  904. $Label45.location = New-Object System.Drawing.Point(10,62)
  905. $Label45.Font = New-Object System.Drawing.Font('Calibri',10)
  906. $Label45.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  907.  
  908. $cb_Advertising = New-Object system.Windows.Forms.ComboBox
  909. $cb_Advertising.width = 108
  910. $cb_Advertising.height = 20
  911. $cb_Advertising.location = New-Object System.Drawing.Point(194,59)
  912. $cb_Advertising.Font = New-Object System.Drawing.Font('Calibri',9)
  913. $cb_Advertising.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  914. $cb_Advertising.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  915.  
  916. $Label46 = New-Object system.Windows.Forms.Label
  917. $Label46.text = "AutomaticMetric:"
  918. $Label46.AutoSize = $true
  919. $Label46.width = 25
  920. $Label46.height = 10
  921. $Label46.location = New-Object System.Drawing.Point(10,84)
  922. $Label46.Font = New-Object System.Drawing.Font('Calibri',10)
  923. $Label46.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  924.  
  925. $cb_AutomaticMetric = New-Object system.Windows.Forms.ComboBox
  926. $cb_AutomaticMetric.width = 108
  927. $cb_AutomaticMetric.height = 20
  928. $cb_AutomaticMetric.location = New-Object System.Drawing.Point(194,81)
  929. $cb_AutomaticMetric.Font = New-Object System.Drawing.Font('Calibri',9)
  930. $cb_AutomaticMetric.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  931. $cb_AutomaticMetric.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  932.  
  933. $cb_ClampMss = New-Object system.Windows.Forms.ComboBox
  934. $cb_ClampMss.width = 108
  935. $cb_ClampMss.height = 20
  936. $cb_ClampMss.location = New-Object System.Drawing.Point(194,103)
  937. $cb_ClampMss.Font = New-Object System.Drawing.Font('Calibri',9)
  938. $cb_ClampMss.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  939. $cb_ClampMss.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  940.  
  941. $Label47 = New-Object system.Windows.Forms.Label
  942. $Label47.text = "ClampMss:"
  943. $Label47.AutoSize = $true
  944. $Label47.width = 25
  945. $Label47.height = 10
  946. $Label47.location = New-Object System.Drawing.Point(10,106)
  947. $Label47.Font = New-Object System.Drawing.Font('Calibri',10)
  948. $Label47.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  949.  
  950. $cb_DirectedMacWolPattern = New-Object system.Windows.Forms.ComboBox
  951. $cb_DirectedMacWolPattern.width = 108
  952. $cb_DirectedMacWolPattern.height = 20
  953. $cb_DirectedMacWolPattern.location = New-Object System.Drawing.Point(194,125)
  954. $cb_DirectedMacWolPattern.Font = New-Object System.Drawing.Font('Calibri',9)
  955. $cb_DirectedMacWolPattern.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  956. $cb_DirectedMacWolPattern.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  957.  
  958. $Label48 = New-Object system.Windows.Forms.Label
  959. $Label48.text = "DirectedMacWolPattern:"
  960. $Label48.AutoSize = $true
  961. $Label48.width = 25
  962. $Label48.height = 10
  963. $Label48.location = New-Object System.Drawing.Point(10,128)
  964. $Label48.Font = New-Object System.Drawing.Font('Calibri',10)
  965. $Label48.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  966.  
  967. $Label49 = New-Object system.Windows.Forms.Label
  968. $Label49.text = "EcnMarking:"
  969. $Label49.AutoSize = $true
  970. $Label49.width = 25
  971. $Label49.height = 10
  972. $Label49.location = New-Object System.Drawing.Point(10,150)
  973. $Label49.Font = New-Object System.Drawing.Font('Calibri',10)
  974. $Label49.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  975.  
  976. $cb_EcnMarking = New-Object system.Windows.Forms.ComboBox
  977. $cb_EcnMarking.width = 108
  978. $cb_EcnMarking.height = 20
  979. $cb_EcnMarking.location = New-Object System.Drawing.Point(194,147)
  980. $cb_EcnMarking.Font = New-Object System.Drawing.Font('Calibri',9)
  981. $cb_EcnMarking.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  982. $cb_EcnMarking.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  983.  
  984. $Label50 = New-Object system.Windows.Forms.Label
  985. $Label50.text = "ForceArpNdWolPattern:"
  986. $Label50.AutoSize = $true
  987. $Label50.width = 25
  988. $Label50.height = 10
  989. $Label50.location = New-Object System.Drawing.Point(10,172)
  990. $Label50.Font = New-Object System.Drawing.Font('Calibri',10)
  991. $Label50.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  992.  
  993. $cb_ForceArpNdWolPattern = New-Object system.Windows.Forms.ComboBox
  994. $cb_ForceArpNdWolPattern.width = 108
  995. $cb_ForceArpNdWolPattern.height = 20
  996. $cb_ForceArpNdWolPattern.location = New-Object System.Drawing.Point(194,169)
  997. $cb_ForceArpNdWolPattern.Font = New-Object System.Drawing.Font('Calibri',9)
  998. $cb_ForceArpNdWolPattern.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  999. $cb_ForceArpNdWolPattern.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1000.  
  1001. $Label51 = New-Object system.Windows.Forms.Label
  1002. $Label51.text = "Forwarding:"
  1003. $Label51.AutoSize = $true
  1004. $Label51.width = 25
  1005. $Label51.height = 10
  1006. $Label51.location = New-Object System.Drawing.Point(10,194)
  1007. $Label51.Font = New-Object System.Drawing.Font('Calibri',10)
  1008. $Label51.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1009.  
  1010. $cb_Forwarding = New-Object system.Windows.Forms.ComboBox
  1011. $cb_Forwarding.width = 108
  1012. $cb_Forwarding.height = 20
  1013. $cb_Forwarding.location = New-Object System.Drawing.Point(194,191)
  1014. $cb_Forwarding.Font = New-Object System.Drawing.Font('Calibri',9)
  1015. $cb_Forwarding.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1016. $cb_Forwarding.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1017.  
  1018. $cb_IgnoreDefaultRoutes = New-Object system.Windows.Forms.ComboBox
  1019. $cb_IgnoreDefaultRoutes.width = 108
  1020. $cb_IgnoreDefaultRoutes.height = 20
  1021. $cb_IgnoreDefaultRoutes.location = New-Object System.Drawing.Point(194,213)
  1022. $cb_IgnoreDefaultRoutes.Font = New-Object System.Drawing.Font('Calibri',9)
  1023. $cb_IgnoreDefaultRoutes.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1024. $cb_IgnoreDefaultRoutes.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1025.  
  1026. $Label52 = New-Object system.Windows.Forms.Label
  1027. $Label52.text = "IgnoreDefaultRoutes:"
  1028. $Label52.AutoSize = $true
  1029. $Label52.width = 25
  1030. $Label52.height = 10
  1031. $Label52.location = New-Object System.Drawing.Point(10,216)
  1032. $Label52.Font = New-Object System.Drawing.Font('Calibri',10)
  1033. $Label52.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1034.  
  1035. $Label53 = New-Object system.Windows.Forms.Label
  1036. $Label53.text = "ManagedAddressConfiguration:"
  1037. $Label53.AutoSize = $true
  1038. $Label53.width = 25
  1039. $Label53.height = 10
  1040. $Label53.location = New-Object System.Drawing.Point(10,238)
  1041. $Label53.Font = New-Object System.Drawing.Font('Calibri',10)
  1042. $Label53.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1043.  
  1044. $cb_ManagedAddressConfiguration = New-Object system.Windows.Forms.ComboBox
  1045. $cb_ManagedAddressConfiguration.width = 108
  1046. $cb_ManagedAddressConfiguration.height = 20
  1047. $cb_ManagedAddressConfiguration.location = New-Object System.Drawing.Point(194,235)
  1048. $cb_ManagedAddressConfiguration.Font = New-Object System.Drawing.Font('Calibri',9)
  1049. $cb_ManagedAddressConfiguration.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1050. $cb_ManagedAddressConfiguration.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1051.  
  1052. $Label54 = New-Object system.Windows.Forms.Label
  1053. $Label54.text = "NeighborDiscoverySupported:"
  1054. $Label54.AutoSize = $true
  1055. $Label54.width = 25
  1056. $Label54.height = 10
  1057. $Label54.location = New-Object System.Drawing.Point(10,260)
  1058. $Label54.Font = New-Object System.Drawing.Font('Calibri',10)
  1059. $Label54.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1060.  
  1061. $cb_NeighborDiscoverySupported = New-Object system.Windows.Forms.ComboBox
  1062. $cb_NeighborDiscoverySupported.width = 108
  1063. $cb_NeighborDiscoverySupported.height = 20
  1064. $cb_NeighborDiscoverySupported.location = New-Object System.Drawing.Point(194,257)
  1065. $cb_NeighborDiscoverySupported.Font = New-Object System.Drawing.Font('Calibri',9)
  1066. $cb_NeighborDiscoverySupported.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1067. $cb_NeighborDiscoverySupported.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1068.  
  1069. $Label55 = New-Object system.Windows.Forms.Label
  1070. $Label55.text = "NeighborUnreachDetection:"
  1071. $Label55.AutoSize = $true
  1072. $Label55.width = 25
  1073. $Label55.height = 10
  1074. $Label55.location = New-Object System.Drawing.Point(11,282)
  1075. $Label55.Font = New-Object System.Drawing.Font('Calibri',10)
  1076. $Label55.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1077.  
  1078. $cb_NeighborUnreachabilityDetection = New-Object system.Windows.Forms.ComboBox
  1079. $cb_NeighborUnreachabilityDetection.width = 108
  1080. $cb_NeighborUnreachabilityDetection.height = 20
  1081. $cb_NeighborUnreachabilityDetection.location = New-Object System.Drawing.Point(194,279)
  1082. $cb_NeighborUnreachabilityDetection.Font = New-Object System.Drawing.Font('Calibri',9)
  1083. $cb_NeighborUnreachabilityDetection.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1084. $cb_NeighborUnreachabilityDetection.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1085.  
  1086. $Label56 = New-Object system.Windows.Forms.Label
  1087. $Label56.text = "OtherStatefulConfiguration:"
  1088. $Label56.AutoSize = $true
  1089. $Label56.width = 25
  1090. $Label56.height = 10
  1091. $Label56.location = New-Object System.Drawing.Point(10,304)
  1092. $Label56.Font = New-Object System.Drawing.Font('Calibri',10)
  1093. $Label56.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1094.  
  1095. $cb_OtherStatefulConfiguration = New-Object system.Windows.Forms.ComboBox
  1096. $cb_OtherStatefulConfiguration.width = 108
  1097. $cb_OtherStatefulConfiguration.height = 20
  1098. $cb_OtherStatefulConfiguration.location = New-Object System.Drawing.Point(194,301)
  1099. $cb_OtherStatefulConfiguration.Font = New-Object System.Drawing.Font('Calibri',9)
  1100. $cb_OtherStatefulConfiguration.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1101. $cb_OtherStatefulConfiguration.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1102.  
  1103. $Label57 = New-Object system.Windows.Forms.Label
  1104. $Label57.text = "RouterDiscovery:"
  1105. $Label57.AutoSize = $true
  1106. $Label57.width = 25
  1107. $Label57.height = 10
  1108. $Label57.location = New-Object System.Drawing.Point(10,326)
  1109. $Label57.Font = New-Object System.Drawing.Font('Calibri',10)
  1110. $Label57.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1111.  
  1112. $cb_RouterDiscovery = New-Object system.Windows.Forms.ComboBox
  1113. $cb_RouterDiscovery.width = 108
  1114. $cb_RouterDiscovery.height = 20
  1115. $cb_RouterDiscovery.location = New-Object System.Drawing.Point(194,323)
  1116. $cb_RouterDiscovery.Font = New-Object System.Drawing.Font('Calibri',9)
  1117. $cb_RouterDiscovery.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1118. $cb_RouterDiscovery.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1119.  
  1120. $Label58 = New-Object system.Windows.Forms.Label
  1121. $Label58.text = "Store:"
  1122. $Label58.AutoSize = $true
  1123. $Label58.width = 25
  1124. $Label58.height = 10
  1125. $Label58.location = New-Object System.Drawing.Point(10,348)
  1126. $Label58.Font = New-Object System.Drawing.Font('Calibri',10)
  1127. $Label58.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1128.  
  1129. $cb_Store = New-Object system.Windows.Forms.ComboBox
  1130. $cb_Store.width = 108
  1131. $cb_Store.height = 20
  1132. $cb_Store.location = New-Object System.Drawing.Point(194,345)
  1133. $cb_Store.Font = New-Object System.Drawing.Font('Calibri',9)
  1134. $cb_Store.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#f5a623")
  1135. $cb_Store.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1136.  
  1137. $Label59 = New-Object system.Windows.Forms.Label
  1138. $Label59.text = "WeakHostReceive:"
  1139. $Label59.AutoSize = $true
  1140. $Label59.width = 25
  1141. $Label59.height = 10
  1142. $Label59.location = New-Object System.Drawing.Point(10,370)
  1143. $Label59.Font = New-Object System.Drawing.Font('Calibri',10)
  1144. $Label59.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1145.  
  1146. $cb_WeakHostReceive = New-Object system.Windows.Forms.ComboBox
  1147. $cb_WeakHostReceive.width = 108
  1148. $cb_WeakHostReceive.height = 20
  1149. $cb_WeakHostReceive.location = New-Object System.Drawing.Point(194,367)
  1150. $cb_WeakHostReceive.Font = New-Object System.Drawing.Font('Calibri',9)
  1151. $cb_WeakHostReceive.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1152. $cb_WeakHostReceive.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1153.  
  1154. $Label60 = New-Object system.Windows.Forms.Label
  1155. $Label60.text = "WeakHostSend:"
  1156. $Label60.AutoSize = $true
  1157. $Label60.width = 25
  1158. $Label60.height = 10
  1159. $Label60.location = New-Object System.Drawing.Point(10,392)
  1160. $Label60.Font = New-Object System.Drawing.Font('Calibri',10)
  1161. $Label60.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1162.  
  1163. $cb_WeakHostSend = New-Object system.Windows.Forms.ComboBox
  1164. $cb_WeakHostSend.width = 108
  1165. $cb_WeakHostSend.height = 20
  1166. $cb_WeakHostSend.location = New-Object System.Drawing.Point(194,389)
  1167. $cb_WeakHostSend.Font = New-Object System.Drawing.Font('Calibri',9)
  1168. $cb_WeakHostSend.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1169. $cb_WeakHostSend.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1170.  
  1171. $Label61 = New-Object system.Windows.Forms.Label
  1172. $Label61.text = "CurrentHopLimit:"
  1173. $Label61.AutoSize = $true
  1174. $Label61.width = 25
  1175. $Label61.height = 10
  1176. $Label61.location = New-Object System.Drawing.Point(10,414)
  1177. $Label61.Font = New-Object System.Drawing.Font('Calibri',10)
  1178. $Label61.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1179.  
  1180. $tb_CurrentHopLimit = New-Object system.Windows.Forms.TextBox
  1181. $tb_CurrentHopLimit.multiline = $false
  1182. $tb_CurrentHopLimit.width = 71
  1183. $tb_CurrentHopLimit.height = 20
  1184. $tb_CurrentHopLimit.location = New-Object System.Drawing.Point(195,411)
  1185. $tb_CurrentHopLimit.Font = New-Object System.Drawing.Font('Calibri',10)
  1186. $tb_CurrentHopLimit.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1187. $tb_CurrentHopLimit.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1188.  
  1189. $Label62 = New-Object system.Windows.Forms.Label
  1190. $Label62.text = "BaseReachableTime:"
  1191. $Label62.AutoSize = $true
  1192. $Label62.width = 25
  1193. $Label62.height = 10
  1194. $Label62.location = New-Object System.Drawing.Point(10,436)
  1195. $Label62.Font = New-Object System.Drawing.Font('Calibri',10)
  1196. $Label62.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1197.  
  1198. $tb_BaseReachableTime = New-Object system.Windows.Forms.TextBox
  1199. $tb_BaseReachableTime.multiline = $false
  1200. $tb_BaseReachableTime.width = 71
  1201. $tb_BaseReachableTime.height = 20
  1202. $tb_BaseReachableTime.location = New-Object System.Drawing.Point(195,433)
  1203. $tb_BaseReachableTime.Font = New-Object System.Drawing.Font('Calibri',10)
  1204. $tb_BaseReachableTime.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1205. $tb_BaseReachableTime.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1206.  
  1207. $tb_ReachableTime = New-Object system.Windows.Forms.TextBox
  1208. $tb_ReachableTime.multiline = $false
  1209. $tb_ReachableTime.width = 71
  1210. $tb_ReachableTime.height = 20
  1211. $tb_ReachableTime.location = New-Object System.Drawing.Point(195,477)
  1212. $tb_ReachableTime.Font = New-Object System.Drawing.Font('Calibri',10)
  1213. $tb_ReachableTime.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1214. $tb_ReachableTime.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1215.  
  1216. $Label63 = New-Object system.Windows.Forms.Label
  1217. $Label63.text = "ReachableTime:"
  1218. $Label63.AutoSize = $true
  1219. $Label63.width = 25
  1220. $Label63.height = 10
  1221. $Label63.location = New-Object System.Drawing.Point(10,480)
  1222. $Label63.Font = New-Object System.Drawing.Font('Calibri',10)
  1223. $Label63.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1224.  
  1225. $Label64 = New-Object system.Windows.Forms.Label
  1226. $Label64.text = "DadRetransmitTime:"
  1227. $Label64.AutoSize = $true
  1228. $Label64.width = 25
  1229. $Label64.height = 10
  1230. $Label64.location = New-Object System.Drawing.Point(10,502)
  1231. $Label64.Font = New-Object System.Drawing.Font('Calibri',10)
  1232. $Label64.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1233.  
  1234. $tb_DadRetransmitTime = New-Object system.Windows.Forms.TextBox
  1235. $tb_DadRetransmitTime.multiline = $false
  1236. $tb_DadRetransmitTime.width = 71
  1237. $tb_DadRetransmitTime.height = 20
  1238. $tb_DadRetransmitTime.location = New-Object System.Drawing.Point(195,499)
  1239. $tb_DadRetransmitTime.Font = New-Object System.Drawing.Font('Calibri',10)
  1240. $tb_DadRetransmitTime.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1241. $tb_DadRetransmitTime.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1242.  
  1243. $Label65 = New-Object system.Windows.Forms.Label
  1244. $Label65.text = "DadTransmits:"
  1245. $Label65.AutoSize = $true
  1246. $Label65.width = 25
  1247. $Label65.height = 10
  1248. $Label65.location = New-Object System.Drawing.Point(10,524)
  1249. $Label65.Font = New-Object System.Drawing.Font('Calibri',10)
  1250. $Label65.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1251.  
  1252. $tb_DadTransmits = New-Object system.Windows.Forms.TextBox
  1253. $tb_DadTransmits.multiline = $false
  1254. $tb_DadTransmits.width = 71
  1255. $tb_DadTransmits.height = 20
  1256. $tb_DadTransmits.location = New-Object System.Drawing.Point(195,521)
  1257. $tb_DadTransmits.Font = New-Object System.Drawing.Font('Calibri',10)
  1258. $tb_DadTransmits.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1259. $tb_DadTransmits.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1260.  
  1261. $Label66 = New-Object system.Windows.Forms.Label
  1262. $Label66.text = "NlMtu:"
  1263. $Label66.AutoSize = $true
  1264. $Label66.width = 25
  1265. $Label66.height = 10
  1266. $Label66.location = New-Object System.Drawing.Point(10,546)
  1267. $Label66.Font = New-Object System.Drawing.Font('Calibri',10)
  1268. $Label66.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1269.  
  1270. $tb_NlMtu = New-Object system.Windows.Forms.TextBox
  1271. $tb_NlMtu.multiline = $false
  1272. $tb_NlMtu.width = 71
  1273. $tb_NlMtu.height = 20
  1274. $tb_NlMtu.location = New-Object System.Drawing.Point(195,543)
  1275. $tb_NlMtu.Font = New-Object System.Drawing.Font('Calibri',10)
  1276. $tb_NlMtu.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1277. $tb_NlMtu.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1278.  
  1279. $Label67 = New-Object system.Windows.Forms.Label
  1280. $Label67.text = "RetransmitTime:"
  1281. $Label67.AutoSize = $true
  1282. $Label67.width = 25
  1283. $Label67.height = 10
  1284. $Label67.location = New-Object System.Drawing.Point(10,458)
  1285. $Label67.Font = New-Object System.Drawing.Font('Calibri',10)
  1286. $Label67.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1287.  
  1288. $tb_RetransmitTime = New-Object system.Windows.Forms.TextBox
  1289. $tb_RetransmitTime.multiline = $false
  1290. $tb_RetransmitTime.width = 71
  1291. $tb_RetransmitTime.height = 20
  1292. $tb_RetransmitTime.location = New-Object System.Drawing.Point(195,455)
  1293. $tb_RetransmitTime.Font = New-Object System.Drawing.Font('Calibri',10)
  1294. $tb_RetransmitTime.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1295. $tb_RetransmitTime.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1296.  
  1297. $btn_applyall = New-Object system.Windows.Forms.Button
  1298. $btn_applyall.text = "Apply All"
  1299. $btn_applyall.width = 78
  1300. $btn_applyall.height = 20
  1301. $btn_applyall.location = New-Object System.Drawing.Point(427,16)
  1302. $btn_applyall.Font = New-Object System.Drawing.Font('Calibri',10)
  1303. $btn_applyall.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#7ed321")
  1304.  
  1305. $Groupbox6 = New-Object system.Windows.Forms.Groupbox
  1306. $Groupbox6.height = 111
  1307. $Groupbox6.width = 230
  1308. $Groupbox6.text = "Interrupt Settings"
  1309. $Groupbox6.location = New-Object System.Drawing.Point(10,443)
  1310.  
  1311. $lb_MsiMode = New-Object system.Windows.Forms.Label
  1312. $lb_MsiMode.text = "MSI Mode:"
  1313. $lb_MsiMode.AutoSize = $true
  1314. $lb_MsiMode.width = 25
  1315. $lb_MsiMode.height = 10
  1316. $lb_MsiMode.location = New-Object System.Drawing.Point(7,15)
  1317. $lb_MsiMode.Font = New-Object System.Drawing.Font('Calibri',10)
  1318. $lb_MsiMode.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1319.  
  1320. $cb_MsiMode = New-Object system.Windows.Forms.ComboBox
  1321. $cb_MsiMode.width = 108
  1322. $cb_MsiMode.height = 20
  1323. @('Disabled','Enabled') | ForEach-Object {[void] $cb_MsiMode.Items.Add($_)}
  1324. $cb_MsiMode.location = New-Object System.Drawing.Point(114,11)
  1325. $cb_MsiMode.Font = New-Object System.Drawing.Font('Calibri',9)
  1326. $cb_MsiMode.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1327. $cb_MsiMode.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1328.  
  1329. $lb_InterruptPriority = New-Object system.Windows.Forms.Label
  1330. $lb_InterruptPriority.text = "Interrupt Priority:"
  1331. $lb_InterruptPriority.AutoSize = $true
  1332. $lb_InterruptPriority.width = 25
  1333. $lb_InterruptPriority.height = 10
  1334. $lb_InterruptPriority.location = New-Object System.Drawing.Point(7,37)
  1335. $lb_InterruptPriority.Font = New-Object System.Drawing.Font('Calibri',10)
  1336. $lb_InterruptPriority.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1337.  
  1338. $cb_InterruptPriority = New-Object system.Windows.Forms.ComboBox
  1339. $cb_InterruptPriority.width = 108
  1340. $cb_InterruptPriority.height = 20
  1341. @('Undefined','Low','Normal','High') | ForEach-Object {[void] $cb_InterruptPriority.Items.Add($_)}
  1342. $cb_InterruptPriority.location = New-Object System.Drawing.Point(114,33)
  1343. $cb_InterruptPriority.Font = New-Object System.Drawing.Font('Calibri',9)
  1344. $cb_InterruptPriority.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1345. $cb_InterruptPriority.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1346.  
  1347. $lb_DevicePolicy = New-Object system.Windows.Forms.Label
  1348. $lb_DevicePolicy.text = "DevicePolicy:"
  1349. $lb_DevicePolicy.AutoSize = $true
  1350. $lb_DevicePolicy.width = 25
  1351. $lb_DevicePolicy.height = 10
  1352. $lb_DevicePolicy.location = New-Object System.Drawing.Point(7,60)
  1353. $lb_DevicePolicy.Font = New-Object System.Drawing.Font('Calibri',10)
  1354. $lb_DevicePolicy.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1355.  
  1356. $cb_DevicePolicy = New-Object system.Windows.Forms.ComboBox
  1357. $cb_DevicePolicy.width = 214
  1358. $cb_DevicePolicy.height = 20
  1359. @('MachineDefault','AllCloseProcessors','OneCloseProcessor','AllProcessorsInMachine','SpecifiedProcessors','SreadMessagesAcrossAllProcessors') | ForEach-Object {[void] $cb_DevicePolicy.Items.Add($_)}
  1360. $cb_DevicePolicy.location = New-Object System.Drawing.Point(7,81)
  1361. $cb_DevicePolicy.Font = New-Object System.Drawing.Font('Calibri',9)
  1362. $cb_DevicePolicy.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1363. $cb_DevicePolicy.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1364.  
  1365. $btn_applyInterfaceSettings = New-Object system.Windows.Forms.Button
  1366. $btn_applyInterfaceSettings.text = "Apply"
  1367. $btn_applyInterfaceSettings.width = 60
  1368. $btn_applyInterfaceSettings.height = 21
  1369. $btn_applyInterfaceSettings.location = New-Object System.Drawing.Point(252,894)
  1370. $btn_applyInterfaceSettings.Font = New-Object System.Drawing.Font('Calibri',10)
  1371. $btn_applyInterfaceSettings.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1372.  
  1373. $Label69 = New-Object system.Windows.Forms.Label
  1374. $Label69.text = "ms"
  1375. $Label69.AutoSize = $true
  1376. $Label69.width = 25
  1377. $Label69.height = 10
  1378. $Label69.location = New-Object System.Drawing.Point(269,436)
  1379. $Label69.Font = New-Object System.Drawing.Font('Calibri',10)
  1380. $Label69.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1381.  
  1382. $Label70 = New-Object system.Windows.Forms.Label
  1383. $Label70.text = "ms"
  1384. $Label70.AutoSize = $true
  1385. $Label70.width = 25
  1386. $Label70.height = 10
  1387. $Label70.location = New-Object System.Drawing.Point(269,458)
  1388. $Label70.Font = New-Object System.Drawing.Font('Calibri',10)
  1389. $Label70.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1390.  
  1391. $Label71 = New-Object system.Windows.Forms.Label
  1392. $Label71.text = "ms"
  1393. $Label71.AutoSize = $true
  1394. $Label71.width = 25
  1395. $Label71.height = 10
  1396. $Label71.location = New-Object System.Drawing.Point(269,480)
  1397. $Label71.Font = New-Object System.Drawing.Font('Calibri',10)
  1398. $Label71.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1399.  
  1400. $Label72 = New-Object system.Windows.Forms.Label
  1401. $Label72.text = "bytes"
  1402. $Label72.AutoSize = $true
  1403. $Label72.width = 25
  1404. $Label72.height = 10
  1405. $Label72.location = New-Object System.Drawing.Point(269,546)
  1406. $Label72.Font = New-Object System.Drawing.Font('Calibri',10)
  1407. $Label72.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1408.  
  1409. $Label73 = New-Object system.Windows.Forms.Label
  1410. $Label73.text = "TxIntDelay:"
  1411. $Label73.AutoSize = $true
  1412. $Label73.width = 25
  1413. $Label73.height = 10
  1414. $Label73.location = New-Object System.Drawing.Point(9,368)
  1415. $Label73.Font = New-Object System.Drawing.Font('Calibri',10)
  1416. $Label73.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1417.  
  1418. $tb_TxIntDelay = New-Object system.Windows.Forms.TextBox
  1419. $tb_TxIntDelay.multiline = $false
  1420. $tb_TxIntDelay.width = 71
  1421. $tb_TxIntDelay.height = 20
  1422. $tb_TxIntDelay.location = New-Object System.Drawing.Point(193,365)
  1423. $tb_TxIntDelay.Font = New-Object System.Drawing.Font('Calibri',10)
  1424. $tb_TxIntDelay.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1425. $tb_TxIntDelay.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1426.  
  1427. $Label74 = New-Object system.Windows.Forms.Label
  1428. $Label74.text = "PacketDirect:"
  1429. $Label74.AutoSize = $true
  1430. $Label74.width = 25
  1431. $Label74.height = 10
  1432. $Label74.location = New-Object System.Drawing.Point(9,390)
  1433. $Label74.Font = New-Object System.Drawing.Font('Calibri',10)
  1434. $Label74.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1435.  
  1436. $cb_PacketDirect = New-Object system.Windows.Forms.ComboBox
  1437. $cb_PacketDirect.width = 190
  1438. $cb_PacketDirect.height = 20
  1439. @('Disabled','Enabled','Undefined') | ForEach-Object {[void] $cb_PacketDirect.Items.Add($_)}
  1440. $cb_PacketDirect.location = New-Object System.Drawing.Point(193,387)
  1441. $cb_PacketDirect.Font = New-Object System.Drawing.Font('Calibri',9)
  1442. $cb_PacketDirect.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1443. $cb_PacketDirect.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1444.  
  1445. $Label75 = New-Object system.Windows.Forms.Label
  1446. $Label75.text = "Coalesce:"
  1447. $Label75.AutoSize = $true
  1448. $Label75.width = 25
  1449. $Label75.height = 10
  1450. $Label75.location = New-Object System.Drawing.Point(9,412)
  1451. $Label75.Font = New-Object System.Drawing.Font('Calibri',10)
  1452. $Label75.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1453.  
  1454. $cb_EnableCoalesce = New-Object system.Windows.Forms.ComboBox
  1455. $cb_EnableCoalesce.width = 190
  1456. $cb_EnableCoalesce.height = 20
  1457. @('Disabled','Enabled','Undefined') | ForEach-Object {[void] $cb_EnableCoalesce.Items.Add($_)}
  1458. $cb_EnableCoalesce.location = New-Object System.Drawing.Point(193,409)
  1459. $cb_EnableCoalesce.Font = New-Object System.Drawing.Font('Calibri',9)
  1460. $cb_EnableCoalesce.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1461. $cb_EnableCoalesce.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1462.  
  1463. $Label76 = New-Object system.Windows.Forms.Label
  1464. $Label76.text = "UdpTxScaling:"
  1465. $Label76.AutoSize = $true
  1466. $Label76.width = 25
  1467. $Label76.height = 10
  1468. $Label76.location = New-Object System.Drawing.Point(9,457)
  1469. $Label76.Font = New-Object System.Drawing.Font('Calibri',10)
  1470. $Label76.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1471.  
  1472. $cb_EnableUdpTxScaling = New-Object system.Windows.Forms.ComboBox
  1473. $cb_EnableUdpTxScaling.width = 190
  1474. $cb_EnableUdpTxScaling.height = 20
  1475. @('Disabled','Enabled','Undefined') | ForEach-Object {[void] $cb_EnableUdpTxScaling.Items.Add($_)}
  1476. $cb_EnableUdpTxScaling.location = New-Object System.Drawing.Point(193,454)
  1477. $cb_EnableUdpTxScaling.Font = New-Object System.Drawing.Font('Calibri',9)
  1478. $cb_EnableUdpTxScaling.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1479. $cb_EnableUdpTxScaling.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1480.  
  1481. $cb_IPv6 = New-Object system.Windows.Forms.CheckBox
  1482. $cb_IPv6.text = "IPv6"
  1483. $cb_IPv6.AutoSize = $true
  1484. $cb_IPv6.width = 95
  1485. $cb_IPv6.height = 20
  1486. $cb_IPv6.location = New-Object System.Drawing.Point(503,300)
  1487. $cb_IPv6.Font = New-Object System.Drawing.Font('Calibri',7)
  1488. $cb_IPv6.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1489.  
  1490. $cb_IPv4 = New-Object system.Windows.Forms.CheckBox
  1491. $cb_IPv4.text = "IPv4"
  1492. $cb_IPv4.AutoSize = $true
  1493. $cb_IPv4.width = 95
  1494. $cb_IPv4.height = 20
  1495. $cb_IPv4.location = New-Object System.Drawing.Point(456,300)
  1496. $cb_IPv4.Font = New-Object System.Drawing.Font('Calibri',7)
  1497. $cb_IPv4.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1498.  
  1499. $btn_rssaddsupport = New-Object system.Windows.Forms.Button
  1500. $btn_rssaddsupport.text = "Enable RSS Support"
  1501. $btn_rssaddsupport.width = 178
  1502. $btn_rssaddsupport.height = 21
  1503. $btn_rssaddsupport.location = New-Object System.Drawing.Point(10,339)
  1504. $btn_rssaddsupport.Font = New-Object System.Drawing.Font('Calibri',9)
  1505. $btn_rssaddsupport.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#b8e986")
  1506.  
  1507. $Groupbox8 = New-Object system.Windows.Forms.Groupbox
  1508. $Groupbox8.height = 584
  1509. $Groupbox8.width = 378
  1510. $Groupbox8.text = "Tweaks"
  1511. $Groupbox8.location = New-Object System.Drawing.Point(975,93)
  1512.  
  1513. $Label43 = New-Object system.Windows.Forms.Label
  1514. $Label43.text = "DefaultReceiveWindow:"
  1515. $Label43.AutoSize = $true
  1516. $Label43.width = 25
  1517. $Label43.height = 10
  1518. $Label43.location = New-Object System.Drawing.Point(6,20)
  1519. $Label43.Font = New-Object System.Drawing.Font('Calibri',10)
  1520. $Label43.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1521.  
  1522. $Label77 = New-Object system.Windows.Forms.Label
  1523. $Label77.text = "DefaultSendWindow:"
  1524. $Label77.AutoSize = $true
  1525. $Label77.width = 25
  1526. $Label77.height = 10
  1527. $Label77.location = New-Object System.Drawing.Point(6,42)
  1528. $Label77.Font = New-Object System.Drawing.Font('Calibri',10)
  1529. $Label77.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1530.  
  1531. $btn_registrytweaksapply = New-Object system.Windows.Forms.Button
  1532. $btn_registrytweaksapply.text = "Apply"
  1533. $btn_registrytweaksapply.width = 60
  1534. $btn_registrytweaksapply.height = 21
  1535. $btn_registrytweaksapply.location = New-Object System.Drawing.Point(976,682)
  1536. $btn_registrytweaksapply.Font = New-Object System.Drawing.Font('Calibri',10)
  1537. $btn_registrytweaksapply.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1538.  
  1539. $cb_Afd_defaultrecWin = New-Object system.Windows.Forms.ComboBox
  1540. $cb_Afd_defaultrecWin.width = 190
  1541. $cb_Afd_defaultrecWin.height = 20
  1542. @('8192','32767') | ForEach-Object {[void] $cb_Afd_defaultrecWin.Items.Add($_)}
  1543. $cb_Afd_defaultrecWin.location = New-Object System.Drawing.Point(177,17)
  1544. $cb_Afd_defaultrecWin.Font = New-Object System.Drawing.Font('Calibri',9)
  1545. $cb_Afd_defaultrecWin.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1546. $cb_Afd_defaultrecWin.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1547.  
  1548. $cb_Afd_defaultSendWin = New-Object system.Windows.Forms.ComboBox
  1549. $cb_Afd_defaultSendWin.width = 190
  1550. $cb_Afd_defaultSendWin.height = 20
  1551. @('8192','32767') | ForEach-Object {[void] $cb_Afd_defaultSendWin.Items.Add($_)}
  1552. $cb_Afd_defaultSendWin.location = New-Object System.Drawing.Point(177,39)
  1553. $cb_Afd_defaultSendWin.Font = New-Object System.Drawing.Font('Calibri',9)
  1554. $cb_Afd_defaultSendWin.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1555. $cb_Afd_defaultSendWin.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1556.  
  1557. $btn_Opacity = New-Object system.Windows.Forms.Button
  1558. $btn_Opacity.text = "Opacity On/Off"
  1559. $btn_Opacity.width = 112
  1560. $btn_Opacity.height = 20
  1561. $btn_Opacity.location = New-Object System.Drawing.Point(628,16)
  1562. $btn_Opacity.Font = New-Object System.Drawing.Font('Calibri',10)
  1563. $btn_Opacity.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1564.  
  1565. $Label78 = New-Object system.Windows.Forms.Label
  1566. $Label78.text = "DisableAddressSharing:"
  1567. $Label78.AutoSize = $true
  1568. $Label78.width = 25
  1569. $Label78.height = 10
  1570. $Label78.location = New-Object System.Drawing.Point(5,284)
  1571. $Label78.Font = New-Object System.Drawing.Font('Calibri',10)
  1572. $Label78.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1573.  
  1574. $cb_DisableAddressSharing = New-Object system.Windows.Forms.ComboBox
  1575. $cb_DisableAddressSharing.width = 190
  1576. $cb_DisableAddressSharing.height = 20
  1577. @('0','1') | ForEach-Object {[void] $cb_DisableAddressSharing.Items.Add($_)}
  1578. $cb_DisableAddressSharing.location = New-Object System.Drawing.Point(177,281)
  1579. $cb_DisableAddressSharing.Font = New-Object System.Drawing.Font('Calibri',9)
  1580. $cb_DisableAddressSharing.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1581. $cb_DisableAddressSharing.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1582.  
  1583. $Label79 = New-Object system.Windows.Forms.Label
  1584. $Label79.text = "DoNotHoldNICBuffers:"
  1585. $Label79.AutoSize = $true
  1586. $Label79.width = 25
  1587. $Label79.height = 10
  1588. $Label79.location = New-Object System.Drawing.Point(6,108)
  1589. $Label79.Font = New-Object System.Drawing.Font('Calibri',10)
  1590. $Label79.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1591.  
  1592. $cb_DoNotHoldNICBuffers = New-Object system.Windows.Forms.ComboBox
  1593. $cb_DoNotHoldNICBuffers.width = 190
  1594. $cb_DoNotHoldNICBuffers.height = 20
  1595. @('0','1') | ForEach-Object {[void] $cb_DoNotHoldNICBuffers.Items.Add($_)}
  1596. $cb_DoNotHoldNICBuffers.location = New-Object System.Drawing.Point(177,105)
  1597. $cb_DoNotHoldNICBuffers.Font = New-Object System.Drawing.Font('Calibri',9)
  1598. $cb_DoNotHoldNICBuffers.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1599. $cb_DoNotHoldNICBuffers.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1600.  
  1601. $Label80 = New-Object system.Windows.Forms.Label
  1602. $Label80.text = "SmallBufferSize:"
  1603. $Label80.AutoSize = $true
  1604. $Label80.width = 25
  1605. $Label80.height = 10
  1606. $Label80.location = New-Object System.Drawing.Point(6,130)
  1607. $Label80.Font = New-Object System.Drawing.Font('Calibri',10)
  1608. $Label80.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1609.  
  1610. $cb_SmallBufferSize = New-Object system.Windows.Forms.ComboBox
  1611. $cb_SmallBufferSize.width = 190
  1612. $cb_SmallBufferSize.height = 20
  1613. @('128') | ForEach-Object {[void] $cb_SmallBufferSize.Items.Add($_)}
  1614. $cb_SmallBufferSize.location = New-Object System.Drawing.Point(177,127)
  1615. $cb_SmallBufferSize.Font = New-Object System.Drawing.Font('Calibri',9)
  1616. $cb_SmallBufferSize.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1617. $cb_SmallBufferSize.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1618.  
  1619. $Label81 = New-Object system.Windows.Forms.Label
  1620. $Label81.text = "MediumBufferSize:"
  1621. $Label81.AutoSize = $true
  1622. $Label81.width = 25
  1623. $Label81.height = 10
  1624. $Label81.location = New-Object System.Drawing.Point(6,152)
  1625. $Label81.Font = New-Object System.Drawing.Font('Calibri',10)
  1626. $Label81.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1627.  
  1628. $cb_MediumBufferSize = New-Object system.Windows.Forms.ComboBox
  1629. $cb_MediumBufferSize.width = 190
  1630. $cb_MediumBufferSize.height = 20
  1631. @('1504') | ForEach-Object {[void] $cb_MediumBufferSize.Items.Add($_)}
  1632. $cb_MediumBufferSize.location = New-Object System.Drawing.Point(177,149)
  1633. $cb_MediumBufferSize.Font = New-Object System.Drawing.Font('Calibri',9)
  1634. $cb_MediumBufferSize.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1635. $cb_MediumBufferSize.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1636.  
  1637. $Label82 = New-Object system.Windows.Forms.Label
  1638. $Label82.text = "LargeBufferSize:"
  1639. $Label82.AutoSize = $true
  1640. $Label82.width = 25
  1641. $Label82.height = 10
  1642. $Label82.location = New-Object System.Drawing.Point(6,174)
  1643. $Label82.Font = New-Object System.Drawing.Font('Calibri',10)
  1644. $Label82.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1645.  
  1646. $cb_LargeBufferSize = New-Object system.Windows.Forms.ComboBox
  1647. $cb_LargeBufferSize.width = 190
  1648. $cb_LargeBufferSize.height = 20
  1649. @('3876') | ForEach-Object {[void] $cb_LargeBufferSize.Items.Add($_)}
  1650. $cb_LargeBufferSize.location = New-Object System.Drawing.Point(177,171)
  1651. $cb_LargeBufferSize.Font = New-Object System.Drawing.Font('Calibri',9)
  1652. $cb_LargeBufferSize.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1653. $cb_LargeBufferSize.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1654.  
  1655. $Label83 = New-Object system.Windows.Forms.Label
  1656. $Label83.text = "HugeBufferSize:"
  1657. $Label83.AutoSize = $true
  1658. $Label83.width = 25
  1659. $Label83.height = 10
  1660. $Label83.location = New-Object System.Drawing.Point(6,196)
  1661. $Label83.Font = New-Object System.Drawing.Font('Calibri',10)
  1662. $Label83.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1663.  
  1664. $cb_HugeBufferSize = New-Object system.Windows.Forms.ComboBox
  1665. $cb_HugeBufferSize.width = 190
  1666. $cb_HugeBufferSize.height = 20
  1667. $cb_HugeBufferSize.location = New-Object System.Drawing.Point(177,193)
  1668. $cb_HugeBufferSize.Font = New-Object System.Drawing.Font('Calibri',9)
  1669. $cb_HugeBufferSize.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1670. $cb_HugeBufferSize.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1671.  
  1672. $cb_BufferAlignment = New-Object system.Windows.Forms.ComboBox
  1673. $cb_BufferAlignment.width = 190
  1674. $cb_BufferAlignment.height = 20
  1675. @('32','64','128','256') | ForEach-Object {[void] $cb_BufferAlignment.Items.Add($_)}
  1676. $cb_BufferAlignment.location = New-Object System.Drawing.Point(177,83)
  1677. $cb_BufferAlignment.Font = New-Object System.Drawing.Font('Calibri',9)
  1678. $cb_BufferAlignment.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1679. $cb_BufferAlignment.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1680.  
  1681. $Label84 = New-Object system.Windows.Forms.Label
  1682. $Label84.text = "BufferAlignment:"
  1683. $Label84.AutoSize = $true
  1684. $Label84.width = 25
  1685. $Label84.height = 10
  1686. $Label84.location = New-Object System.Drawing.Point(6,86)
  1687. $Label84.Font = New-Object System.Drawing.Font('Calibri',10)
  1688. $Label84.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1689.  
  1690. $cb_BufferMultiplier = New-Object system.Windows.Forms.ComboBox
  1691. $cb_BufferMultiplier.width = 190
  1692. $cb_BufferMultiplier.height = 20
  1693. @('512') | ForEach-Object {[void] $cb_BufferMultiplier.Items.Add($_)}
  1694. $cb_BufferMultiplier.location = New-Object System.Drawing.Point(177,61)
  1695. $cb_BufferMultiplier.Font = New-Object System.Drawing.Font('Calibri',9)
  1696. $cb_BufferMultiplier.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1697. $cb_BufferMultiplier.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1698.  
  1699. $Label85 = New-Object system.Windows.Forms.Label
  1700. $Label85.text = "(Rec/Send) BufferMultiplier:"
  1701. $Label85.AutoSize = $true
  1702. $Label85.width = 25
  1703. $Label85.height = 10
  1704. $Label85.location = New-Object System.Drawing.Point(6,64)
  1705. $Label85.Font = New-Object System.Drawing.Font('Calibri',10)
  1706. $Label85.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1707.  
  1708. $Label86 = New-Object system.Windows.Forms.Label
  1709. $Label86.text = "SmallBufferListDepth:"
  1710. $Label86.AutoSize = $true
  1711. $Label86.width = 25
  1712. $Label86.height = 10
  1713. $Label86.location = New-Object System.Drawing.Point(6,218)
  1714. $Label86.Font = New-Object System.Drawing.Font('Calibri',10)
  1715. $Label86.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1716.  
  1717. $cb_SmallBufferListDepth = New-Object system.Windows.Forms.ComboBox
  1718. $cb_SmallBufferListDepth.width = 190
  1719. $cb_SmallBufferListDepth.height = 20
  1720. @('8','16') | ForEach-Object {[void] $cb_SmallBufferListDepth.Items.Add($_)}
  1721. $cb_SmallBufferListDepth.location = New-Object System.Drawing.Point(177,215)
  1722. $cb_SmallBufferListDepth.Font = New-Object System.Drawing.Font('Calibri',9)
  1723. $cb_SmallBufferListDepth.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1724. $cb_SmallBufferListDepth.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1725.  
  1726. $Label87 = New-Object system.Windows.Forms.Label
  1727. $Label87.text = "MediumBufferListDepth:"
  1728. $Label87.AutoSize = $true
  1729. $Label87.width = 25
  1730. $Label87.height = 10
  1731. $Label87.location = New-Object System.Drawing.Point(6,240)
  1732. $Label87.Font = New-Object System.Drawing.Font('Calibri',10)
  1733. $Label87.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1734.  
  1735. $cb_MediumBufferListDepth = New-Object system.Windows.Forms.ComboBox
  1736. $cb_MediumBufferListDepth.width = 190
  1737. $cb_MediumBufferListDepth.height = 20
  1738. @('4','8','16') | ForEach-Object {[void] $cb_MediumBufferListDepth.Items.Add($_)}
  1739. $cb_MediumBufferListDepth.location = New-Object System.Drawing.Point(177,237)
  1740. $cb_MediumBufferListDepth.Font = New-Object System.Drawing.Font('Calibri',9)
  1741. $cb_MediumBufferListDepth.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1742. $cb_MediumBufferListDepth.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1743.  
  1744. $Label88 = New-Object system.Windows.Forms.Label
  1745. $Label88.text = "LargBufferListDepth:"
  1746. $Label88.AutoSize = $true
  1747. $Label88.width = 25
  1748. $Label88.height = 10
  1749. $Label88.location = New-Object System.Drawing.Point(6,262)
  1750. $Label88.Font = New-Object System.Drawing.Font('Calibri',10)
  1751. $Label88.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1752.  
  1753. $cb_LargBufferListDepth = New-Object system.Windows.Forms.ComboBox
  1754. $cb_LargBufferListDepth.width = 190
  1755. $cb_LargBufferListDepth.height = 20
  1756. @('0','2','10') | ForEach-Object {[void] $cb_LargBufferListDepth.Items.Add($_)}
  1757. $cb_LargBufferListDepth.location = New-Object System.Drawing.Point(177,259)
  1758. $cb_LargBufferListDepth.Font = New-Object System.Drawing.Font('Calibri',9)
  1759. $cb_LargBufferListDepth.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1760. $cb_LargBufferListDepth.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1761.  
  1762. $Label89 = New-Object system.Windows.Forms.Label
  1763. $Label89.text = "DisableChainedReceive:"
  1764. $Label89.AutoSize = $true
  1765. $Label89.width = 25
  1766. $Label89.height = 10
  1767. $Label89.location = New-Object System.Drawing.Point(5,306)
  1768. $Label89.Font = New-Object System.Drawing.Font('Calibri',10)
  1769. $Label89.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1770.  
  1771. $cb_DisableChainedReceive = New-Object system.Windows.Forms.ComboBox
  1772. $cb_DisableChainedReceive.width = 190
  1773. $cb_DisableChainedReceive.height = 20
  1774. @('0','1') | ForEach-Object {[void] $cb_DisableChainedReceive.Items.Add($_)}
  1775. $cb_DisableChainedReceive.location = New-Object System.Drawing.Point(177,303)
  1776. $cb_DisableChainedReceive.Font = New-Object System.Drawing.Font('Calibri',9)
  1777. $cb_DisableChainedReceive.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1778. $cb_DisableChainedReceive.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1779.  
  1780. $Label90 = New-Object system.Windows.Forms.Label
  1781. $Label90.text = "DisableDirectAcceptEx:"
  1782. $Label90.AutoSize = $true
  1783. $Label90.width = 25
  1784. $Label90.height = 10
  1785. $Label90.location = New-Object System.Drawing.Point(5,328)
  1786. $Label90.Font = New-Object System.Drawing.Font('Calibri',10)
  1787. $Label90.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1788.  
  1789. $cb_DisableDirectAcceptEx = New-Object system.Windows.Forms.ComboBox
  1790. $cb_DisableDirectAcceptEx.width = 190
  1791. $cb_DisableDirectAcceptEx.height = 20
  1792. @('0','1') | ForEach-Object {[void] $cb_DisableDirectAcceptEx.Items.Add($_)}
  1793. $cb_DisableDirectAcceptEx.location = New-Object System.Drawing.Point(177,325)
  1794. $cb_DisableDirectAcceptEx.Font = New-Object System.Drawing.Font('Calibri',9)
  1795. $cb_DisableDirectAcceptEx.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1796. $cb_DisableDirectAcceptEx.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1797.  
  1798. $Label91 = New-Object system.Windows.Forms.Label
  1799. $Label91.text = "DisableRawSecurity:"
  1800. $Label91.AutoSize = $true
  1801. $Label91.width = 25
  1802. $Label91.height = 10
  1803. $Label91.location = New-Object System.Drawing.Point(5,350)
  1804. $Label91.Font = New-Object System.Drawing.Font('Calibri',10)
  1805. $Label91.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1806.  
  1807. $cb_DisableRawSecurity = New-Object system.Windows.Forms.ComboBox
  1808. $cb_DisableRawSecurity.width = 190
  1809. $cb_DisableRawSecurity.height = 20
  1810. @('0','1') | ForEach-Object {[void] $cb_DisableRawSecurity.Items.Add($_)}
  1811. $cb_DisableRawSecurity.location = New-Object System.Drawing.Point(177,347)
  1812. $cb_DisableRawSecurity.Font = New-Object System.Drawing.Font('Calibri',9)
  1813. $cb_DisableRawSecurity.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1814. $cb_DisableRawSecurity.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1815.  
  1816. $Label92 = New-Object system.Windows.Forms.Label
  1817. $Label92.text = "DynamicSendBufferDisable:"
  1818. $Label92.AutoSize = $true
  1819. $Label92.width = 25
  1820. $Label92.height = 10
  1821. $Label92.location = New-Object System.Drawing.Point(5,372)
  1822. $Label92.Font = New-Object System.Drawing.Font('Calibri',10)
  1823. $Label92.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1824.  
  1825. $cb_DynamicSendBufferDisable = New-Object system.Windows.Forms.ComboBox
  1826. $cb_DynamicSendBufferDisable.width = 190
  1827. $cb_DynamicSendBufferDisable.height = 20
  1828. @('0','1') | ForEach-Object {[void] $cb_DynamicSendBufferDisable.Items.Add($_)}
  1829. $cb_DynamicSendBufferDisable.location = New-Object System.Drawing.Point(177,369)
  1830. $cb_DynamicSendBufferDisable.Font = New-Object System.Drawing.Font('Calibri',9)
  1831. $cb_DynamicSendBufferDisable.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1832. $cb_DynamicSendBufferDisable.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1833.  
  1834. $Label93 = New-Object system.Windows.Forms.Label
  1835. $Label93.text = "FastSendDatagramThreshold:"
  1836. $Label93.AutoSize = $true
  1837. $Label93.width = 25
  1838. $Label93.height = 10
  1839. $Label93.location = New-Object System.Drawing.Point(5,394)
  1840. $Label93.Font = New-Object System.Drawing.Font('Calibri',10)
  1841. $Label93.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1842.  
  1843. $cb_FastSendDatagramThreshold = New-Object system.Windows.Forms.ComboBox
  1844. $cb_FastSendDatagramThreshold.width = 190
  1845. $cb_FastSendDatagramThreshold.height = 20
  1846. @('1024') | ForEach-Object {[void] $cb_FastSendDatagramThreshold.Items.Add($_)}
  1847. $cb_FastSendDatagramThreshold.location = New-Object System.Drawing.Point(177,391)
  1848. $cb_FastSendDatagramThreshold.Font = New-Object System.Drawing.Font('Calibri',9)
  1849. $cb_FastSendDatagramThreshold.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1850. $cb_FastSendDatagramThreshold.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1851.  
  1852. $Label94 = New-Object system.Windows.Forms.Label
  1853. $Label94.text = "FastCopyReceiveThreshold:"
  1854. $Label94.AutoSize = $true
  1855. $Label94.width = 25
  1856. $Label94.height = 10
  1857. $Label94.location = New-Object System.Drawing.Point(5,416)
  1858. $Label94.Font = New-Object System.Drawing.Font('Calibri',10)
  1859. $Label94.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1860.  
  1861. $cb_FastCopyReceiveThreshold = New-Object system.Windows.Forms.ComboBox
  1862. $cb_FastCopyReceiveThreshold.width = 190
  1863. $cb_FastCopyReceiveThreshold.height = 20
  1864. @('1024') | ForEach-Object {[void] $cb_FastCopyReceiveThreshold.Items.Add($_)}
  1865. $cb_FastCopyReceiveThreshold.location = New-Object System.Drawing.Point(177,413)
  1866. $cb_FastCopyReceiveThreshold.Font = New-Object System.Drawing.Font('Calibri',9)
  1867. $cb_FastCopyReceiveThreshold.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1868. $cb_FastCopyReceiveThreshold.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1869.  
  1870. $Label95 = New-Object system.Windows.Forms.Label
  1871. $Label95.text = "IgnorePushBitOnReceives:"
  1872. $Label95.AutoSize = $true
  1873. $Label95.width = 25
  1874. $Label95.height = 10
  1875. $Label95.location = New-Object System.Drawing.Point(5,438)
  1876. $Label95.Font = New-Object System.Drawing.Font('Calibri',10)
  1877. $Label95.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1878.  
  1879. $cb_IgnorePushBitOnReceives = New-Object system.Windows.Forms.ComboBox
  1880. $cb_IgnorePushBitOnReceives.width = 190
  1881. $cb_IgnorePushBitOnReceives.height = 20
  1882. @('0','1') | ForEach-Object {[void] $cb_IgnorePushBitOnReceives.Items.Add($_)}
  1883. $cb_IgnorePushBitOnReceives.location = New-Object System.Drawing.Point(177,435)
  1884. $cb_IgnorePushBitOnReceives.Font = New-Object System.Drawing.Font('Calibri',9)
  1885. $cb_IgnorePushBitOnReceives.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1886. $cb_IgnorePushBitOnReceives.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1887.  
  1888. $Label96 = New-Object system.Windows.Forms.Label
  1889. $Label96.text = "IgnoreOrderlyRelease:"
  1890. $Label96.AutoSize = $true
  1891. $Label96.width = 25
  1892. $Label96.height = 10
  1893. $Label96.location = New-Object System.Drawing.Point(5,460)
  1894. $Label96.Font = New-Object System.Drawing.Font('Calibri',10)
  1895. $Label96.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1896.  
  1897. $cb_IgnoreOrderlyRelease = New-Object system.Windows.Forms.ComboBox
  1898. $cb_IgnoreOrderlyRelease.width = 190
  1899. $cb_IgnoreOrderlyRelease.height = 20
  1900. @('0','1') | ForEach-Object {[void] $cb_IgnoreOrderlyRelease.Items.Add($_)}
  1901. $cb_IgnoreOrderlyRelease.location = New-Object System.Drawing.Point(177,457)
  1902. $cb_IgnoreOrderlyRelease.Font = New-Object System.Drawing.Font('Calibri',9)
  1903. $cb_IgnoreOrderlyRelease.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1904. $cb_IgnoreOrderlyRelease.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1905.  
  1906. $Label97 = New-Object system.Windows.Forms.Label
  1907. $Label97.text = "TransmitWorker:"
  1908. $Label97.AutoSize = $true
  1909. $Label97.width = 25
  1910. $Label97.height = 10
  1911. $Label97.location = New-Object System.Drawing.Point(5,482)
  1912. $Label97.Font = New-Object System.Drawing.Font('Calibri',10)
  1913. $Label97.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1914.  
  1915. $cb_TransmitWorker = New-Object system.Windows.Forms.ComboBox
  1916. $cb_TransmitWorker.width = 190
  1917. $cb_TransmitWorker.height = 20
  1918. @('16','32') | ForEach-Object {[void] $cb_TransmitWorker.Items.Add($_)}
  1919. $cb_TransmitWorker.location = New-Object System.Drawing.Point(177,479)
  1920. $cb_TransmitWorker.Font = New-Object System.Drawing.Font('Calibri',9)
  1921. $cb_TransmitWorker.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1922. $cb_TransmitWorker.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1923.  
  1924. $Label98 = New-Object system.Windows.Forms.Label
  1925. $Label98.text = "PriorityBoost:"
  1926. $Label98.AutoSize = $true
  1927. $Label98.width = 25
  1928. $Label98.height = 10
  1929. $Label98.location = New-Object System.Drawing.Point(5,504)
  1930. $Label98.Font = New-Object System.Drawing.Font('Calibri',10)
  1931. $Label98.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1932.  
  1933. $cb_PriorityBoost = New-Object system.Windows.Forms.ComboBox
  1934. $cb_PriorityBoost.width = 190
  1935. $cb_PriorityBoost.height = 20
  1936. @('2','1','0','16') | ForEach-Object {[void] $cb_PriorityBoost.Items.Add($_)}
  1937. $cb_PriorityBoost.location = New-Object System.Drawing.Point(177,501)
  1938. $cb_PriorityBoost.Font = New-Object System.Drawing.Font('Calibri',9)
  1939. $cb_PriorityBoost.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1940. $cb_PriorityBoost.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1941.  
  1942. $btn_InterruptApply = New-Object system.Windows.Forms.Button
  1943. $btn_InterruptApply.text = "Apply"
  1944. $btn_InterruptApply.width = 60
  1945. $btn_InterruptApply.height = 21
  1946. $btn_InterruptApply.location = New-Object System.Drawing.Point(11,560)
  1947. $btn_InterruptApply.Font = New-Object System.Drawing.Font('Calibri',10)
  1948. $btn_InterruptApply.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1949.  
  1950. $Label68 = New-Object system.Windows.Forms.Label
  1951. $Label68.text = "CoalesceBufferSize:"
  1952. $Label68.AutoSize = $true
  1953. $Label68.width = 25
  1954. $Label68.height = 10
  1955. $Label68.location = New-Object System.Drawing.Point(9,435)
  1956. $Label68.Font = New-Object System.Drawing.Font('Calibri',10)
  1957. $Label68.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1958.  
  1959. $cb_CoalesceBufferSize = New-Object system.Windows.Forms.ComboBox
  1960. $cb_CoalesceBufferSize.width = 190
  1961. $cb_CoalesceBufferSize.height = 20
  1962. @('2048') | ForEach-Object {[void] $cb_CoalesceBufferSize.Items.Add($_)}
  1963. $cb_CoalesceBufferSize.location = New-Object System.Drawing.Point(193,432)
  1964. $cb_CoalesceBufferSize.Font = New-Object System.Drawing.Font('Calibri',9)
  1965. $cb_CoalesceBufferSize.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1966. $cb_CoalesceBufferSize.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1967.  
  1968. $btn_afd = New-Object system.Windows.Forms.Button
  1969. $btn_afd.text = "Open"
  1970. $btn_afd.width = 74
  1971. $btn_afd.height = 21
  1972. $btn_afd.location = New-Object System.Drawing.Point(1043,682)
  1973. $btn_afd.Font = New-Object System.Drawing.Font('Calibri',10)
  1974. $btn_afd.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1975.  
  1976. $Label99 = New-Object system.Windows.Forms.Label
  1977. $Label99.text = "IrpStackSize:"
  1978. $Label99.AutoSize = $true
  1979. $Label99.width = 25
  1980. $Label99.height = 10
  1981. $Label99.location = New-Object System.Drawing.Point(5,526)
  1982. $Label99.Font = New-Object System.Drawing.Font('Calibri',10)
  1983. $Label99.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1984.  
  1985. $cb_IrpStackSize = New-Object system.Windows.Forms.ComboBox
  1986. $cb_IrpStackSize.width = 190
  1987. $cb_IrpStackSize.height = 20
  1988. @('2','4','64') | ForEach-Object {[void] $cb_IrpStackSize.Items.Add($_)}
  1989. $cb_IrpStackSize.location = New-Object System.Drawing.Point(177,523)
  1990. $cb_IrpStackSize.Font = New-Object System.Drawing.Font('Calibri',9)
  1991. $cb_IrpStackSize.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  1992. $cb_IrpStackSize.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#171717")
  1993.  
  1994. $Form.controls.AddRange(@($cb_AdapterNamesCombo,$Label1,$Label2,$lbl_Path,$Label3,$lbl_ndisver,$Groupbox1,$btn_apply,$btn_unqueues,$btn_openreg,$Groupbox2,$btn_applyglobal,$Groupbox3,$btn_applyadv,$btn_adaptrest,$Groupbox5,$Groupbox4,$btn_applypowersettings,$Groupbox7,$btn_applyall,$Groupbox6,$btn_applyInterfaceSettings,$cb_IPv6,$cb_IPv4,$btn_rssaddsupport,$Groupbox8,$btn_registrytweaksapply,$btn_Opacity,$btn_InterruptApply,$btn_afd))
  1995. $Groupbox1.controls.AddRange(@($Label4,$Label5,$Label6,$lbl_rssstatus,$cb_rss_onoff,$cb_rssqueues,$cb_rssprofile,$Label7,$cb_rssbaseproc,$Label8,$cb_rssmaxproc,$Label9,$cb_rssmaxprocs,$Label35,$cb_DisablePortScaling,$Label42,$cb_ManyCoreScaling))
  1996. $Groupbox2.controls.AddRange(@($Label10,$cb_osrss,$Label11,$cb_osrsc,$Label12,$cb_oschimney,$Label13,$cb_ostaskoff,$cb_osntd,$Label14,$cb_osntdais,$Label15,$cb_ospcf,$Label16))
  1997. $Groupbox3.controls.AddRange(@($Label17,$cb_flowcontrol,$Label18,$Label19,$Label20,$Label21,$Label22,$Label23,$cb_InterruptModeration,$cb_IPChecksumOffloadIPv4,$cb_TCPChecksumOffloadIPv4,$cb_TCPChecksumOffloadIPv6,$cb_UDPChecksumOffloadIPv4,$cb_UDPChecksumOffloadIPv6,$Label24,$cb_InterruptModerationRate,$Label25,$Label26,$cb_LsoV2IPv4,$cb_LsoV2IPv6,$Label27,$cb_LsoV1IPv4,$Label28,$cb_PMNSOffload,$Label29,$cb_PMARPOffload,$cb_PriorityVLANTag,$Label00,$Label30,$cb_ReceiveBuffers,$Label31,$cb_TransmitBuffers,$Label73,$tb_TxIntDelay,$Label74,$cb_PacketDirect,$Label75,$cb_EnableCoalesce,$Label76,$cb_EnableUdpTxScaling,$Label68,$cb_CoalesceBufferSize))
  1998. $Groupbox5.controls.AddRange(@($Label32,$Label33,$cb_tcpiprssbasecpu,$cb_ndisrssbasecpu))
  1999. $Groupbox4.controls.AddRange(@($Label34,$cb_EnablePME,$Label36,$cb_EnableDynamicPowerGating,$Label37,$cb_EnableConnectedPowerGating,$Label38,$cb_AutoPowerSaveModeEnabled,$cb_NicAutoPowerSaver,$Label39,$Label40,$cb_DisableDelayedPowerUp,$Label41,$cb_ReduceSpeedOnPowerDown))
  2000. $Groupbox7.controls.AddRange(@($Label44,$cb_AdvertiseDefaultRoute,$Label45,$cb_Advertising,$Label46,$cb_AutomaticMetric,$cb_ClampMss,$Label47,$cb_DirectedMacWolPattern,$Label48,$Label49,$cb_EcnMarking,$Label50,$cb_ForceArpNdWolPattern,$Label51,$cb_Forwarding,$cb_IgnoreDefaultRoutes,$Label52,$Label53,$cb_ManagedAddressConfiguration,$Label54,$cb_NeighborDiscoverySupported,$Label55,$cb_NeighborUnreachabilityDetection,$Label56,$cb_OtherStatefulConfiguration,$Label57,$cb_RouterDiscovery,$Label58,$cb_Store,$Label59,$cb_WeakHostReceive,$Label60,$cb_WeakHostSend,$Label61,$tb_CurrentHopLimit,$Label62,$tb_BaseReachableTime,$tb_ReachableTime,$Label63,$Label64,$tb_DadRetransmitTime,$Label65,$tb_DadTransmits,$Label66,$tb_NlMtu,$Label67,$tb_RetransmitTime,$Label69,$Label70,$Label71,$Label72))
  2001. $Groupbox6.controls.AddRange(@($lb_MsiMode,$cb_MsiMode,$lb_InterruptPriority,$cb_InterruptPriority,$lb_DevicePolicy,$cb_DevicePolicy))
  2002. $Groupbox8.controls.AddRange(@($Label43,$Label77,$cb_Afd_defaultrecWin,$cb_Afd_defaultSendWin,$Label78,$cb_DisableAddressSharing,$Label79,$cb_DoNotHoldNICBuffers,$Label80,$cb_SmallBufferSize,$Label81,$cb_MediumBufferSize,$Label82,$cb_LargeBufferSize,$Label83,$cb_HugeBufferSize,$cb_BufferAlignment,$Label84,$cb_BufferMultiplier,$Label85,$Label86,$cb_SmallBufferListDepth,$Label87,$cb_MediumBufferListDepth,$Label88,$cb_LargBufferListDepth,$Label89,$cb_DisableChainedReceive,$Label90,$cb_DisableDirectAcceptEx,$Label91,$cb_DisableRawSecurity,$Label92,$cb_DynamicSendBufferDisable,$Label93,$cb_FastSendDatagramThreshold,$Label94,$cb_FastCopyReceiveThreshold,$Label95,$cb_IgnorePushBitOnReceives,$Label96,$cb_IgnoreOrderlyRelease,$Label97,$cb_TransmitWorker,$Label98,$cb_PriorityBoost,$Label99,$cb_IrpStackSize))
  2003.  
  2004.  
  2005. #region Logic
  2006. #Cleaning Code
  2007. cls
  2008. Add-Type -Name Window -Namespace Console -MemberDefinition '
  2009. [DllImport("Kernel32.dll")]
  2010. public static extern IntPtr GetConsoleWindow();
  2011.  
  2012. [DllImport("user32.dll")]
  2013. public static extern bool ShowWindow(IntPtr hWnd, Int32 nCmdShow);'
  2014.  
  2015. #Write your logic code here
  2016.  
  2017. #GUI Settings
  2018. #$ErrorActionPreference="Stop"
  2019. #$Form.Opacity = "0.90"
  2020.  
  2021. #Deselect Content for Updating Text/Value Changes
  2022. $Form.Add_MouseClick({$Form.ActiveControl = $null})
  2023. $Groupbox1.Add_MouseClick({$Form.ActiveControl = $null})
  2024. $Groupbox2.Add_MouseClick({$Form.ActiveControl = $null})
  2025. $Groupbox3.Add_MouseClick({$Form.ActiveControl = $null})
  2026. $Groupbox4.Add_MouseClick({$Form.ActiveControl = $null})
  2027. $Groupbox5.Add_MouseClick({$Form.ActiveControl = $null})
  2028. $Groupbox7.Add_MouseClick({$Form.ActiveControl = $null})
  2029. $Groupbox6.Add_MouseClick({$Form.ActiveControl = $null})
  2030. $Groupbox8.Add_MouseClick({$Form.ActiveControl = $null})
  2031. $Groupbox9.Add_MouseClick({$Form.ActiveControl = $null})
  2032.  
  2033.  
  2034. #Groupboxes
  2035. $Groupbox1.Font = New-Object System.Drawing.Font('Calibri',10)
  2036. $Groupbox1.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2037. $Groupbox2.Font = New-Object System.Drawing.Font('Calibri',10)
  2038. $Groupbox2.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2039. $Groupbox3.Font = New-Object System.Drawing.Font('Calibri',10)
  2040. $Groupbox3.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2041. $Groupbox4.Font = New-Object System.Drawing.Font('Calibri',10)
  2042. $Groupbox4.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2043. $Groupbox5.Font = New-Object System.Drawing.Font('Calibri',10)
  2044. $Groupbox5.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2045. $Groupbox7.Font = New-Object System.Drawing.Font('Calibri',10)
  2046. $Groupbox7.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2047. $Groupbox6.Font = New-Object System.Drawing.Font('Calibri',10)
  2048. $Groupbox6.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2049. $Groupbox8.Font = New-Object System.Drawing.Font('Calibri',10)
  2050. $Groupbox8.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2051.  
  2052.  
  2053. #Buttons
  2054. $btn_openreg.Flatstyle = 'Flat'
  2055. $btn_apply.Flatstyle = 'Flat'
  2056. $btn_applyglobal.Flatstyle = 'Flat'
  2057. $btn_applyadv.Flatstyle = 'Flat'
  2058. $btn_adaptrest.Flatstyle = 'Flat'
  2059. $btn_unqueues.Flatstyle = 'Flat'
  2060. #$btn_applotadapters.Flatstyle = 'Flat'
  2061. $btn_applypowersettings.Flatstyle = 'Flat'
  2062. $btn_applyall.Flatstyle = 'Flat'
  2063. $btn_applyInterfaceSettings.Flatstyle = 'Flat'
  2064. $btn_rssaddsupport.Flatstyle = 'Flat'
  2065. $btn_registrytweaksapply.Flatstyle = 'Flat'
  2066. $btn_Opacity.Flatstyle = 'Flat'
  2067. $btn_InterruptApply.Flatstyle = 'Flat'
  2068. $btn_afd.Flatstyle = 'Flat'
  2069.  
  2070.  
  2071. function Set-ConsoleColor ($bc, $fc) {
  2072. $Host.UI.RawUI.BackgroundColor = $bc
  2073. $Host.UI.RawUI.ForegroundColor = $fc
  2074. Clear-Host
  2075. }
  2076. Set-ConsoleColor 'Black' 'Green'
  2077.  
  2078. #Locked Combos
  2079. $cb_AdapterNamesCombo.Flatstyle = 'Flat'
  2080. $cb_rss_onoff.Flatstyle = 'Flat'
  2081. $cb_rssprofile.Flatstyle = 'Flat'
  2082. $cb_rssbaseproc.Flatstyle = 'Flat'
  2083. $cb_rssmaxproc.Flatstyle = 'Flat'
  2084. $cb_rssmaxprocs.Flatstyle = 'Flat'
  2085. $cb_rssqueues.Flatstyle = 'Flat'
  2086. $cb_osrss.Flatstyle = 'Flat'
  2087. $cb_osrsc.Flatstyle = 'Flat'
  2088. $cb_oschimney.Flatstyle = 'Flat'
  2089. $cb_ostaskoff.Flatstyle = 'Flat'
  2090. $cb_osntd.Flatstyle = 'Flat'
  2091. $cb_osntdais.Flatstyle = 'Flat'
  2092. $cb_ospcf.Flatstyle = 'Flat'
  2093. $cb_flowcontrol.Flatstyle = 'Flat'
  2094. $cb_IPChecksumOffloadIPv4.Flatstyle = 'Flat'
  2095. $cb_TCPChecksumOffloadIPv4.Flatstyle = 'Flat'
  2096. $cb_TCPChecksumOffloadIPv6.Flatstyle = 'Flat'
  2097. $cb_UDPChecksumOffloadIPv4.Flatstyle = 'Flat'
  2098. $cb_UDPChecksumOffloadIPv6.Flatstyle = 'Flat'
  2099. $cb_InterruptModeration.Flatstyle = 'Flat'
  2100. $cb_LsoV1IPv4.Flatstyle = 'Flat'
  2101. $cb_LsoV2IPv4.Flatstyle = 'Flat'
  2102. $cb_LsoV2IPv6.Flatstyle = 'Flat'
  2103. $cb_PMARPOffload.Flatstyle = 'Flat'
  2104. $cb_PMNSOffload.Flatstyle = 'Flat'
  2105. $cb_PriorityVLANTag.Flatstyle = 'Flat'
  2106. $cb_ReceiveBuffers.Flatstyle = 'Flat'
  2107. $cb_TransmitBuffers.Flatstyle = 'Flat'
  2108. $cb_InterruptModerationRate.Flatstyle = 'Flat'
  2109. $cb_CoalesceBufferSize.Flatstyle = 'Flat'
  2110. $cb_rss_onoff.DropDownStyle = 'DropDownList'
  2111. $cb_AdapterNamesCombo.DropDownStyle = 'DropDownList'
  2112. $cb_rssprofile.DropDownStyle = 'DropDownList'
  2113. $cb_rssbaseproc.DropDownStyle = 'DropDownList'
  2114. $cb_rssmaxproc.DropDownStyle = 'DropDownList'
  2115. $cb_rssmaxprocs.DropDownStyle = 'DropDownList'
  2116. $cb_rssqueues.DropDownStyle = 'DropDownList'
  2117. $cb_osrss.DropDownStyle = 'DropDownList'
  2118. $cb_osrsc.DropDownStyle = 'DropDownList'
  2119. $cb_oschimney.DropDownStyle = 'DropDownList'
  2120. $cb_ostaskoff.DropDownStyle = 'DropDownList'
  2121. $cb_osntd.DropDownStyle = 'DropDownList'
  2122. $cb_osntdais.DropDownStyle = 'DropDownList'
  2123. $cb_ospcf.DropDownStyle = 'DropDownList'
  2124. $cb_flowcontrol.DropDownStyle = 'DropDownList'
  2125. $cb_IPChecksumOffloadIPv4.DropDownStyle = 'DropDownList'
  2126. $cb_TCPChecksumOffloadIPv4.DropDownStyle = 'DropDownList'
  2127. $cb_TCPChecksumOffloadIPv6.DropDownStyle = 'DropDownList'
  2128. $cb_UDPChecksumOffloadIPv4.DropDownStyle = 'DropDownList'
  2129. $cb_UDPChecksumOffloadIPv6.DropDownStyle = 'DropDownList'
  2130. $cb_InterruptModeration.DropDownStyle = 'DropDownList'
  2131. $cb_LsoV1IPv4.DropDownStyle = 'DropDownList'
  2132. $cb_LsoV2IPv4.DropDownStyle = 'DropDownList'
  2133. $cb_LsoV2IPv6.DropDownStyle = 'DropDownList'
  2134. $cb_PMARPOffload.DropDownStyle = 'DropDownList'
  2135. $cb_PMNSOffload.DropDownStyle = 'DropDownList'
  2136. $cb_PriorityVLANTag.DropDownStyle = 'DropDownList'
  2137. #$cb_CoalesceBufferSize.DropDownStyle = 'DropDownList'
  2138.  
  2139.  
  2140. $cb_Afd_defaultrecWin.Flatstyle = 'Flat'
  2141. $cb_Afd_defaultSendWin.Flatstyle = 'Flat'
  2142. $cb_BufferMultiplier.Flatstyle = 'Flat'
  2143. $cb_DisableAddressSharing.Flatstyle = 'Flat'
  2144. $cb_BufferAlignment.Flatstyle = 'Flat'
  2145. $cb_DoNotHoldNICBuffers.Flatstyle = 'Flat'
  2146. $cb_SmallBufferSize.Flatstyle = 'Flat'
  2147. $cb_MediumBufferSize.Flatstyle = 'Flat'
  2148. $cb_LargeBufferSize.Flatstyle = 'Flat'
  2149. $cb_HugeBufferSize.Flatstyle = 'Flat'
  2150. $cb_SmallBufferListDepth.Flatstyle = 'Flat'
  2151. $cb_MediumBufferListDepth.Flatstyle = 'Flat'
  2152. $cb_LargBufferListDepth.Flatstyle = 'Flat'
  2153. $cb_DisableChainedReceive.Flatstyle = 'Flat'
  2154. $cb_DisableDirectAcceptEx.Flatstyle = 'Flat'
  2155. $cb_DisableRawSecurity.Flatstyle = 'Flat'
  2156. $cb_DynamicSendBufferDisable.Flatstyle = 'Flat'
  2157. $cb_FastSendDatagramThreshold.Flatstyle = 'Flat'
  2158. $cb_FastCopyReceiveThreshold.Flatstyle = 'Flat'
  2159. $cb_IgnorePushBitOnReceives.Flatstyle = 'Flat'
  2160. $cb_IgnoreOrderlyRelease.Flatstyle = 'Flat'
  2161. $cb_TransmitWorker.Flatstyle = 'Flat'
  2162. $cb_PriorityBoost.Flatstyle = 'Flat'
  2163. $cb_IrpStackSize.Flatstyle = 'Flat'
  2164.  
  2165. $cb_DisablePortScaling.Flatstyle = 'Flat'
  2166. $cb_ManyCoreScaling.Flatstyle = 'Flat'
  2167. $cb_DisablePortScaling.DropDownStyle = 'DropDownList'
  2168. $cb_ManyCoreScaling.DropDownStyle = 'DropDownList'
  2169.  
  2170. $cb_PacketDirect.Flatstyle = 'Flat'
  2171. $cb_PacketDirect.DropDownStyle = 'DropDownList'
  2172.  
  2173. $cb_EnableCoalesce.Flatstyle = 'Flat'
  2174. $cb_EnableCoalesce.DropDownStyle = 'DropDownList'
  2175. $cb_EnableUdpTxScaling.Flatstyle = 'Flat'
  2176. $cb_EnableUdpTxScaling.DropDownStyle = 'DropDownList'
  2177.  
  2178. $cb_EnablePME.Flatstyle = 'Flat'
  2179. $cb_EnableDynamicPowerGating.Flatstyle = 'Flat'
  2180. $cb_EnableConnectedPowerGating.Flatstyle = 'Flat'
  2181. $cb_AutoPowerSaveModeEnabled.Flatstyle = 'Flat'
  2182. $cb_NicAutoPowerSaver.Flatstyle = 'Flat'
  2183. $cb_DisableDelayedPowerUp.Flatstyle = 'Flat'
  2184. $cb_ReduceSpeedOnPowerDown.Flatstyle = 'Flat'
  2185. $cb_EnablePME.DropDownStyle = 'DropDownList'
  2186. $cb_EnableDynamicPowerGating.DropDownStyle = 'DropDownList'
  2187. $cb_EnableConnectedPowerGating.DropDownStyle = 'DropDownList'
  2188. $cb_AutoPowerSaveModeEnabled.DropDownStyle = 'DropDownList'
  2189. $cb_NicAutoPowerSaver.DropDownStyle = 'DropDownList'
  2190. $cb_DisableDelayedPowerUp.DropDownStyle = 'DropDownList'
  2191. $cb_ReduceSpeedOnPowerDown.DropDownStyle = 'DropDownList'
  2192.  
  2193. $cb_DevicePolicy.Flatstyle = 'Flat'
  2194. $cb_MsiMode.Flatstyle = 'Flat'
  2195. $cb_InterruptPriority.Flatstyle = 'Flat'
  2196. $cb_MsiMode.DropDownStyle = 'DropDownList'
  2197. $cb_InterruptPriority.DropDownStyle = 'DropDownList'
  2198. $cb_DevicePolicy.DropDownStyle = 'DropDownList'
  2199. $cb_MsiMode.Enabled = $false
  2200. $cb_InterruptPriority.Enabled = $false
  2201. $lb_DevicePolicy.Enabled = $false
  2202. $cb_DevicePolicy.Enabled = $false
  2203. $btn_InterruptApply.Enabled = $false
  2204.  
  2205. $cb_AdvertiseDefaultRoute.Flatstyle = 'Flat'
  2206. $cb_Advertising.Flatstyle = 'Flat'
  2207. $cb_AutomaticMetric.Flatstyle = 'Flat'
  2208. $cb_ClampMss.Flatstyle = 'Flat'
  2209. $cb_DirectedMacWolPattern.Flatstyle = 'Flat'
  2210. $cb_EcnMarking.Flatstyle = 'Flat'
  2211. $cb_ForceArpNdWolPattern.Flatstyle = 'Flat'
  2212. $cb_Forwarding.Flatstyle = 'Flat'
  2213. $cb_IgnoreDefaultRoutes.Flatstyle = 'Flat'
  2214. $cb_ManagedAddressConfiguration.Flatstyle = 'Flat'
  2215. $cb_NeighborDiscoverySupported.Flatstyle = 'Flat'
  2216. $cb_NeighborUnreachabilityDetection.Flatstyle = 'Flat'
  2217. $cb_OtherStatefulConfiguration.Flatstyle = 'Flat'
  2218. $cb_RouterDiscovery.Flatstyle = 'Flat'
  2219. $cb_Store.Flatstyle = 'Flat'
  2220. $cb_WeakHostReceive.Flatstyle = 'Flat'
  2221. $cb_WeakHostSend.Flatstyle = 'Flat'
  2222. $cb_AdvertiseDefaultRoute.DropDownStyle = 'DropDownList'
  2223. $cb_Advertising.DropDownStyle = 'DropDownList'
  2224. $cb_AutomaticMetric.DropDownStyle = 'DropDownList'
  2225. $cb_ClampMss.DropDownStyle = 'DropDownList'
  2226. $cb_DirectedMacWolPattern.DropDownStyle = 'DropDownList'
  2227. $cb_EcnMarking.DropDownStyle = 'DropDownList'
  2228. $cb_ForceArpNdWolPattern.DropDownStyle = 'DropDownList'
  2229. $cb_Forwarding.DropDownStyle = 'DropDownList'
  2230. $cb_IgnoreDefaultRoutes.DropDownStyle = 'DropDownList'
  2231. $cb_ManagedAddressConfiguration.DropDownStyle = 'DropDownList'
  2232. $cb_NeighborDiscoverySupported.DropDownStyle = 'DropDownList'
  2233. $cb_NeighborUnreachabilityDetection.DropDownStyle = 'DropDownList'
  2234. $cb_OtherStatefulConfiguration.DropDownStyle = 'DropDownList'
  2235. $cb_RouterDiscovery.DropDownStyle = 'DropDownList'
  2236. $cb_Store.DropDownStyle = 'DropDownList'
  2237. $cb_WeakHostReceive.DropDownStyle = 'DropDownList'
  2238. $cb_WeakHostSend.DropDownStyle = 'DropDownList'
  2239.  
  2240. # ========================================================
  2241.  
  2242. # Loading at Startup Global Settings (OS Settings not Adapter specific)
  2243. $cb_osrss.text = (Get-NetOffloadGlobalSetting | select -expand ReceiveSideScaling)
  2244. $cb_osrsc.text = (Get-NetOffloadGlobalSetting | select -expand ReceiveSegmentCoalescing)
  2245. $cb_oschimney.text = (Get-NetOffloadGlobalSetting | select -expand Chimney)
  2246. $cb_ostaskoff.text = (Get-NetOffloadGlobalSetting | select -expand TaskOffload)
  2247. $cb_osntd.text = (Get-NetOffloadGlobalSetting | select -expand NetworkDirect)
  2248. $cb_osntdais.text = (Get-NetOffloadGlobalSetting | select -expand NetworkDirectAcrossIPSubnets)
  2249. $cb_ospcf.text = (Get-NetOffloadGlobalSetting | select -expand PacketCoalescingFilter)
  2250.  
  2251. # ========================================================
  2252. # RSS Global
  2253. $ErrorActionPreference = "SilentlyContinue"
  2254. $Global:TCPIP_RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
  2255. $Global:NDIS_RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\NDIS\Parameters"
  2256.  
  2257. $TCPIP_RssBaseCpu = (Get-ItemPropertyValue -Path "$TCPIP_RegPath" -Name "RssBaseCpu" -ErrorAction SilentlyContinue)
  2258. if ($TCPIP_RssBaseCpu -eq $null)
  2259. {
  2260. $cb_tcpiprssbasecpu.text = '0'
  2261. }
  2262. else
  2263. {
  2264. $cb_tcpiprssbasecpu.text = $TCPIP_RssBaseCpu
  2265. }
  2266. $NDIS_RssBaseCpu = (Get-ItemPropertyValue -Path "$NDIS_RegPath" -Name "RssBaseCpu"-ErrorAction SilentlyContinue)
  2267. if ($NDIS_RssBaseCpu -eq $null)
  2268. {
  2269. $cb_ndisrssbasecpu.text = '0'
  2270. }
  2271. else
  2272. {
  2273. $cb_ndisrssbasecpu.text = $NDIS_RssBaseCpu
  2274. }
  2275.  
  2276. $TCPIPRssBaseCpuValue = ($cb_tcpiprssbasecpu.text)
  2277. $NDISRssBaseCpuValue = ($cb_ndisrssbasecpu.text)
  2278. $cb_tcpiprssbasecpu.add_TextChanged({
  2279. Write-Host "TCP/IP - RSSBaseCpu = "$cb_tcpiprssbasecpu.text
  2280. Set-ItemProperty -Path "$TCPIP_RegPath" -Name "RssBaseCpu" -Value $cb_tcpiprssbasecpu.text -Type DWord -Force})
  2281. $cb_ndisrssbasecpu.add_TextChanged({
  2282. Write-Host "NDIS - RSSBaseCpu = "$cb_ndisrssbasecpu.text
  2283. Set-ItemProperty -Path "$NDIS_RegPath" -Name "RssBaseCpu" -Value $cb_ndisrssbasecpu.text -Type DWord -Force})
  2284.  
  2285. #$cb_tcpiprssbasecpu.TextChanged = (Set-ItemProperty -Path "$TCPIP_RegPath" -Name "RssBaseCpu" -Value $TCPIPRssBaseCpuValue -Type DWord -Force)
  2286. #$cb_ndisrssbasecpu.TextChanged = (Set-ItemProperty -Path "$NDIS_RegPath" -Name "RssBaseCpu" -Value $NDISRssBaseCpuValue -Type DWord -Force)
  2287.  
  2288. # ========================================================
  2289. # Apply Button Global Settings
  2290. function applyglobal {
  2291. #cls
  2292. if ($cb_osrss.text -eq (Get-NetOffloadGlobalSetting | select -expand ReceiveSideScaling))
  2293. {
  2294. #Write-Host " ReceiveSideScaling same as Current, skipping." -ForegroundColor green
  2295. }
  2296. else
  2297. {
  2298. Write-Host "Applying ReceiveSideScaling to"$cb_osrss.text -ForegroundColor Green
  2299. Set-NetOffloadGlobalSetting -ReceiveSideScaling $cb_osrss.text
  2300. $cb_osrss.text = (Get-NetOffloadGlobalSetting | select -expand ReceiveSideScaling)
  2301. }
  2302.  
  2303. if ($cb_osrsc.text -eq (Get-NetOffloadGlobalSetting | select -expand ReceiveSegmentCoalescing))
  2304. {
  2305. #Write-Host " ReceiveSegmentCoalescing same as Current, skipping." -ForegroundColor green
  2306. }
  2307. else
  2308. {
  2309. Write-Host "Applying ReceiveSegmentCoalescing to"$cb_osrsc.text -ForegroundColor Green
  2310. Set-NetOffloadGlobalSetting -ReceiveSegmentCoalescing $cb_osrsc.text
  2311. $cb_osrsc.text = (Get-NetOffloadGlobalSetting | select -expand ReceiveSegmentCoalescing)
  2312. }
  2313.  
  2314. if ($cb_oschimney.text -eq (Get-NetOffloadGlobalSetting | select -expand Chimney))
  2315. {
  2316. #Write-Host " Chimney same as Current, skipping." -ForegroundColor green
  2317. }
  2318. else
  2319. {
  2320. Write-Host "Applying Chimney to"$cb_oschimney.text -ForegroundColor Green
  2321. Set-NetOffloadGlobalSetting -Chimney $cb_oschimney.text
  2322. $cb_oschimney.text = (Get-NetOffloadGlobalSetting | select -expand Chimney)
  2323. }
  2324.  
  2325. if ($cb_ostaskoff.text -eq (Get-NetOffloadGlobalSetting | select -expand TaskOffload))
  2326. {
  2327. #Write-Host " TaskOffload same as Current, skipping." -ForegroundColor green
  2328. }
  2329. else
  2330. {
  2331. Write-Host "Applying TaskOffload to"$cb_ostaskoff.text -ForegroundColor Green
  2332. Set-NetOffloadGlobalSetting -TaskOffload $cb_ostaskoff.text
  2333. $cb_ostaskoff.text = (Get-NetOffloadGlobalSetting | select -expand TaskOffload)
  2334. }
  2335.  
  2336. if ($cb_osntd.text -eq (Get-NetOffloadGlobalSetting | select -expand NetworkDirect))
  2337. {
  2338. #Write-Host " NetworkDirect same as Current, skipping." -ForegroundColor green
  2339. }
  2340. else
  2341. {
  2342. Write-Host "Applying NetworkDirect to"$cb_osntd.text -ForegroundColor Green
  2343. #Set-NetOffloadGlobalSetting -NetworkDirect $cb_osntd.text
  2344. Apply_NetworkDirect
  2345. $cb_osntd.text = (Get-NetOffloadGlobalSetting | select -expand NetworkDirect)
  2346. }
  2347.  
  2348. if ($cb_osntdais.text -eq (Get-NetOffloadGlobalSetting | select -expand NetworkDirectAcrossIPSubnets))
  2349. {
  2350. #Write-Host " NetworkDirectAcrossIPSubnets same as Current, skipping." -ForegroundColor green
  2351. }
  2352. else
  2353. {
  2354. Write-Host "Applying NetworkDirectAcrossIPSubnets to"$cb_osntdais.text -ForegroundColor Green
  2355. ##Bypass
  2356. ##Set-NetOffloadGlobalSetting -NetworkDirectAcrossIPSubnets $cb_osntdais.text
  2357. Apply_NetworkDirectGlobalFlags
  2358. $cb_osntdais.text = (Get-NetOffloadGlobalSetting | select -expand NetworkDirectAcrossIPSubnets)
  2359. }
  2360.  
  2361. if ($cb_ospcf.text -eq (Get-NetOffloadGlobalSetting | select -expand PacketCoalescingFilter))
  2362. {
  2363. #Write-Host " PacketCoalescingFilter same as Current, skipping." -ForegroundColor green
  2364. }
  2365. else
  2366. {
  2367. Write-Host "Applying PacketCoalescingFilter to"$cb_ospcf.text -ForegroundColor Green
  2368. Set-NetOffloadGlobalSetting -PacketCoalescingFilter $cb_ospcf.text
  2369. $cb_ospcf.text = (Get-NetOffloadGlobalSetting | select -expand PacketCoalescingFilter)
  2370. }
  2371. }
  2372.  
  2373. function Apply_NetworkDirect{
  2374. $NetworkDirectAvaible = ((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NDIS\Parameters").PSObject.Properties.Name -contains "NetworkDirectDisable")
  2375. if ($NetworkDirectAvaible -eq $false -and $cb_osntd.Text -eq 'Disabled' ){
  2376. #Write-Host "Creating NetworkDirect DWORD with Value $($cb_osntd.Text)." -ForegroundColor Green
  2377. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NDIS\Parameters" -Name "NetworkDirectDisable" -Typ "Dword" -Value "1"
  2378. }else{
  2379. #Write-Host "Removing NetworkDirect DWORD"
  2380. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NDIS\Parameters" -Name "NetworkDirectDisable"
  2381. }
  2382. }
  2383.  
  2384. function Apply_NetworkDirectGlobalFlags{
  2385. $NetworkDirectGlobalFlags = ((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NDIS\Parameters").PSObject.Properties.Name -contains "NetworkDirectGlobalFlags")
  2386. if ($NetworkDirectGlobalFlags -eq $false -and $cb_osntdais.Text -eq 'Allowed' ){
  2387. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NDIS\Parameters" -Name "NetworkDirectGlobalFlags" -Typ "Dword" -Value "1"
  2388. }else{
  2389. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NDIS\Parameters" -Name "NetworkDirectGlobalFlags"
  2390. }
  2391. }
  2392.  
  2393.  
  2394.  
  2395. #Adapter Selection
  2396. $AdapterName = Get-NetAdapter -physical | where status -eq 'up' | Select -expand InterfaceDescription
  2397. #$AdapterName = Get-NetAdapter -IncludeHidden | Select -expand InterfaceDescription
  2398. #if($AdapterName )
  2399. @($AdapterName) | ForEach-Object {[void] $cb_AdapterNamesCombo.Items.Add($_)}
  2400.  
  2401. function a {
  2402. cls
  2403. Write-Host $cb_AdapterNamesCombo.Text
  2404. $Global:NIC_Desc = $cb_AdapterNamesCombo.Text
  2405. $lbl_ndisver.Text = Get-NetAdapter -InterfaceDescription $AdapterName | Select -expand NdisVersion
  2406. $PhysicalAdapter = Get-WmiObject -Class Win32_NetworkAdapter|Where-Object{$_.Name -like "$NIC_Desc"}
  2407. $PhysicalAdapterName = $PhysicalAdapter.Name
  2408. $DeviceID = $PhysicalAdapter.DeviceID
  2409. If([Int32]$DeviceID -lt 10)
  2410. {
  2411. $AdapterDeviceNumber = "000"+$DeviceID
  2412. }
  2413. Else
  2414. {
  2415. $AdapterDeviceNumber = "00"+$DeviceID
  2416. }
  2417.  
  2418. $Global:EthernetClassGuid = Get-WmiObject Win32_PnPEntity | Where-Object{$_.Name -like "$NIC_Desc" } | Select -expand ClassGuid
  2419. $Global:EthernetPNPDeviceID = Get-WmiObject Win32_PnPEntity | Where-Object{$_.Name -like "$NIC_Desc" } | Select -expand PNPDeviceID
  2420. $Global:NetConnectionID = Get-WmiObject -Class Win32_NetworkAdapter | Where-Object{$_.Name -like "$NIC_Desc" } | Select -expand NetConnectionID
  2421. #check whether the registry path exists.
  2422. #SupressTerminationErrors
  2423. $ErrorActionPreference="SilentlyContinue"
  2424.  
  2425. $Global:KeyPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\$AdapterDeviceNumber"
  2426. If(Test-Path -Path $KeyPath)
  2427. {
  2428. Write-Host "Path found at ($KeyPath)."
  2429. $lbl_Path.Text = $KeyPath
  2430. }
  2431. Else
  2432. {
  2433. Write-Warning "The path ($KeyPath) not found."
  2434. }
  2435. #RSS Enabled or Not
  2436. $Global:rssstatus = (Get-NetAdapterRss).Enabled
  2437. if($rssstatus -eq 'True')
  2438. {
  2439. $cb_rss_onoff.Text = "Enable"
  2440. }
  2441. else
  2442. {
  2443. $cb_rss_onoff.Text = "Disable"
  2444. }
  2445. if($rssstatus -eq $Null )
  2446. {
  2447. Write-Warning "RSS is handled by OS, because of Network Driver!"
  2448. $btn_rssaddsupport.Enabled = $true
  2449. #$cb_rssqueues.Enabled = $False
  2450. #$cb_rssprofile.Enabled = $False
  2451. #$cb_rssbaseproc.Enabled = $False
  2452. #$cb_rssmaxproc.Enabled = $False
  2453. #$cb_rssmaxprocs.Enabled = $False
  2454. }
  2455. else
  2456. {
  2457. $cb_rssqueues.Enabled = $true
  2458. $cb_rssprofile.Enabled = $true
  2459. $cb_rssbaseproc.Enabled = $true
  2460. $cb_rssmaxproc.Enabled = $true
  2461. $cb_rssmaxprocs.Enabled = $true
  2462. $btn_rssaddsupport.Enabled = $false
  2463. }
  2464. if($cb_rss_onoff.Text -eq 'Enable')
  2465. {
  2466. $Global:Rssstatusset = ($True)
  2467. }
  2468. else
  2469. {
  2470. $Global:Rssstatusset = ($False)
  2471. }
  2472.  
  2473. #IPv6 Disabled?
  2474. $IPv6_1 = (Get-ItemPropertyValue -Path "REGISTRY::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name "DisabledComponents")
  2475. $IPv6_2 = (Get-ItemPropertyValue -Path "REGISTRY::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name "EnableICSIPv6")
  2476.  
  2477. if ($IPv6_1 -eq "255" -and $IPv6_2 -eq "0"){
  2478. Write-Warning "IPv6 is Disabled by Registry." -ForegroundColor Green
  2479. $cb_IPv6.Checked = $False
  2480. $cb_IPv6.Enabled = $False
  2481. $cb_IPv6.Visible = $False
  2482. $cb_IPv4.Checked = $True
  2483. $Global:AddressFamily = "IPv4"
  2484. }else{
  2485. Write-Warning "IPv4/IPv6 is Enabled by Registry. Selecting IPv4 as Default for AddressFamily" -ForegroundColor Green
  2486. $cb_IPv4.Checked = $true
  2487. $cb_IPv6.Checked = $false
  2488. $Global:AddressFamily = "IPv4"
  2489. }
  2490.  
  2491. #RSS Queues
  2492. #Query Available RSSQueues
  2493. $AdapterQueuesRegTest = (Test-Path -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum")
  2494. if($rssstatus -eq $null -Or $cb_rssqueues.Items.Count -eq '0' -and $AdapterQueuesRegTest -eq $false){
  2495. #Write-Host "Powershell"
  2496. $Global:AdapterQueues = Get-NetAdapterRss -InterfaceDescription $NIC_Desc | select -expand NumberOfReceiveQueues
  2497. $cb_rssqueues.Items.Add($AdapterQueues)
  2498. $cb_rssqueues.Text = $AdapterQueues
  2499. }else{
  2500. #Write-Host "Registry"
  2501. $AdapterQueues = Get-Item -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" | Select -ExpandProperty Property
  2502. @($AdapterQueues) | ForEach-Object {[void] $cb_rssqueues.Items.Add($_)}
  2503. $AdapterQueues = Get-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues" -Name "Default" | Select -expand Default
  2504. $cb_rssqueues.Text = $AdapterQueues
  2505. }
  2506.  
  2507. #$RegistryQueues = Get-ItemPropertyValue -Path "$KeyPath\Ndi\Params\*NumRssQueues" -Name "Default" | Select -expand Default
  2508. #$PowershellQueues = Get-NetAdapterRss -InterfaceDescription $NIC_Desc | select -expand NumberOfReceiveQueues
  2509. #if($RegistryQueues -eq $PowershellQueues){
  2510. # Write-Host "NumberOfReceiveQueues is equal."
  2511. #}else{
  2512. # Write-Warning "NumberOfReceiveQueues is not the same. (Powershell and Registry not equal!) Using Registry Value."
  2513. #}
  2514.  
  2515. #RSS Profiles
  2516. $OSRSSProfiles = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetAdapterRss.Profile].GetEnumValues()
  2517. @($OSRSSProfiles) | ForEach-Object {[void] $cb_rssprofile.Items.Add($_)}
  2518. $cb_rssprofile.Text = Get-NetAdapterRss | Select -ExpandProperty Profile
  2519.  
  2520. #RSS BaseProc
  2521. $cb_rssbaseproc.Text = Get-NetAdapterRss | Select -ExpandProperty "BaseProcessorNumber"
  2522. $cb_rssmaxproc.Text = Get-NetAdapterRss | Select -ExpandProperty "MaxProcessorNumber"
  2523. $cb_rssmaxprocs.Text = Get-NetAdapterRss | Select -ExpandProperty "MaxProcessors"
  2524.  
  2525. # Network Adapter Advanced Settings
  2526. #
  2527. #FlowControl
  2528. $FlowControl = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*FlowControl")
  2529. $cb_flowcontrol.SelectedIndex=$FlowControl
  2530. #IPChecksumOffloadIPv4
  2531. $IPChecksumOffloadIPv4 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*IPChecksumOffloadIPv4")
  2532. $cb_IPChecksumOffloadIPv4.SelectedIndex=$IPChecksumOffloadIPv4
  2533. #TCPChecksumOffloadIPv4
  2534. $TCPChecksumOffloadIPv4 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv4")
  2535. $cb_TCPChecksumOffloadIPv4.SelectedIndex=$TCPChecksumOffloadIPv4
  2536. #TCPChecksumOffloadIPv6
  2537. $TCPChecksumOffloadIPv6 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv6")
  2538. $cb_TCPChecksumOffloadIPv6.SelectedIndex=$TCPChecksumOffloadIPv6
  2539. #UDPChecksumOffloadIPv4
  2540. $UDPChecksumOffloadIPv4 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv4")
  2541. $cb_UDPChecksumOffloadIPv4.SelectedIndex=$UDPChecksumOffloadIPv4
  2542. #UDPChecksumOffloadIPv6
  2543. $UDPChecksumOffloadIPv6 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv6")
  2544. $cb_UDPChecksumOffloadIPv6.SelectedIndex=$UDPChecksumOffloadIPv6
  2545. #InterruptModeration
  2546. $InterruptModeration = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*InterruptModeration")
  2547. $cb_InterruptModeration.SelectedIndex=$InterruptModeration
  2548. #InterruptModerationRate
  2549. $InterruptModerationRate = (Get-ItemPropertyValue -Path "$KeyPath" -Name "ITR")
  2550. $cb_InterruptModerationRate.Text=$InterruptModerationRate
  2551. #LsoV2IPv4
  2552. $LsoV2IPv4 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*LsoV2IPv4")
  2553. $cb_LsoV2IPv4.SelectedIndex=$LsoV2IPv4
  2554. #LsoV2IPv6
  2555. $LsoV2IPv6 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*LsoV2IPv6")
  2556. $cb_LsoV2IPv6.SelectedIndex=$LsoV2IPv6
  2557. #LsoV1IPv4
  2558. $LsoV1IPv4 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*LsoV1IPv4")
  2559. $cb_LsoV1IPv4.SelectedIndex=$LsoV1IPv4
  2560. #PMARPOffload
  2561. $PMARPOffload = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PMARPOffload")
  2562. $cb_PMARPOffload.SelectedIndex=$PMARPOffload
  2563. #PMNSOffload
  2564. $PMNSOffload = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PMNSOffload")
  2565. $cb_PMNSOffload.SelectedIndex=$PMNSOffload
  2566. #PriorityVLANTag
  2567. $PriorityVLANTag = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PriorityVLANTag")
  2568. $cb_PriorityVLANTag.SelectedIndex=$PriorityVLANTag
  2569. #ReceiveBuffers
  2570. $ReceiveBuffers = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*ReceiveBuffers")
  2571. $cb_ReceiveBuffers.Text=$ReceiveBuffers
  2572. #TransmitBuffers
  2573. $TransmitBuffers = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*TransmitBuffers")
  2574. $cb_TransmitBuffers.Text=$TransmitBuffers
  2575. #TxIntDelay
  2576. $TxIntDelay = (Get-ItemPropertyValue -Path "$KeyPath" -Name "TxIntDelay")
  2577. $tb_TxIntDelay.Text=$TxIntDelay
  2578. #PacketDirect
  2579. $PacketDirect = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PacketDirect")
  2580. if($PacketDirect -eq $null){
  2581. $cb_PacketDirect.Text="Undefined"
  2582. }else{
  2583. $cb_PacketDirect.SelectedIndex=$PacketDirect}
  2584. #EnableCoalesce ( Default Enabled )
  2585. $EnableCoalesce = (Get-ItemPropertyValue -Path "$KeyPath" -Name "EnableCoalesce")
  2586. if($EnableCoalesce -eq $null){
  2587. $cb_EnableCoalesce.Text="Enabled"
  2588. }else{
  2589. $cb_EnableCoalesce.SelectedIndex=$EnableCoalesce}
  2590. #CoalesceBufferSize ( Default 2048 )
  2591. $CoalesceBufferSize = (Get-ItemPropertyValue -Path "$KeyPath" -Name "CoalesceBufferSize")
  2592. if($CoalesceBufferSize -eq $null){
  2593. $cb_CoalesceBufferSize.Text="2048"
  2594. }else{
  2595. $cb_CoalesceBufferSize.Text=$CoalesceBufferSize}
  2596. #EnableUdpTxScaling
  2597. $EnableUdpTxScaling = (Get-ItemPropertyValue -Path "$KeyPath" -Name "EnableUdpTxScaling")
  2598. if($EnableUdpTxScaling -eq $null){
  2599. $cb_EnableUdpTxScaling.Text="Enabled"
  2600. }else{
  2601. $cb_EnableUdpTxScaling.SelectedIndex=$EnableUdpTxScaling}
  2602.  
  2603. #EnablePME
  2604. $EnablePME = (Get-ItemPropertyValue -Path "$KeyPath" -Name "EnablePME")
  2605. if ($EnablePME -eq '0' -or $EnablePME -eq '1' ){
  2606. $cb_EnablePME.SelectedIndex=$EnablePME
  2607. }else{
  2608. $cb_EnablePME.Items.Add('Undeclared')
  2609. $cb_EnablePME.Text = 'Undeclared'
  2610. }
  2611. #EnableDynamicPowerGating
  2612. $EnableDynamicPowerGating = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*EnableDynamicPowerGating")
  2613. if ($EnableDynamicPowerGating -eq 0 -or $EnableDynamicPowerGating -eq 1 ){
  2614. $cb_EnableDynamicPowerGating.SelectedIndex=$EnableDynamicPowerGating
  2615. }else{
  2616. $cb_EnableDynamicPowerGating.Items.Add('Undeclared')
  2617. $cb_EnableDynamicPowerGating.Text = 'Undeclared'
  2618. }
  2619. #EnableConnectedPowerGating
  2620. $EnableConnectedPowerGating = (Get-ItemPropertyValue -Path "$KeyPath" -Name "EnableConnectedPowerGating")
  2621. if ($EnableConnectedPowerGating -eq 0 -or $EnableConnectedPowerGating -eq 1 ){
  2622. $cb_EnableConnectedPowerGating.SelectedIndex=$EnableConnectedPowerGating
  2623. }else{
  2624. $cb_EnableConnectedPowerGating.Items.Add('Undeclared')
  2625. $cb_EnableConnectedPowerGating.Text = 'Undeclared'
  2626. }
  2627.  
  2628. #AutoPowerSaveModeEnabled
  2629. $AutoPowerSaveModeEnabled = (Get-ItemPropertyValue -Path "$KeyPath" -Name "AutoPowerSaveModeEnabled")
  2630. if ($AutoPowerSaveModeEnabled -eq 0 -or $AutoPowerSaveModeEnabled -eq 1 ){
  2631. $cb_AutoPowerSaveModeEnabled.SelectedIndex=$AutoPowerSaveModeEnabled
  2632. }else{
  2633. $cb_AutoPowerSaveModeEnabled.Items.Add('Undeclared')
  2634. $cb_EnableConnectedPowerGating.Text = 'Enabled'
  2635. }
  2636.  
  2637. #NicAutoPowerSaver
  2638. $NicAutoPowerSaver = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*NicAutoPowerSaver")
  2639. if ($NicAutoPowerSaver -eq 0 -or $NicAutoPowerSaver -eq 1 ){
  2640. $cb_NicAutoPowerSaver.SelectedIndex=$NicAutoPowerSaver
  2641. }else{
  2642. $cb_NicAutoPowerSaver.Items.Add('Undeclared')
  2643. $cb_NicAutoPowerSaver.Text = 'Undeclared'
  2644. }
  2645.  
  2646. #DisableDelayedPowerUp
  2647. $DisableDelayedPowerUp = (Get-ItemPropertyValue -Path "$KeyPath" -Name "DisableDelayedPowerUp")
  2648. if ($DisableDelayedPowerUp -eq 0 -or $DisableDelayedPowerUp -eq 1 ){
  2649. $cb_DisableDelayedPowerUp.SelectedIndex=$DisableDelayedPowerUp
  2650. }else{
  2651. $cb_DisableDelayedPowerUp.Items.Add('Undeclared')
  2652. $cb_DisableDelayedPowerUp.Text = 'Undeclared'
  2653. }
  2654.  
  2655. #ReduceSpeedOnPowerDown
  2656. $ReduceSpeedOnPowerDown = (Get-ItemPropertyValue -Path "$KeyPath" -Name "ReduceSpeedOnPowerDown")
  2657. if ($ReduceSpeedOnPowerDown -eq 0 -or $ReduceSpeedOnPowerDown -eq 1 ){
  2658. $cb_ReduceSpeedOnPowerDown.SelectedIndex=$ReduceSpeedOnPowerDown
  2659. }else{
  2660. $cb_ReduceSpeedOnPowerDown.Items.Add('Undeclared')
  2661. $cb_ReduceSpeedOnPowerDown.Text = 'Undeclared'
  2662. }
  2663.  
  2664. #DisablePortScaling
  2665. $DisablePortScaling = (Get-ItemPropertyValue -Path "$KeyPath" -Name "DisablePortScaling")
  2666. if ($DisablePortScaling -eq 0 -or $DisablePortScaling -eq 1 ){
  2667. $cb_DisablePortScaling.SelectedIndex=$DisablePortScaling
  2668. }else{
  2669. $cb_DisablePortScaling.Items.Add('Undeclared')
  2670. $cb_DisablePortScaling.Text = 'Undeclared'
  2671. }
  2672.  
  2673. #ManyCoreScaling
  2674. $ManyCoreScaling = (Get-ItemPropertyValue -Path "$KeyPath" -Name "ManyCoreScaling")
  2675. if ($ManyCoreScaling -eq 0 -or $ManyCoreScaling -eq 1 ){
  2676. $cb_ManyCoreScaling.SelectedIndex=$ManyCoreScaling
  2677. }else{
  2678. $cb_ManyCoreScaling.Items.Add('Undeclared')
  2679. $cb_ManyCoreScaling.Text = 'Undeclared'
  2680. }
  2681.  
  2682.  
  2683. #Getting Tweaks Settings
  2684.  
  2685. #AFDDefaultReceiveWindow
  2686. $AFDDefaultReceiveWindow = (Get-ItemPropertyValue -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultReceiveWindow")
  2687. $cb_Afd_defaultRecWin.Text=$AFDDefaultReceiveWindow
  2688.  
  2689. #AFDDefaultSendWindow
  2690. $AFDDefaultSendWindow = (Get-ItemPropertyValue -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultSendWindow")
  2691. $cb_Afd_defaultSendWin.Text=$AFDDefaultSendWindow
  2692.  
  2693. #BufferMultiplier
  2694. $AFDBufferMultiplier = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferMultiplier")
  2695. $cb_BufferMultiplier.Text=$AFDBufferMultiplier
  2696.  
  2697. #DisableAddressSharing /CHeckValue
  2698. $AFDDisableAddressSharing = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableAddressSharing")
  2699. $cb_DisableAddressSharing.Text=$AFDDisableAddressSharing
  2700.  
  2701. #BufferAlignment
  2702. $AFDBufferAlignment = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferAlignment")
  2703. $cb_BufferAlignment.Text=$AFDBufferAlignment
  2704. if ($cb_BufferAlignment.Text -eq $null -or $cb_BufferAlignment.Text -eq '' ){
  2705. $cb_BufferAlignment.Text='64'
  2706. }
  2707.  
  2708.  
  2709. #DoNotHoldNICBuffers
  2710. $AFDDoNotHoldNICBuffers = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "DoNotHoldNICBuffers")
  2711. $cb_DoNotHoldNICBuffers.Text=$AFDDoNotHoldNICBuffers
  2712. if ($cb_DoNotHoldNICBuffers.Text -eq $null -or $cb_DoNotHoldNICBuffers.Text -eq '' ){
  2713. $cb_DoNotHoldNICBuffers.Text='1'
  2714. }
  2715.  
  2716.  
  2717. #SmallBufferSize
  2718. $AFDSmallBufferSize = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferSize")
  2719. $cb_SmallBufferSize.Text=$AFDSmallBufferSize
  2720. if ($cb_SmallBufferSize.Text -eq $null -or $cb_SmallBufferSize.Text -eq '' ){
  2721. $cb_SmallBufferSize.Text='128'
  2722. }
  2723.  
  2724.  
  2725. #MediumBufferSize
  2726. $AFDMediumBufferSize = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferSize")
  2727. $cb_MediumBufferSize.Text=$AFDMediumBufferSize
  2728. if ($cb_MediumBufferSize.Text -eq $null -or $cb_MediumBufferSize.Text -eq '' ){
  2729. $cb_MediumBufferSize.Text='1504'
  2730. }
  2731.  
  2732.  
  2733. #LargeBufferSize
  2734. $AFDLargeBufferSize = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargeBufferSize")
  2735. $cb_LargeBufferSize.Text=$AFDLargeBufferSize
  2736. if ($cb_LargeBufferSize.Text -eq $null -or $cb_LargeBufferSize.Text -eq '' ){
  2737. $cb_LargeBufferSize.Text='3472'
  2738. }
  2739.  
  2740.  
  2741. #HugeBufferSize
  2742. $AFDHugeBufferSize = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "HugeBufferSize")
  2743. $cb_HugeBufferSize.Text=$AFDHugeBufferSize
  2744. if ($cb_HugeBufferSize.Text -eq $null -or $cb_HugeBufferSize.Text -eq '' ){
  2745. $cb_HugeBufferSize.Text='32768'
  2746. }
  2747.  
  2748.  
  2749. #SmallBufferListDepth /CheckValue
  2750. $AFDSmallBufferListDepth = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferListDepth")
  2751. $cb_SmallBufferListDepth.Text=$AFDSmallBufferListDepth
  2752.  
  2753. #MediumBufferListDepth /CheckValue
  2754. $AFDMediumBufferListDepth = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferListDepth")
  2755. $cb_MediumBufferListDepth.Text=$AFDMediumBufferListDepth
  2756.  
  2757. #LargBufferListDepth /CheckValue and Name Larg
  2758. $AFDLargBufferListDepth = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargBufferListDepth")
  2759. $cb_LargBufferListDepth.Text=$AFDLargBufferListDepth
  2760.  
  2761. #DisableChainedReceive
  2762. $AFDDisableChainedReceive = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableChainedReceive")
  2763. $cb_DisableChainedReceive.Text=$AFDDisableChainedReceive
  2764. if ($cb_DisableChainedReceive.Text -eq $null -or $cb_DisableChainedReceive.Text -eq '' ){
  2765. $cb_DisableChainedReceive.Text='0'
  2766. }
  2767.  
  2768.  
  2769. #DisableDirectAcceptEx /Check Value
  2770. $AFDDisableDirectAcceptEx = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableDirectAcceptEx")
  2771. $cb_DisableDirectAcceptEx.Text=$AFDDisableDirectAcceptEx
  2772.  
  2773.  
  2774. #DisableRawSecurity
  2775. $AFDDisableRawSecurity = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableRawSecurity")
  2776. $cb_DisableRawSecurity.Text=$AFDDisableRawSecurity
  2777. if ($cb_DisableRawSecurity.Text -eq $null -or $cb_DisableRawSecurity.Text -eq '' ){
  2778. $cb_DisableRawSecurity.Text='0'
  2779. }
  2780.  
  2781.  
  2782. #DynamicSendBufferDisable
  2783. $AFDDynamicSendBufferDisable = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "DynamicSendBufferDisable")
  2784. $cb_DynamicSendBufferDisable.Text=$AFDDynamicSendBufferDisable
  2785. if ($cb_DynamicSendBufferDisable.Text -eq $null -or $cb_DynamicSendBufferDisable.Text -eq '' ){
  2786. $cb_DynamicSendBufferDisable.Text='1'
  2787. }
  2788.  
  2789.  
  2790. #FastSendDatagramThreshold(1803 = 0 21H2 = 65536)
  2791. $AFDFastSendDatagramThreshold = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastSendDatagramThreshold")
  2792. $cb_FastSendDatagramThreshold.Text=$AFDFastSendDatagramThreshold
  2793. #if ($cb_FastSendDatagramThreshold.Text -eq $null -or $cb_FastSendDatagramThreshold.Text -eq '' ){
  2794. # $cb_FastSendDatagramThreshold.Text='65536'
  2795. #}
  2796.  
  2797.  
  2798. #FastCopyReceiveThreshold /Check Value
  2799. $AFDFastCopyReceiveThreshold = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastCopyReceiveThreshold")
  2800. $cb_FastCopyReceiveThreshold.Text=$AFDFastCopyReceiveThreshold
  2801. #if ($cb_FastCopyReceiveThreshold.Text -eq $null -or $cb_FastCopyReceiveThreshold.Text -eq '' ){
  2802. # $cb_FastCopyReceiveThreshold.Text='0'
  2803. #}
  2804.  
  2805.  
  2806. #IgnorePushBitOnReceives /Check Value
  2807. $AFDIgnorePushBitOnReceives = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnorePushBitOnReceives")
  2808. $cb_IgnorePushBitOnReceives.Text=$AFDIgnorePushBitOnReceives
  2809. if ($cb_IgnorePushBitOnReceives.Text -eq $null -or $cb_IgnorePushBitOnReceives.Text -eq '' ){
  2810. $cb_IgnorePushBitOnReceives.Text='0'
  2811. }
  2812.  
  2813.  
  2814. #IgnoreOrderlyRelease /Check Value
  2815. $AFDIgnoreOrderlyRelease = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnoreOrderlyRelease")
  2816. $cb_IgnoreOrderlyRelease.Text=$AFDIgnoreOrderlyRelease
  2817. if ($cb_IgnoreOrderlyRelease.Text -eq $null -or $cb_IgnoreOrderlyRelease.Text -eq '' ){
  2818. $cb_IgnoreOrderlyRelease.Text='0'
  2819. }
  2820.  
  2821.  
  2822. #TransmitWorker
  2823. $AFDTransmitWorker = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "TransmitWorker")
  2824. $cb_TransmitWorker.Text=$AFDTransmitWorker
  2825. if ($cb_TransmitWorker.Text -eq $null -or $cb_TransmitWorker.Text -eq '' ){
  2826. $cb_TransmitWorker.Text='16'
  2827. }
  2828.  
  2829.  
  2830. #PriorityBoost
  2831. $AFDPriorityBoost = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "PriorityBoost")
  2832. $cb_PriorityBoost.Text=$AFDPriorityBoost
  2833. if ($cb_PriorityBoost.Text -eq $null -or $cb_PriorityBoost.Text -eq '' ){
  2834. $cb_PriorityBoost.Text='2'
  2835. }
  2836.  
  2837.  
  2838. #IrpStackSize
  2839. $AFDIrpStackSize = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "IrpStackSize")
  2840. $cb_IrpStackSize.Text=$AFDIrpStackSize
  2841. if ($cb_IrpStackSize.Text -eq $null -or $cb_IrpStackSize.Text -eq '' ){
  2842. $cb_IrpStackSize.Text='4'
  2843. }
  2844.  
  2845.  
  2846. #NetIPInterface
  2847.  
  2848. #NetIPInterface
  2849. #AdvertiseDefaultRoute
  2850. $AdvertiseDefaultRoute = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.AdvertiseDefaultRoute].GetEnumValues()
  2851. @($AdvertiseDefaultRoute) | ForEach-Object {[void] $cb_AdvertiseDefaultRoute.Items.Add($_)}
  2852. $cb_AdvertiseDefaultRoute.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand AdvertiseDefaultRoute
  2853.  
  2854. #Advertising
  2855. $Advertising = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.Advertising].GetEnumValues()
  2856. @($Advertising) | ForEach-Object {[void] $cb_Advertising.Items.Add($_)}
  2857. $cb_Advertising.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Advertising
  2858.  
  2859. #AutomaticMetric
  2860. $AutomaticMetric = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.AutomaticMetric].GetEnumValues()
  2861. @($AutomaticMetric) | ForEach-Object {[void] $cb_AutomaticMetric.Items.Add($_)}
  2862. $cb_AutomaticMetric.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand AutomaticMetric
  2863.  
  2864. #ClampMss
  2865. $ClampMss = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.ClampMss].GetEnumValues()
  2866. @($ClampMss) | ForEach-Object {[void] $cb_ClampMss.Items.Add($_)}
  2867. $cb_ClampMss.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ClampMss
  2868.  
  2869. #DirectedMacWolPattern
  2870. $DirectedMacWolPattern = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.DirectedMacWolPattern].GetEnumValues()
  2871. @($DirectedMacWolPattern) | ForEach-Object {[void] $cb_DirectedMacWolPattern.Items.Add($_)}
  2872. $cb_DirectedMacWolPattern.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DirectedMacWolPattern
  2873.  
  2874. #EcnMarking
  2875. $EcnMarking = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.EcnMarking].GetEnumValues()
  2876. @($EcnMarking) | ForEach-Object {[void] $cb_EcnMarking.Items.Add($_)}
  2877. $cb_EcnMarking.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand EcnMarking
  2878.  
  2879. #ForceArpNdWolPattern
  2880. $ForceArpNdWolPattern = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.ForceArpNdWolPattern].GetEnumValues()
  2881. @($ForceArpNdWolPattern) | ForEach-Object {[void] $cb_ForceArpNdWolPattern.Items.Add($_)}
  2882. $cb_ForceArpNdWolPattern.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ForceArpNdWolPattern
  2883.  
  2884. #Forwarding
  2885. $Forwarding = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.Forwarding].GetEnumValues()
  2886. @($Forwarding) | ForEach-Object {[void] $cb_Forwarding.Items.Add($_)}
  2887. $cb_Forwarding.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Forwarding
  2888.  
  2889. #IgnoreDefaultRoutes
  2890. $IgnoreDefaultRoutes = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.IgnoreDefaultRoutes].GetEnumValues()
  2891. @($IgnoreDefaultRoutes) | ForEach-Object {[void] $cb_IgnoreDefaultRoutes.Items.Add($_)}
  2892. $cb_IgnoreDefaultRoutes.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand IgnoreDefaultRoutes
  2893.  
  2894. #ManagedAddressConfiguration
  2895. $ManagedAddressConfiguration = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.ManagedAddressConfiguration].GetEnumValues()
  2896. @($ManagedAddressConfiguration) | ForEach-Object {[void] $cb_ManagedAddressConfiguration.Items.Add($_)}
  2897. $cb_ManagedAddressConfiguration.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ManagedAddressConfiguration
  2898.  
  2899. #NeighborDiscoverySupported
  2900. $NeighborDiscoverySupported = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.NeighborDiscoverySupported].GetEnumValues()
  2901. @($NeighborDiscoverySupported) | ForEach-Object {[void] $cb_NeighborDiscoverySupported.Items.Add($_)}
  2902. $cb_NeighborDiscoverySupported.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NeighborDiscoverySupported
  2903.  
  2904. #NeighborUnreachabilityDetection
  2905. $NeighborUnreachabilityDetection = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.NeighborUnreachabilityDetection].GetEnumValues()
  2906. @($NeighborUnreachabilityDetection) | ForEach-Object {[void] $cb_NeighborUnreachabilityDetection.Items.Add($_)}
  2907. $cb_NeighborUnreachabilityDetection.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NeighborUnreachabilityDetection
  2908.  
  2909. #OtherStatefulConfiguration
  2910. $OtherStatefulConfiguration = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.OtherStatefulConfiguration].GetEnumValues()
  2911. @($OtherStatefulConfiguration) | ForEach-Object {[void] $cb_OtherStatefulConfiguration.Items.Add($_)}
  2912. $cb_OtherStatefulConfiguration.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand OtherStatefulConfiguration
  2913.  
  2914. #RouterDiscovery
  2915. $RouterDiscovery = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.RouterDiscovery].GetEnumValues()
  2916. @($RouterDiscovery) | ForEach-Object {[void] $cb_RouterDiscovery.Items.Add($_)}
  2917. $cb_RouterDiscovery.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand RouterDiscovery
  2918.  
  2919. #Store
  2920. $Store = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.Store].GetEnumValues()
  2921. @($Store) | ForEach-Object {[void] $cb_Store.Items.Add($_)}
  2922. $cb_Store.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Store
  2923.  
  2924. #WeakHostReceive
  2925. $WeakHostReceive = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.WeakHostReceive].GetEnumValues()
  2926. @($WeakHostReceive) | ForEach-Object {[void] $cb_WeakHostReceive.Items.Add($_)}
  2927. $cb_WeakHostReceive.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand WeakHostReceive
  2928.  
  2929. #WeakHostSend
  2930. $WeakHostSend = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.WeakHostSend].GetEnumValues()
  2931. @($WeakHostSend) | ForEach-Object {[void] $cb_WeakHostSend.Items.Add($_)}
  2932. $cb_WeakHostSend.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand WeakHostSend
  2933.  
  2934. #CurrentHopLimit
  2935. #When this parameter value is set to 0, it uses this default.
  2936. $tb_CurrentHopLimit.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand CurrentHopLimit
  2937.  
  2938. #BaseReachableTime
  2939. #Specifies the base value for random reachable time, in milliseconds. For more information, see RFC 2461.
  2940. #The default value is 30000.
  2941. $tb_BaseReachableTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand BaseReachableTime
  2942.  
  2943. #ReachableTime
  2944. #Specifies an array of reachable time values. This parameter is the time, in milliseconds, that a node assumes that a neighbor
  2945. #is reachable after having received a reachability confirmation. This parameter works with the NeighborUnreachabilityDetection parameter.
  2946. $tb_ReachableTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ReachableTime
  2947.  
  2948. #DadRetransmitTime
  2949. #Specifies a value for the time interval between neighbor solicitation messages.
  2950. $tb_DadRetransmitTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DadRetransmitTime
  2951.  
  2952. #DadTransmits
  2953. #Specifies a value for the number of consecutive messages sent while the network driver performs duplicate address detection.
  2954. $tb_DadTransmits.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DadTransmits
  2955.  
  2956. #NlMtu
  2957. #Specifies the network layer Maximum Transmission Unit (MTU) value, in bytes, for an IP interface.
  2958. #For IPv4 the minimum value is 576 bytes. For IPv6 the minimum is value is 1280 bytes.
  2959. #For both IPv4 and IPv6, the maximum value is 2^32-1 (4294967295). You cannot set values outside these ranges.
  2960. #If this parameter is set to 0, then it will remain unchanged and maintain its current value. The IP interface will not transmit packets larger than the maximum value.
  2961. $tb_NlMtu.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NlMtu
  2962.  
  2963. #RetransmitTime (RetransmitTimeMs)
  2964. #Specifies a value for timeout and retransmission, in milliseconds, for Neighbor Solicitation messages.
  2965. #For more information, see RetransTimer in RFC 2461.
  2966. #By default, the value is set to 1000.
  2967. $tb_RetransmitTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand RetransmitTime
  2968.  
  2969. $PathInterrupt = 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum'
  2970. #$Global:EthernetClassGuid
  2971. #$Global:EthernetPNPDeviceID
  2972. $Global:NewPathInterrupt = "$PathInterrupt\$EthernetPNPDeviceID"
  2973. $Test = Test-Path REGISTRY::$NewPathInterrupt
  2974. if ($Test){
  2975. $cb_MsiMode.Enabled = $True
  2976. $cb_InterruptPriority.Enabled = $True
  2977. $lb_MsiMode.Enabled = $True
  2978. $lb_InterruptPriority.Enabled = $True
  2979. $lb_DevicePolicy.Enabled = $True
  2980. $cb_DevicePolicy.Enabled = $True
  2981. $btn_InterruptApply.Enabled = $True
  2982. $MsiModeRegistry = Get-ItemPropertyValue -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\MessageSignaledInterruptProperties" -Name "MSISupported"
  2983. if($MsiModeRegistry -eq "1"){
  2984. $cb_MsiMode.Text = "Enabled"}
  2985. if($MsiModeRegistry -eq "0"){
  2986. $cb_MsiMode.Text = "Disabled"}
  2987.  
  2988. $DevicePriority = Get-ItemPropertyValue -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\Affinity Policy" -Name "DevicePriority"
  2989. $Global:DevicePriorityAvailable = ((Get-ItemProperty -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\Affinity Policy").PSObject.Properties.Name -contains "DevicePriority")
  2990. if($DevicePriority -eq "0"){
  2991. $cb_InterruptPriority.Text = "Undefined"}
  2992. if($DevicePriority -eq "1"){
  2993. $cb_InterruptPriority.Text = "Low"}
  2994. if($DevicePriority -eq "2"){
  2995. $cb_InterruptPriority.Text = "Normal"}
  2996. if($DevicePriority -eq "3"){
  2997. $cb_InterruptPriority.Text = "High"}
  2998.  
  2999. $DevicePolicy = Get-ItemPropertyValue -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\Affinity Policy" -Name "DevicePolicy"
  3000. #Default Affinity policy, system dependent.
  3001. if($DevicePolicy -eq "0" -or $DevicePolicy -eq $null){
  3002. $cb_DevicePolicy.Text = "MachineDefault"}
  3003. #Target all processors located in same NUMA Node Device.
  3004. if($DevicePolicy -eq "1"){
  3005. $cb_DevicePolicy.Text = "AllCloseProcessors"}
  3006. #Target one processor located in same NUMA Node as Device.
  3007. if($DevicePolicy -eq "2"){
  3008. $cb_DevicePolicy.Text = "OneCloseProcessor"}
  3009. #Target all Processors in machine.
  3010. if($DevicePolicy -eq "3"){
  3011. $cb_DevicePolicy.Text = "ProcessorsInMachine"}
  3012. #Target processors specified in mask, use set Mask.
  3013. if($DevicePolicy -eq "4"){
  3014. $cb_DevicePolicy.Text = "SpecifiedProcessors"}
  3015. #Spread Message-Signaled-Interrupts to different processors, if possible.
  3016. if($DevicePolicy -eq "5"){
  3017. $cb_DevicePolicy.Text = "SreadMessagesAcrossAllProcessors"}
  3018. }
  3019. }
  3020.  
  3021. #AddRSSSupport
  3022. function RSSEnable{
  3023. Write-Host "Enabling RSS Support for "$PhysicalAdapter.Name
  3024. New-Item "$KeyPath\Ndi\Params\*RSS" -Force
  3025.  
  3026. New-ItemProperty "$KeyPath\Ndi\Params\*RSS" -Name "ParamDesc" -PropertyTyp "String" -Value "Receive Side Scaling" -Force
  3027. New-ItemProperty "$KeyPath\Ndi\Params\*RSS" -Name "default" -PropertyTyp "String" -Value "1" -Force
  3028. New-ItemProperty "$KeyPath\Ndi\Params\*RSS" -Name "type" -PropertyTyp "String" -Value "enum" -Force
  3029.  
  3030. New-Item "$KeyPath\Ndi\Params\*RSS\Enum" -Force
  3031. New-ItemProperty "$KeyPath\Ndi\Params\*RSS\Enum" -Name "0" -PropertyTyp "String" -Value "Disabled" -Force
  3032. New-ItemProperty "$KeyPath\Ndi\Params\*RSS\Enum" -Name "1" -PropertyTyp "String" -Value "Enabled" -Force
  3033. }
  3034.  
  3035.  
  3036. function applyadvsettings {
  3037. #cls
  3038. #FlowControl
  3039. if ($cb_flowcontrol.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*FlowControl")){
  3040. Write-Host "FlowControl is same then Registry, skipping." -ForegroundColor green}
  3041.  
  3042. elseif ($cb_flowcontrol.SelectedIndex -eq '0'){
  3043. Write-Host "Disabling FlowControl" -ForegroundColor Green
  3044. Set-ItemProperty -Path "$KeyPath" -Name "*FlowControl" -Value "0" -Force}
  3045.  
  3046. elseif ($cb_flowcontrol.SelectedIndex -eq '1'){
  3047. Write-Host "Enabling Tx for FlowControl" -ForegroundColor Green
  3048. Set-ItemProperty -Path "$KeyPath" -Name "*FlowControl" -Value "1" -Force}
  3049.  
  3050. elseif ($cb_flowcontrol.SelectedIndex -eq '2'){
  3051. Write-Host "Enabling Rx for FlowControl" -ForegroundColor Green
  3052. Set-ItemProperty -Path "$KeyPath" -Name "*FlowControl" -Value "2" -Force}
  3053.  
  3054. elseif ($cb_flowcontrol.SelectedIndex -eq '3'){
  3055. Write-Host "Enabling Tx & Rx for FlowControl" -ForegroundColor Green
  3056. Set-ItemProperty -Path "$KeyPath" -Name "*FlowControl" -Value "3" -Force}
  3057.  
  3058. #IPChecksumOffloadIPv4
  3059. if ($cb_IPChecksumOffloadIPv4.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*IPChecksumOffloadIPv4")){
  3060. Write-Host "IPChecksumOffloadIPv4 is same then Registry, skipping." -ForegroundColor green}
  3061.  
  3062. elseif ($cb_IPChecksumOffloadIPv4.SelectedIndex -eq '0'){
  3063. Write-Host "Disabling IPChecksumOffloadIPv4" -ForegroundColor Green
  3064. Set-ItemProperty -Path "$KeyPath" -Name "*IPChecksumOffloadIPv4" -Value "0" -Force}
  3065.  
  3066. elseif ($cb_IPChecksumOffloadIPv4.SelectedIndex -eq '1'){
  3067. Write-Host "Enabling Tx for IPChecksumOffloadIPv4" -ForegroundColor Green
  3068. Set-ItemProperty -Path "$KeyPath" -Name "*IPChecksumOffloadIPv4" -Value "1" -Force}
  3069.  
  3070. elseif ($cb_IPChecksumOffloadIPv4.SelectedIndex -eq '2'){
  3071. Write-Host "Enabling Rx for IPChecksumOffloadIPv4" -ForegroundColor Green
  3072. Set-ItemProperty -Path "$KeyPath" -Name "*IPChecksumOffloadIPv4" -Value "2" -Force}
  3073.  
  3074. elseif ($cb_IPChecksumOffloadIPv4.SelectedIndex -eq '3'){
  3075. Write-Host "Enabling Tx & Rx for IPChecksumOffloadIPv4" -ForegroundColor Green
  3076. Set-ItemProperty -Path "$KeyPath" -Name "*IPChecksumOffloadIPv4" -Value "3" -Force}
  3077.  
  3078. #TCPChecksumOffloadIPv4
  3079. if ($cb_TCPChecksumOffloadIPv4.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv4")){
  3080. Write-Host "TCPChecksumOffloadIPv4 is same then Registry, skipping." -ForegroundColor green}
  3081.  
  3082. elseif ($cb_TCPChecksumOffloadIPv4.SelectedIndex -eq '0'){
  3083. Write-Host "Disabling TCPChecksumOffloadIPv4" -ForegroundColor Green
  3084. Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv4" -Value "0" -Force}
  3085.  
  3086. elseif ($cb_TCPChecksumOffloadIPv4.SelectedIndex -eq '1'){
  3087. Write-Host "Enabling Tx for TCPChecksumOffloadIPv4" -ForegroundColor Green
  3088. Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv4" -Value "1" -Force}
  3089.  
  3090. elseif ($cb_TCPChecksumOffloadIPv4.SelectedIndex -eq '2'){
  3091. Write-Host "Enabling Rx for TCPChecksumOffloadIPv4" -ForegroundColor Green
  3092. Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv4" -Value "2" -Force}
  3093.  
  3094. elseif ($cb_TCPChecksumOffloadIPv4.SelectedIndex -eq '3'){
  3095. Write-Host "Enabling Tx & Rx for TCPChecksumOffloadIPv4" -ForegroundColor Green
  3096. Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv4" -Value "3" -Force}
  3097.  
  3098. #TCPChecksumOffloadIPv6
  3099. if ($cb_TCPChecksumOffloadIPv6.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv6")){
  3100. Write-Host "TCPChecksumOffloadIPv6 is same then Registry, skipping." -ForegroundColor green}
  3101.  
  3102. elseif ($cb_TCPChecksumOffloadIPv6.SelectedIndex -eq '0'){
  3103. Write-Host "Disabling TCPChecksumOffloadIPv6" -ForegroundColor Green
  3104. Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv6" -Value "0" -Force}
  3105.  
  3106. elseif ($cb_TCPChecksumOffloadIPv6.SelectedIndex -eq '1'){
  3107. Write-Host "Enabling Tx for TCPChecksumOffloadIPv6" -ForegroundColor Green
  3108. Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv6" -Value "1" -Force}
  3109.  
  3110. elseif ($cb_TCPChecksumOffloadIPv6.SelectedIndex -eq '2'){
  3111. Write-Host "Enabling Rx for TCPChecksumOffloadIPv6" -ForegroundColor Green
  3112. Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv6" -Value "2" -Force}
  3113.  
  3114. elseif ($cb_TCPChecksumOffloadIPv6.SelectedIndex -eq '3'){
  3115. Write-Host "Enabling Tx & Rx for TCPChecksumOffloadIPv6" -ForegroundColor Green
  3116. Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv6" -Value "3" -Force}
  3117.  
  3118. #UDPChecksumOffloadIPv4
  3119. if ($cb_UDPChecksumOffloadIPv4.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv4")){
  3120. Write-Host "UDPChecksumOffloadIPv4 is same then Registry, skipping." -ForegroundColor Green}
  3121.  
  3122. elseif ($cb_UDPChecksumOffloadIPv4.SelectedIndex -eq '0'){
  3123. Write-Host "Disabling UDPChecksumOffloadIPv4" -ForegroundColor Green
  3124. Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv4" -Value "0" -Force}
  3125.  
  3126. elseif ($cb_UDPChecksumOffloadIPv4.SelectedIndex -eq '1'){
  3127. Write-Host "Enabling Tx for UDPChecksumOffloadIPv4" -ForegroundColor Green
  3128. Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv4" -Value "1" -Force}
  3129.  
  3130. elseif ($cb_UDPChecksumOffloadIPv4.SelectedIndex -eq '2'){
  3131. Write-Host "Enabling Rx for UDPChecksumOffloadIPv4" -ForegroundColor Green
  3132. Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv4" -Value "2" -Force}
  3133.  
  3134. elseif ($cb_UDPChecksumOffloadIPv4.SelectedIndex -eq '3'){
  3135. Write-Host "Enabling Tx & Rx for UDPChecksumOffloadIPv4" -ForegroundColor Green
  3136. Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv4" -Value "3" -Force}
  3137.  
  3138. #UDPChecksumOffloadIPv6
  3139. if ($cb_UDPChecksumOffloadIPv6.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv6")){
  3140. Write-Host "UDPChecksumOffloadIPv6 is same then Registry, skipping." -ForegroundColor Green}
  3141.  
  3142. elseif ($cb_UDPChecksumOffloadIPv6.SelectedIndex -eq '0'){
  3143. Write-Host "Disabling UDPChecksumOffloadIPv6" -ForegroundColor Green
  3144. Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv6" -Value "0" -Force}
  3145.  
  3146. elseif ($cb_UDPChecksumOffloadIPv6.SelectedIndex -eq '1'){
  3147. Write-Host "Enabling Tx for UDPChecksumOffloadIPv6" -ForegroundColor Green
  3148. Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv6" -Value "1" -Force}
  3149.  
  3150. elseif ($cb_UDPChecksumOffloadIPv6.SelectedIndex -eq '2'){
  3151. Write-Host "Enabling Rx for UDPChecksumOffloadIPv6" -ForegroundColor Green
  3152. Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv6" -Value "2" -Force}
  3153.  
  3154. elseif ($cb_UDPChecksumOffloadIPv6.SelectedIndex -eq '3'){
  3155. Write-Host "Enabling Tx & Rx for UDPChecksumOffloadIPv6" -ForegroundColor Green
  3156. Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv6" -Value "3" -Force}
  3157.  
  3158. #Large-Send-Offload V2 (IPv4)
  3159. if ($cb_LsoV2IPv4.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*LsoV2IPv4")){
  3160. Write-Host "LsoV2IPv4 is same then Registry, skipping." -ForegroundColor green}
  3161.  
  3162. elseif ($cb_LsoV2IPv4.SelectedIndex -eq '0'){
  3163. Write-Host "Disabling LsoV2IPv4" -ForegroundColor Green
  3164. Set-ItemProperty -Path "$KeyPath" -Name "*LsoV2IPv4" -Value "0" -Force}
  3165.  
  3166. elseif ($cb_LsoV2IPv4.SelectedIndex -eq '1'){
  3167. Write-Host "Enabling LsoV2IPv4" -ForegroundColor Green
  3168. Set-ItemProperty -Path "$KeyPath" -Name "*LsoV2IPv4" -Value "1" -Force}
  3169.  
  3170. #Large-Send-Offload V2 (IPv6)
  3171. if ($cb_LsoV2IPv6.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*LsoV2IPv6")){
  3172. Write-Host "LsoV2IPv6 is same then Registry, skipping." -ForegroundColor green}
  3173.  
  3174. elseif ($cb_LsoV2IPv6.SelectedIndex -eq '0'){
  3175. Write-Host "Disabling LsoV2IPv4" -ForegroundColor Green
  3176. Set-ItemProperty -Path "$KeyPath" -Name "*LsoV2IPv6" -Value "0" -Force}
  3177.  
  3178. elseif ($cb_LsoV2IPv6.SelectedIndex -eq '1'){
  3179. Write-Host "Enabling LsoV2IPv6" -ForegroundColor Green
  3180. Set-ItemProperty -Path "$KeyPath" -Name "*LsoV2IPv6" -Value "1" -Force}
  3181.  
  3182. #Large-Send-Offload V1 (IPv4)
  3183. if ($cb_LsoV1IPv4.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*LsoV1IPv4")){
  3184. Write-Host "LsoV1IPv4 is same then Registry, skipping." -ForegroundColor green}
  3185.  
  3186. elseif ($cb_LsoV1IPv4.SelectedIndex -eq '0'){
  3187. Write-Host "Disabling LsoV1IPv4" -ForegroundColor Green
  3188. Set-ItemProperty -Path "$KeyPath" -Name "*LsoV1IPv4" -Value "0" -Force}
  3189.  
  3190. elseif ($cb_LsoV1IPv4.SelectedIndex -eq '1'){
  3191. Write-Host "Enabling LsoV1IPv4" -ForegroundColor Green
  3192. Set-ItemProperty -Path "$KeyPath" -Name "*LsoV1IPv4" -Value "1" -Force}
  3193.  
  3194. #PMARPOffload
  3195. if ($cb_PMARPOffload.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PMARPOffload")){
  3196. Write-Host "PMARPOffload is same then Registry, skipping." -ForegroundColor green}
  3197.  
  3198. elseif ($cb_PMARPOffload.SelectedIndex -eq '0'){
  3199. Write-Host "Disabling PMARPOffload" -ForegroundColor Green
  3200. Set-ItemProperty -Path "$KeyPath" -Name "*PMARPOffload" -Value "0" -Force}
  3201.  
  3202. elseif ($cb_PMARPOffload.SelectedIndex -eq '1'){
  3203. Write-Host "Enabling PMARPOffload" -ForegroundColor Green
  3204. Set-ItemProperty -Path "$KeyPath" -Name "*PMARPOffload" -Value "1" -Force}
  3205.  
  3206. #PMNSOffload
  3207. if ($cb_PMNSOffload.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PMNSOffload")){
  3208. Write-Host "PMNSOffload is same then Registry, skipping." -ForegroundColor green}
  3209.  
  3210. elseif ($cb_PMNSOffload.SelectedIndex -eq '0'){
  3211. Write-Host "Disabling PMNSOffload" -ForegroundColor Green
  3212. Set-ItemProperty -Path "$KeyPath" -Name "*PMNSOffload" -Value "0" -Force}
  3213.  
  3214. elseif ($cb_PMNSOffload.SelectedIndex -eq '1'){
  3215. Write-Host "Enabling PMNSOffload" -ForegroundColor Green
  3216. Set-ItemProperty -Path "$KeyPath" -Name "*PMNSOffload" -Value "1" -Force}
  3217.  
  3218. #PriorityVLANTag
  3219. if ($cb_PriorityVLANTag.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PriorityVLANTag")){
  3220. Write-Host "PriorityVLANTag is same then Registry, skipping." -ForegroundColor Green}
  3221.  
  3222. elseif ($cb_PriorityVLANTag.SelectedIndex -eq '0'){
  3223. Write-Host "Disabling PriorityVLANTag" -ForegroundColor Green
  3224. Set-ItemProperty -Path "$KeyPath" -Name "*PriorityVLANTag" -Value "0" -Force}
  3225.  
  3226. elseif ($cb_PriorityVLANTag.SelectedIndex -eq '1'){
  3227. Write-Host "Enabling Paketpriorität" -ForegroundColor Green
  3228. Set-ItemProperty -Path "$KeyPath" -Name "*PriorityVLANTag" -Value "1" -Force}
  3229.  
  3230. elseif ($cb_PriorityVLANTag.SelectedIndex -eq '2'){
  3231. Write-Host "Enabling VLAN" -ForegroundColor Green
  3232. Set-ItemProperty -Path "$KeyPath" -Name "*PriorityVLANTag" -Value "2" -Force}
  3233.  
  3234. elseif ($cb_PriorityVLANTag.SelectedIndex -eq '3'){
  3235. Write-Host "Enabling Paketpriorität and VLAN" -ForegroundColor Green
  3236. Set-ItemProperty -Path "$KeyPath" -Name "*PriorityVLANTag" -Value "3" -Force}
  3237.  
  3238. #ReceiveBuffers
  3239. if ($cb_ReceiveBuffers.Text -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*ReceiveBuffers"))
  3240. {
  3241. Write-Host "ReceiveBuffers is same then Registry, skipping." -ForegroundColor Green
  3242. }
  3243. else
  3244. {
  3245. Write-Host "Set ReceiveBuffers to $($cb_ReceiveBuffers.Text)" -ForegroundColor Green
  3246. Set-ItemProperty -Path "$KeyPath" -Name "*ReceiveBuffers" -Value "$($cb_ReceiveBuffers.Text)" -Force
  3247. }
  3248.  
  3249. #TransmitBuffers
  3250. if ($cb_TransmitBuffers.Text -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*TransmitBuffers"))
  3251. {
  3252. Write-Host "TransmitBuffers is same then Registry, skipping." -ForegroundColor Green
  3253. }
  3254. else
  3255. {
  3256. Write-Host "Set TransmitBuffers to $($cb_TransmitBuffers.Text)" -ForegroundColor Green
  3257. Set-ItemProperty -Path "$KeyPath" -Name "*TransmitBuffers" -Value "$($cb_TransmitBuffers.Text)" -Force
  3258. }
  3259.  
  3260. #InterruptModeration
  3261. if ($cb_InterruptModeration.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*InterruptModeration")){
  3262. Write-Host "InterruptModeration is same then Registry, skipping." -ForegroundColor Green}
  3263.  
  3264. elseif ($cb_InterruptModeration.SelectedIndex -eq '0'){
  3265. Write-Host "Disabling InterruptModeration" -ForegroundColor Green
  3266. Set-ItemProperty -Path "$KeyPath" -Name "*InterruptModeration" -Value "0" -Force}
  3267.  
  3268. elseif ($cb_InterruptModeration.SelectedIndex -eq '1'){
  3269. Write-Host "Enabling InterruptModeration" -ForegroundColor Green
  3270. Set-ItemProperty -Path "$KeyPath" -Name "*InterruptModeration" -Value "1" -Force}
  3271.  
  3272. #InterruptModerationRate
  3273. #$RegITR = (Get-ItemPropertyValue -Path "$KeyPath" -Name "ITR")
  3274. #if ($cb_InterruptModerationRate.Text -eq $RegITR -xor $cb_InterruptModerationRate.SelectedIndex >0){
  3275. #Write-Host "InterruptModerationRate is same then Registry, skipping." -ForegroundColor green}
  3276.  
  3277. if ($cb_InterruptModerationRate.Text -match 'Disabled'){
  3278. #Write-Host "Disabling InterruptModeration" -ForegroundColor Green
  3279. Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "0" -Force}
  3280.  
  3281. elseif ($cb_InterruptModerationRate.Text -match 'Minimal'){
  3282. #Write-Host "Setting InterruptModerationRate to 200 - Minimal" -ForegroundColor Green
  3283. Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "200" -Force}
  3284.  
  3285. elseif ($cb_InterruptModerationRate.Text -match 'Low'){
  3286. #Write-Host "Setting InterruptModerationRate to 400 - Low" -ForegroundColor Green
  3287. Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "400" -Force}
  3288.  
  3289. elseif ($cb_InterruptModerationRate.Text -match 'Medium'){
  3290. #Write-Host "Setting InterruptModerationRate to 950 - Medium" -ForegroundColor Green
  3291. Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "950" -Force}
  3292.  
  3293. elseif ($cb_InterruptModerationRate.Text -match 'High'){
  3294. #Write-Host "Setting InterruptModerationRate to 2000 - High" -ForegroundColor Green
  3295. Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "2000" -Force}
  3296.  
  3297. elseif ($cb_InterruptModerationRate.Text -match 'Extreme'){
  3298. #Write-Host "Setting InterruptModerationRate to 3600 - Extreme" -ForegroundColor Green
  3299. Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "3600" -Force}
  3300.  
  3301. elseif ($cb_InterruptModerationRate.Text -match 'Adaptive'){
  3302. #Write-Host "Setting InterruptModerationRate to 65535 - Adaptive" -ForegroundColor Green
  3303. Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "65535" -Force}
  3304. #For applications where low latency is critical, this setting should be approximately 8000 interrupts per second.
  3305.  
  3306.  
  3307.  
  3308.  
  3309. #TxIntDelay
  3310. #I-219V 28TxDelay Default
  3311. if ($tb_TxIntDelay.Text -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "TxIntDelay"))
  3312. {
  3313. Write-Host "TxIntDelay is same then Registry, skipping." -ForegroundColor Green
  3314. }
  3315. else
  3316. {
  3317. Write-Host "Set TxIntDelay to"$tb_TxIntDelay.Text -ForegroundColor Green
  3318. Set-ItemProperty -Path "$KeyPath" -Name "TxIntDelay" -Value $tb_TxIntDelay.Text -Force
  3319. }
  3320. #PacketDirect
  3321. #Unsure Default Enabled or Disabled
  3322. #Ref:https://docs.microsoft.com/en-us/windows-hardware/drivers/network/introduction-to-ndis-pdpi
  3323. if ($cb_PacketDirect.Text -match 'Undefined'){
  3324. #Write-Host "PacketDirect to"$cb_PacketDirect.Text -ForegroundColor Green
  3325. Remove-ItemProperty -Path "$KeyPath" -Name "*PacketDirect" -Force}
  3326. if ($cb_PacketDirect.Text -match 'Enabled'){
  3327. Write-Host "PacketDirect to"$cb_PacketDirect.Text -ForegroundColor Green
  3328. New-ItemProperty -Path "$KeyPath" -Name "*PacketDirect" -Value "1" -PropertyType "String" -Force}
  3329. if ($cb_PacketDirect.Text -match 'Disabled'){
  3330. Write-Host "PacketDirect to"$cb_PacketDirect.Text -ForegroundColor Green
  3331. New-ItemProperty -Path "$KeyPath" -Name "*PacketDirect" -Value "0" -PropertyType "String" -Force}
  3332.  
  3333. #EnableCoalesce
  3334. if ($cb_EnableCoalesce.Text -match 'Undefined'){
  3335. #Write-Host "EnableCoalesce to"$cb_EnableCoalesce.Text -ForegroundColor Green
  3336. Remove-ItemProperty -Path "$KeyPath" -Name "EnableCoalesce" -Force}
  3337. if ($cb_EnableCoalesce.Text -match 'Enabled'){
  3338. Write-Host "EnableCoalesce to"$cb_EnableCoalesce.Text -ForegroundColor Green
  3339. New-ItemProperty -Path "$KeyPath" -Name "EnableCoalesce" -Value "1" -PropertyType "DWORD" -Force}
  3340. if ($cb_EnableCoalesce.Text -match 'Disabled'){
  3341. Write-Host "EnableCoalesce to"$cb_EnableCoalesce.Text -ForegroundColor Green
  3342. New-ItemProperty -Path "$KeyPath" -Name "EnableCoalesce" -Value "0" -PropertyType "DWORD" -Force}
  3343.  
  3344. #CoalesceBufferSize
  3345. $A=((Get-ItemProperty -Path "$KeyPath").PSObject.Properties.Name -contains "CoalesceBufferSize")
  3346. if ($A -eq $false -and $cb_CoalesceBufferSize.Text -ne $null -and $cb_CoalesceBufferSize.Text -ne '2048' ){
  3347. Write-Host "Set CoalesceBufferSize to"$cb_CoalesceBufferSize.Text -ForegroundColor Green
  3348. New-ItemProperty -Path "$KeyPath" -Name "CoalesceBufferSize" -Typ "Dword" -Value $cb_CoalesceBufferSize.Text -Force
  3349. }elseif($A -eq $true -and $cb_CoalesceBufferSize.Text -eq $null -or $cb_CoalesceBufferSize.Text -eq ''){
  3350. Write-Warning "Removing CoalesceBufferSize"
  3351. Remove-ItemProperty -Path "$KeyPath" -Name "CoalesceBufferSize"
  3352. }else{
  3353. Write-Host "Set CoalesceBufferSize to"$cb_CoalesceBufferSize.Text -ForegroundColor Green
  3354. Set-ItemProperty -Path "$KeyPath" -Name "CoalesceBufferSize" -Value $cb_CoalesceBufferSize.Text -Force
  3355. }
  3356.  
  3357. #EnableUdpTxScaling
  3358. if ($cb_EnableUdpTxScaling.Text -match 'Undefined'){
  3359. #Write-Host "EnableUdpTxScaling to"$cb_EnableUdpTxScaling.Text -ForegroundColor Green
  3360. Remove-ItemProperty -Path "$KeyPath" -Name "EnableUdpTxScaling" -Force}
  3361. if ($cb_EnableUdpTxScaling.Text -match 'Enabled'){
  3362. Write-Host "EnableUdpTxScaling to"$cb_EnableUdpTxScaling.Text -ForegroundColor Green
  3363. New-ItemProperty -Path "$KeyPath" -Name "EnableUdpTxScaling" -Value "1" -PropertyType "DWORD" -Force}
  3364. if ($cb_EnableUdpTxScaling.Text -match 'Disabled'){
  3365. Write-Host "EnableUdpTxScaling to"$cb_EnableUdpTxScaling.Text -ForegroundColor Green
  3366. New-ItemProperty -Path "$KeyPath" -Name "EnableUdpTxScaling" -Value "0" -PropertyType "DWORD" -Force}
  3367.  
  3368. }
  3369.  
  3370. function applypowersavingsettings {
  3371. #cls
  3372. # ========================================================
  3373. # PowerSettings
  3374.  
  3375. #EnablePME
  3376. # Enables/disables wake-up from Advanced Power Management (APM) sleep states.
  3377. if ($cb_EnablePME.SelectedIndex -eq '0'){
  3378. Write-Host "Disabling (APM) sleep states" -ForegroundColor Green
  3379. New-ItemProperty -Path "$KeyPath" -Name "EnablePME" -PropertyType DWORD -Value "0" -Force}
  3380. if ($cb_EnablePME.SelectedIndex -eq '1'){
  3381. Write-Host "Enabling (APM) sleep states" -ForegroundColor Green
  3382. New-ItemProperty -Path "$KeyPath" -Name "EnablePME" -PropertyType DWORD -Value "1" -Force}
  3383. if ($cb_EnablePME.SelectedIndex -eq '2'){
  3384. Write-Host "Skipping (APM) sleep states" -ForegroundColor Green}
  3385.  
  3386. #EnableDynamicPowerGating
  3387. if ($cb_EnableDynamicPowerGating.SelectedIndex -eq '0'){
  3388. Write-Host "Disabling DynamicPowerGating" -ForegroundColor Green
  3389. New-ItemProperty -Path "$KeyPath" -Name "*EnableDynamicPowerGating" -PropertyType String -Value "0" -Force}
  3390. if ($cb_EnableDynamicPowerGating.SelectedIndex -eq '1'){
  3391. Write-Host "Enabling DynamicPowerGating" -ForegroundColor Green
  3392. New-ItemProperty -Path "$KeyPath" -Name "*EnableDynamicPowerGating" -PropertyType String -Value "1" -Force}
  3393. if ($cb_EnableDynamicPowerGating.SelectedIndex -eq '2'){
  3394. Write-Host "Skipping DynamicPowerGating" -ForegroundColor Green}
  3395.  
  3396. #EnableConnectedPowerGating
  3397. if ($cb_EnableConnectedPowerGating.SelectedIndex -eq '0'){
  3398. Write-Host "Disabling ConnectedPowerGating" -ForegroundColor Green
  3399. New-ItemProperty -Path "$KeyPath" -Name "EnableConnectedPowerGating" -PropertyType DWORD -Value "0" -Force}
  3400. if ($cb_EnableConnectedPowerGating.SelectedIndex -eq '1'){
  3401. Write-Host "Enabling ConnectedPowerGating" -ForegroundColor Green
  3402. New-ItemProperty -Path "$KeyPath" -Name "EnableConnectedPowerGating" -PropertyType DWORD -Value "1" -Force}
  3403. if ($cb_EnableConnectedPowerGating.SelectedIndex -eq '2'){
  3404. Write-Host "Skipping ConnectedPowerGating" -ForegroundColor Green}
  3405.  
  3406. #AutoPowerSaveModeEnabled
  3407. if ($cb_AutoPowerSaveModeEnabled.SelectedIndex -eq '0'){
  3408. Write-Host "Disabling AutoPowerSaveMode" -ForegroundColor Green
  3409. New-ItemProperty -Path "$KeyPath" -Name "AutoPowerSaveModeEnabled" -PropertyType DWORD -Value "0" -Force}
  3410. if ($cb_AutoPowerSaveModeEnabled.SelectedIndex -eq '1'){
  3411. Write-Host "Enabling AutoPowerSaveMode" -ForegroundColor Green
  3412. New-ItemProperty -Path "$KeyPath" -Name "AutoPowerSaveModeEnabled" -PropertyType DWORD -Value "1" -Force}
  3413. if ($cb_AutoPowerSaveModeEnabled.SelectedIndex -eq '2'){
  3414. Write-Host "Skipping AutoPowerSaveMode" -ForegroundColor Green}
  3415.  
  3416. #NicAutoPowerSaver
  3417. if ($cb_NicAutoPowerSaver.SelectedIndex -eq '0'){
  3418. Write-Host "Disabling NicAutoPowerSaver" -ForegroundColor Green
  3419. New-ItemProperty -Path "$KeyPath" -Name "*NicAutoPowerSaver" -PropertyType String -Value "0" -Force}
  3420. if ($cb_NicAutoPowerSaver.SelectedIndex -eq '1'){
  3421. Write-Host "Enabling NicAutoPowerSaver" -ForegroundColor Green
  3422. New-ItemProperty -Path "$KeyPath" -Name "*NicAutoPowerSaver" -PropertyType String -Value "1" -Force}
  3423. if ($cb_NicAutoPowerSaver.SelectedIndex -eq '2'){
  3424. Write-Host "Skipping NicAutoPowerSaver" -ForegroundColor Green}
  3425.  
  3426. #DisableDelayedPowerUp
  3427. if ($cb_DisableDelayedPowerUp.SelectedIndex -eq '0'){
  3428. Write-Host "Enabling DelayedPowerUp" -ForegroundColor Green
  3429. New-ItemProperty -Path "$KeyPath" -Name "DisableDelayedPowerUp" -PropertyType DWORD -Value "0" -Force}
  3430. if ($cb_DisableDelayedPowerUp.SelectedIndex -eq '1'){
  3431. Write-Host "Disabling DelayedPowerUp" -ForegroundColor Green
  3432. New-ItemProperty -Path "$KeyPath" -Name "DisableDelayedPowerUp" -PropertyType DWORD -Value "1" -Force}
  3433. if ($cb_DisableDelayedPowerUp.SelectedIndex -eq '2'){
  3434. Write-Host "Skipping DelayedPowerUp" -ForegroundColor Green}
  3435.  
  3436. #ReduceSpeedOnPowerDown
  3437. if ($cb_ReduceSpeedOnPowerDown.SelectedIndex -eq '0'){
  3438. Write-Host "Disabling ReduceSpeedOnPowerDown" -ForegroundColor Green
  3439. New-ItemProperty -Path "$KeyPath" -Name "ReduceSpeedOnPowerDown" -PropertyType DWORD -Value "0" -Force}
  3440. if ($cb_ReduceSpeedOnPowerDown.SelectedIndex -eq '1'){
  3441. Write-Host "Enabling ReduceSpeedOnPowerDown" -ForegroundColor Green
  3442. New-ItemProperty -Path "$KeyPath" -Name "ReduceSpeedOnPowerDown" -PropertyType DWORD -Value "1" -Force}
  3443. if ($cb_ReduceSpeedOnPowerDown.SelectedIndex -eq '2'){
  3444. Write-Host "Skipping ReduceSpeedOnPowerDown" -ForegroundColor Green}
  3445.  
  3446.  
  3447. }
  3448.  
  3449. #Adding more then Default RSSQueues
  3450. function RSSQueuesUnlock{
  3451. $NumRssQueues1 = Test-Path -Path "$KeyPath\Ndi\Params\*NumRssQueues"
  3452. $NumRssQueues2 = Test-Path -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum"
  3453. $AdapterQueuesOriginal = Get-ItemProperty "$KeyPath\Ndi\Params\*NumRssQueues" -Name "default" | select -expand default
  3454.  
  3455.  
  3456. #If($NumRssQueues1 -eq $False){
  3457. New-Item -Path "$KeyPath\Ndi\Params\*NumRssQueues" -Force
  3458. New-ItemProperty "$KeyPath\Ndi\Params\*NumRssQueues" -Name "ParamDesc" -PropertyTyp "String" -Value "Maximum Number of RSS Queues" -Force
  3459. New-ItemProperty "$KeyPath\Ndi\Params\*NumRssQueues" -Name "default" -PropertyTyp "String" -Value $AdapterQueuesOriginal -Force
  3460. New-ItemProperty "$KeyPath\Ndi\Params\*NumRssQueues" -Name "type" -PropertyTyp "String" -Value "enum" -Force
  3461. #}
  3462. #If($NumRssQueues2 -eq $False){
  3463. New-Item -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Force
  3464. New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "1" -PropertyType STRING -Value "1 Queue" -Force
  3465. New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "2" -PropertyType STRING -Value "2 Queues" -Force
  3466. New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "3" -PropertyType STRING -Value "3 Queues" -Force
  3467. New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "4" -PropertyType STRING -Value "4 Queues" -Force
  3468. New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "5" -PropertyType STRING -Value "5 Queues" -Force
  3469. New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "6" -PropertyType STRING -Value "6 Queues" -Force
  3470. New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "7" -PropertyType STRING -Value "7 Queues" -Force
  3471. New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "8" -PropertyType STRING -Value "8 Queues" -Force
  3472. New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "9" -PropertyType STRING -Value "9 Queues" -Force
  3473. New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "10" -PropertyType STRING -Value "10 Queues" -Force
  3474. New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "11" -PropertyType STRING -Value "11 Queues" -Force
  3475. New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "12" -PropertyType STRING -Value "12 Queues" -Force
  3476. #}
  3477. $cb_rssqueues.Items.Clear()
  3478. $AdapterQueuesDefault = Get-ItemProperty "$KeyPath\Ndi\Params\*NumRssQueues" -Name "default" | select -expand default
  3479. #Query Avaible RSSQueues
  3480. $AdapterQueues = Get-Item -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" | Select -ExpandProperty Property
  3481. @($AdapterQueues) | ForEach-Object {[void] $cb_rssqueues.Items.Add($_)}
  3482. $cb_rssqueues.Text = $AdapterQueuesDefault
  3483. #$btn_unqueues.Enabled = $False
  3484. }
  3485.  
  3486.  
  3487. $cb_AdapterNamesCombo.Add_SelectedValueChanged({ a; NetIPInterface })
  3488.  
  3489. function adapter_restart {
  3490. Try {
  3491. Restart-NetAdapter -InterfaceDescription $NIC_Desc
  3492. Write-Host "Restarting Adapter $NIC_Desc now!" -ForegroundColor Red
  3493. }
  3494. catch{
  3495. Write-Host "No Adapter selected." -ForegroundColor Red
  3496. }
  3497. }
  3498.  
  3499. # Open RegPath Adapter per Button
  3500.  
  3501. function btn_regopadap {
  3502. Try {
  3503. $regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit"
  3504. $name = "LastKey"
  3505. $value = "Computer\"+(Convert-Path ($Global:KeyPath))
  3506. New-ItemProperty -Path $regPath -Name $name -Value $value -PropertyType String -Force | Out-Null
  3507. Start-Process RegEdit
  3508. }
  3509. catch
  3510. {
  3511. Write-Host "No Adapter selected." -ForegroundColor Red
  3512. }
  3513. }
  3514.  
  3515. function btn_regopenafd {
  3516. Try {
  3517. $regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit"
  3518. $name = "LastKey"
  3519. $value = "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters"
  3520. New-ItemProperty -Path $regPath -Name $name -Value $value -PropertyType String -Force | Out-Null
  3521. Start-Process RegEdit
  3522. }
  3523. catch
  3524. {
  3525. Write-Host "ERROR." -ForegroundColor Red
  3526. }
  3527. }
  3528.  
  3529. function Interrupt{
  3530. $Path = 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum'
  3531. #$Global:EthernetClassGuid
  3532. #$Global:EthernetPNPDeviceID
  3533. $NewPath = "$Path\$EthernetPNPDeviceID"
  3534. $Test = Test-Path REGISTRY::$NewPath
  3535. if ($Test){
  3536.  
  3537. }else{
  3538. Write-Warning "GPU not found. Abort"
  3539. }
  3540. }
  3541.  
  3542. function bypassrssqueues{
  3543. $error.clear()
  3544. try { Set-NetAdapterRss -InterfaceDescription $($Global:NIC_Desc) -BaseProcessorNumber $($cb_rssbaseproc.Text) -MaxProcessorNumber $($cb_rssmaxproc.Text) -Profile $($cb_rssprofile.Text) -MaxProcessors $($cb_rssmaxprocs.Text) -Enabled $($Global:Rssstatusset) -ErrorAction Stop
  3545. } catch { Write-Warning "Error occured while Setting Set-NetAdapterRss, Abort." }
  3546. if (!$error) { Write-Host 'No Error Occured, while Setting Set-NetAdapterRss without NumberOfReceiveQueues. Continue.'
  3547. Write-Host "Using Registry now, to set RSS Queues to $($cb_rssqueues.Text)"
  3548. Set-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues" -Name "default" -Value $cb_rssqueues.Text -Force -ErrorAction "Stop"
  3549. Write-Host "Done."
  3550. }
  3551. }
  3552. function applyrsssettings {
  3553.  
  3554. #DisablePortScaling
  3555. if ($cb_DisablePortScaling.SelectedIndex -eq '0'){
  3556. Write-Host "Disabling DisablePortScaling" -ForegroundColor Green
  3557. New-ItemProperty -Path "$KeyPath" -Name "DisablePortScaling" -PropertyType DWORD -Value "0" -Force}
  3558. if ($cb_DisablePortScaling.SelectedIndex -eq '1'){
  3559. Write-Host "Enabling DisablePortScaling" -ForegroundColor Green
  3560. New-ItemProperty -Path "$KeyPath" -Name "DisablePortScaling" -PropertyType DWORD -Value "1" -Force}
  3561. if ($cb_DisablePortScaling.SelectedIndex -eq '2'){
  3562. Write-Host "Skipping DisablePortScaling" -ForegroundColor Green}
  3563.  
  3564. #ManyCoreScaling
  3565. if ($cb_ManyCoreScaling.SelectedIndex -eq '0'){
  3566. Write-Host "Disabling ManyCoreScaling" -ForegroundColor Green
  3567. New-ItemProperty -Path "$KeyPath" -Name "ManyCoreScaling" -PropertyType DWORD -Value "0" -Force}
  3568. if ($cb_ManyCoreScaling.SelectedIndex -eq '1'){
  3569. Write-Host "Enabling ManyCoreScaling" -ForegroundColor Green
  3570. New-ItemProperty -Path "$KeyPath" -Name "ManyCoreScaling" -PropertyType DWORD -Value "1" -Force}
  3571. if ($cb_ManyCoreScaling.SelectedIndex -eq '2'){
  3572. Write-Host "Skipping ManyCoreScaling" -ForegroundColor Green}
  3573.  
  3574. #Write-Host "Testing Setting RSS"
  3575. $error.clear()
  3576. try {
  3577. #Write-Host "Using Powersh. now to set rss"
  3578. Set-NetAdapterRss -InterfaceDescription $($Global:NIC_Desc) -BaseProcessorNumber $($cb_rssbaseproc.Text) -MaxProcessorNumber $($cb_rssmaxproc.Text) -NumberOfReceiveQueues $($cb_rssqueues.Text) -Profile $($cb_rssprofile.Text) -MaxProcessors $($cb_rssmaxprocs.Text) -Enabled $($Global:Rssstatusset) -ErrorAction Stop
  3579. Write-Host "Using Powershell to Set-NetAdapterRss."
  3580. }
  3581. catch { Write-Warning "Error occured while Setting Set-NetAdapterRss, testing now without NumberOfReceiveQueues!"
  3582. bypassrssqueues
  3583. }
  3584. #if (!$error) { Write-Host "No Error Occured, while Setting Set-NetAdapterRss with NumberOfReceiveQueues." }
  3585.  
  3586. #Set-NetAdapterRss -InterfaceDescription $($Global:NIC_Desc) -BaseProcessorNumber $($cb_rssbaseproc.Text) -MaxProcessorNumber $($cb_rssmaxproc.Text) -NumberOfReceiveQueues $($cb_rssqueues.Text) -Profile $($cb_rssprofile.Text) -MaxProcessors $($cb_rssmaxprocs.Text) -Enabled $($Global:Rssstatusset)
  3587. }
  3588.  
  3589. function ApplyInterfaceSettings{
  3590. if ($cb_AdvertiseDefaultRoute.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand AdvertiseDefaultRoute)){
  3591. Write-Host "AdvertiseDefaultRoute is same, skipping." -ForegroundColor green}
  3592. else{
  3593. Write-Host "AdvertiseDefaultRoute:"$cb_AdvertiseDefaultRoute.Text -ForegroundColor Green
  3594. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -AdvertiseDefaultRoute $cb_AdvertiseDefaultRoute.Text
  3595. }
  3596. if ($cb_Advertising.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Advertising)){
  3597. Write-Host "Advertising is same, skipping." -ForegroundColor green}
  3598. else{
  3599. Write-Host "Advertising:"$cb_Advertising.Text -ForegroundColor Green
  3600. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -Advertising $cb_Advertising.Text
  3601. }
  3602. if ($cb_AutomaticMetric.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand AutomaticMetric)){
  3603. Write-Host "AutomaticMetric is same, skipping." -ForegroundColor green}
  3604. else{
  3605. Write-Host "AutomaticMetric:"$cb_AutomaticMetric.Text -ForegroundColor Green
  3606. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -AutomaticMetric $cb_AutomaticMetric.Text
  3607. }
  3608. if ($cb_ClampMss.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ClampMss)){
  3609. Write-Host "ClampMss is same, skipping." -ForegroundColor green}
  3610. else{
  3611. Write-Host "ClampMss:"$cb_ClampMss.Text -ForegroundColor Green
  3612. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -ClampMss $cb_ClampMss.Text
  3613. }
  3614. if ($DirectedMacWolPattern.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DirectedMacWolPattern)){
  3615. Write-Host "DirectedMacWolPattern is same, skipping." -ForegroundColor green}
  3616. else{
  3617. Write-Host "DirectedMacWolPattern:"$DirectedMacWolPattern.Text -ForegroundColor Green
  3618. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -DirectedMacWolPattern $DirectedMacWolPattern.Text
  3619. }
  3620. if ($cb_EcnMarking.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand EcnMarking)){
  3621. Write-Host "EcnMarking is same, skipping." -ForegroundColor green}
  3622. else{
  3623. Write-Host "EcnMarking:"$cb_EcnMarking.Text -ForegroundColor Green
  3624. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -EcnMarking $cb_EcnMarking.Text
  3625. }
  3626. if ($cb_ForceArpNdWolPattern.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ForceArpNdWolPattern)){
  3627. Write-Host "ForceArpNdWolPattern is same, skipping." -ForegroundColor green}
  3628. else{
  3629. Write-Host "ForceArpNdWolPattern:"$cb_ForceArpNdWolPattern.Text -ForegroundColor Green
  3630. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -ForceArpNdWolPattern $cb_ForceArpNdWolPattern.Text
  3631. }
  3632. if ($cb_Forwarding.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Forwarding)){
  3633. Write-Host "Forwarding is same, skipping." -ForegroundColor green}
  3634. else{
  3635. Write-Host "Forwarding:"$cb_Forwarding.Text -ForegroundColor Green
  3636. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -Forwarding $cb_Forwarding.Text
  3637. }
  3638. if ($cb_IgnoreDefaultRoutes.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand IgnoreDefaultRoutes)){
  3639. Write-Host "IgnoreDefaultRoutes is same, skipping." -ForegroundColor green}
  3640. else{
  3641. Write-Host "IgnoreDefaultRoutes:"$cb_IgnoreDefaultRoutes.Text -ForegroundColor Green
  3642. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -IgnoreDefaultRoutes $cb_IgnoreDefaultRoutes.Text
  3643. }
  3644. if ($cb_ManagedAddressConfiguration.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ManagedAddressConfiguration)){
  3645. Write-Host "ManagedAddressConfiguration is same, skipping." -ForegroundColor green}
  3646. else{
  3647. Write-Host "ManagedAddressConfiguration:"$cb_ManagedAddressConfiguration.Text -ForegroundColor Green
  3648. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -ManagedAddressConfiguration $cb_ManagedAddressConfiguration.Text
  3649. }
  3650. if ($cb_NeighborDiscoverySupported.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NeighborDiscoverySupported)){
  3651. Write-Host "NeighborDiscoverySupported is same, skipping." -ForegroundColor green}
  3652. else{
  3653. Write-Host "NeighborDiscoverySupported:"$cb_NeighborDiscoverySupported.Text -ForegroundColor Green
  3654. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -NeighborDiscoverySupported $cb_NeighborDiscoverySupported.Text
  3655. }
  3656. if ($cb_NeighborUnreachabilityDetection.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NeighborUnreachabilityDetection)){
  3657. Write-Host "NeighborUnreachabilityDetection is same, skipping." -ForegroundColor green}
  3658. else{
  3659. Write-Host "NeighborUnreachabilityDetection:"$cb_NeighborUnreachabilityDetection.Text -ForegroundColor Green
  3660. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -NeighborUnreachabilityDetection $cb_NeighborUnreachabilityDetection.Text
  3661. }
  3662. if ($cb_OtherStatefulConfiguration.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand OtherStatefulConfiguration)){
  3663. Write-Host "OtherStatefulConfiguration is same, skipping." -ForegroundColor green}
  3664. else{
  3665. Write-Host "OtherStatefulConfiguration:"$cb_OtherStatefulConfiguration.Text -ForegroundColor Green
  3666. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -OtherStatefulConfiguration $cb_OtherStatefulConfiguration.Text
  3667. }
  3668. if ($cb_RouterDiscovery.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand RouterDiscovery)){
  3669. Write-Host "RouterDiscovery is same, skipping." -ForegroundColor green}
  3670. else{
  3671. Write-Host "RouterDiscovery:"$cb_RouterDiscovery.Text -ForegroundColor Green
  3672. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -RouterDiscovery $cb_RouterDiscovery.Text
  3673. }
  3674. if ($cb_Store.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Store)){
  3675. Write-Host "Store is same, skipping." -ForegroundColor green}
  3676. else{
  3677. Write-Host "Store:"$cb_Store.Text -ForegroundColor Green
  3678. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -Store $cb_Store.Text
  3679. }
  3680. if ($cb_WeakHostReceive.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand WeakHostReceive)){
  3681. Write-Host "WeakHostReceive is same, skipping." -ForegroundColor green}
  3682. else{
  3683. Write-Host "WeakHostReceive:"$cb_WeakHostReceive.Text -ForegroundColor Green
  3684. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -Store $cb_WeakHostReceive.Text
  3685. }
  3686. if ($cb_WeakHostSend.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand WeakHostSend)){
  3687. Write-Host "WeakHostSend is same, skipping." -ForegroundColor green}
  3688. else{
  3689. Write-Host "WeakHostSend:"$cb_WeakHostSend.Text -ForegroundColor Green
  3690. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -Store $cb_WeakHostSend.Text
  3691. }
  3692. if ($tb_CurrentHopLimit.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand CurrentHopLimit)){
  3693. Write-Host "CurrentHopLimit is same, skipping." -ForegroundColor green}
  3694. else{
  3695. Write-Host "CurrentHopLimit:"$tb_CurrentHopLimit.Text -ForegroundColor Green
  3696. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -CurrentHopLimit $tb_CurrentHopLimit.Text
  3697. }
  3698. if ($tb_BaseReachableTime.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand BaseReachableTime)){
  3699. Write-Host "BaseReachableTime is same, skipping." -ForegroundColor green}
  3700. else{
  3701. Write-Host "BaseReachableTime:"$tb_BaseReachableTime.Text -ForegroundColor Green
  3702. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -BaseReachableTime $tb_BaseReachableTime.Text
  3703. }
  3704. if ($tb_ReachableTime.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ReachableTime)){
  3705. Write-Host "ReachableTime is same, skipping." -ForegroundColor green}
  3706. else{
  3707. Write-Host "ReachableTime:"$tb_ReachableTime.Text -ForegroundColor Green
  3708. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -ReachableTime $tb_ReachableTime.Text
  3709. }
  3710. if ($tb_DadRetransmitTime.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DadRetransmitTime)){
  3711. Write-Host "DadRetransmitTime is same, skipping." -ForegroundColor green}
  3712. else{
  3713. Write-Host "DadRetransmitTime:"$tb_DadRetransmitTime.Text -ForegroundColor Green
  3714. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -DadRetransmitTime $tb_DadRetransmitTime.Text
  3715. }
  3716. if ($tb_DadTransmits.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DadTransmits)){
  3717. Write-Host "DadTransmits is same, skipping." -ForegroundColor green}
  3718. else{
  3719. Write-Host "DadTransmits:"$tb_DadTransmits.Text -ForegroundColor Green
  3720. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -DadTransmits $tb_DadTransmits.Text
  3721. }
  3722. if ($tb_NlMtu.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NlMtu)){
  3723. Write-Host "NlMtu is same, skipping." -ForegroundColor green}
  3724. else{
  3725. Write-Host "NlMtu:"$tb_NlMtu.Text -ForegroundColor Green
  3726. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -NlMtu $tb_NlMtu.Text
  3727. }
  3728. if ($tb_RetransmitTime.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand RetransmitTime)){
  3729. Write-Host "RetransmitTime is same, skipping." -ForegroundColor green}
  3730. else{
  3731. Write-Host "RetransmitTime:"$tb_RetransmitTime.Text -ForegroundColor Green
  3732. Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -RetransmitTime $tb_RetransmitTime.Text
  3733. }
  3734. }
  3735.  
  3736. function IPv4_CheckedChanged(){
  3737. if ($cb_IPv4.Checked){
  3738. $cb_IPv6.Enabled = $false
  3739. $Global:AddressFamily = "IPv4"
  3740. RefreshingNetIPInterfaceSettings
  3741. }else{
  3742. $cb_IPv6.Enabled = $true
  3743. $Global:AddressFamily = "IPv6"
  3744. RefreshingNetIPInterfaceSettings
  3745. }
  3746. if ($cb_IPv4.Checked -eq $false -and $cb_IPv6.Checked -eq $false -or $cb_IPv4.Checked -eq $false -and $cb_IPv6.Visible -eq $false ){
  3747. Write-Warning "IPv4 and IPv6 are not Checked, Disabling Interface-Settings."
  3748. $Groupbox7.Enabled = $false
  3749. $btn_applyInterfaceSettings.Enabled = $false
  3750. }else{
  3751. $Groupbox7.Enabled = $true
  3752. $btn_applyInterfaceSettings.Enabled = $true
  3753. }
  3754. }
  3755.  
  3756. function IPv6_CheckedChanged(){
  3757. if ($cb_IPv6.Checked){
  3758. $cb_IPv4.Enabled = $false
  3759. $Global:AddressFamily = "IPv6"
  3760. RefreshingNetIPInterfaceSettings
  3761. }else{
  3762. $cb_IPv4.Enabled = $true
  3763. $Global:AddressFamily = "IPv4"}
  3764. RefreshingNetIPInterfaceSettings
  3765. }
  3766.  
  3767. if ($cb_IPv4.Checked -eq $false -and $cb_IPv6.Checked -eq $false -or $cb_IPv4.Checked -eq $false -and $cb_IPv6.Visible -eq $false ){
  3768. Write-Warning "IPv4 and IPv6 are not Checked, Disabling Interface-Settings."
  3769. $Groupbox7.Enabled = $false
  3770. $btn_applyInterfaceSettings.Enabled = $false
  3771. }else{
  3772. $Groupbox7.Enabled = $true
  3773. $btn_applyInterfaceSettings.Enabled = $true
  3774. }
  3775.  
  3776. function RefreshingNetIPInterfaceSettings{
  3777. #NetIPInterface
  3778. #AdvertiseDefaultRoute
  3779. $cb_AdvertiseDefaultRoute.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand AdvertiseDefaultRoute
  3780.  
  3781. #Advertising
  3782. $cb_Advertising.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Advertising
  3783.  
  3784. #AutomaticMetric
  3785. $cb_AutomaticMetric.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand AutomaticMetric
  3786.  
  3787. #ClampMss
  3788. $cb_ClampMss.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ClampMss
  3789.  
  3790. #DirectedMacWolPattern
  3791. $cb_DirectedMacWolPattern.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DirectedMacWolPattern
  3792.  
  3793. #EcnMarking
  3794. $cb_EcnMarking.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand EcnMarking
  3795.  
  3796. #ForceArpNdWolPattern
  3797. $cb_ForceArpNdWolPattern.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ForceArpNdWolPattern
  3798.  
  3799. #Forwarding
  3800. $cb_Forwarding.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Forwarding
  3801.  
  3802. #IgnoreDefaultRoutes
  3803. $cb_IgnoreDefaultRoutes.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand IgnoreDefaultRoutes
  3804.  
  3805. #ManagedAddressConfiguration
  3806. $cb_ManagedAddressConfiguration.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ManagedAddressConfiguration
  3807.  
  3808. #NeighborDiscoverySupported
  3809. $cb_NeighborDiscoverySupported.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NeighborDiscoverySupported
  3810.  
  3811. #NeighborUnreachabilityDetection
  3812. $cb_NeighborUnreachabilityDetection.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NeighborUnreachabilityDetection
  3813.  
  3814. #OtherStatefulConfiguration
  3815. $cb_OtherStatefulConfiguration.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand OtherStatefulConfiguration
  3816.  
  3817. #RouterDiscovery
  3818. $cb_RouterDiscovery.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand RouterDiscovery
  3819.  
  3820. #Store
  3821. $cb_Store.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Store
  3822.  
  3823. #WeakHostReceive
  3824. $cb_WeakHostReceive.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand WeakHostReceive
  3825.  
  3826. #WeakHostSend
  3827. $cb_WeakHostSend.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand WeakHostSend
  3828.  
  3829. #CurrentHopLimit
  3830. #When this parameter value is set to 0, it uses this default.
  3831. $tb_CurrentHopLimit.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand CurrentHopLimit
  3832.  
  3833. #BaseReachableTime
  3834. #Specifies the base value for random reachable time, in milliseconds. For more information, see RFC 2461.
  3835. #The default value is 30000.
  3836. $tb_BaseReachableTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand BaseReachableTime
  3837.  
  3838. #ReachableTime
  3839. #Specifies an array of reachable time values. This parameter is the time, in milliseconds, that a node assumes that a neighbor
  3840. #is reachable after having received a reachability confirmation. This parameter works with the NeighborUnreachabilityDetection parameter.
  3841. $tb_ReachableTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ReachableTime
  3842.  
  3843. #DadRetransmitTime
  3844. #Specifies a value for the time interval between neighbor solicitation messages.
  3845. $tb_DadRetransmitTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DadRetransmitTime
  3846.  
  3847. #DadTransmits
  3848. #Specifies a value for the number of consecutive messages sent while the network driver performs duplicate address detection.
  3849. $tb_DadTransmits.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DadTransmits
  3850.  
  3851. #NlMtu
  3852. #Specifies the network layer Maximum Transmission Unit (MTU) value, in bytes, for an IP interface.
  3853. #For IPv4 the minimum value is 576 bytes. For IPv6 the minimum is value is 1280 bytes.
  3854. #For both IPv4 and IPv6, the maximum value is 2^32-1 (4294967295). You cannot set values outside these ranges.
  3855. #If this parameter is set to 0, then it will remain unchanged and maintain its current value. The IP interface will not transmit packets larger than the maximum value.
  3856. $tb_NlMtu.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NlMtu
  3857.  
  3858. #RetransmitTime (RetransmitTimeMs)
  3859. #Specifies a value for timeout and retransmission, in milliseconds, for Neighbor Solicitation messages.
  3860. #For more information, see RetransTimer in RFC 2461.
  3861. #By default, the value is set to 1000.
  3862. $tb_RetransmitTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand RetransmitTime
  3863.  
  3864. }
  3865.  
  3866. function applyall{
  3867. if($Groupbox7.Enabled -eq $False){
  3868. Write-Host "Applying All Settings!" -ForegroundColor Yellow
  3869. Write-Host "`n"
  3870. Write-Host "===== Global Settings =====" -ForegroundColor Yellow
  3871. applyglobal
  3872. Write-Host "`n"
  3873. Write-Host "===== RSS Settings =====" -ForegroundColor Yellow
  3874. applyrsssettings
  3875. Write-Host "`n"
  3876. Write-Host "===== PowerSaving Settings =====" -ForegroundColor Yellow
  3877. applypowersavingsettings
  3878. Write-Host "`n"
  3879. Write-Warning "===== IP-Interface Settings ====="
  3880. Write-Warning "IPv4 or IPv6 not specified!"
  3881. Write-Host "`n"
  3882. Write-Host "===== Adapter Advanced Settings =====" -ForegroundColor Yellow
  3883. applyadvsettings
  3884.  
  3885. }else{
  3886. Write-Host "Applying All Settings!" -ForegroundColor Yellow
  3887.  
  3888. Write-Host "===== Global Settings =====" -ForegroundColor Yellow
  3889. applyglobal
  3890.  
  3891. Write-Host "===== RSS Settings =====" -ForegroundColor Yellow
  3892. applyrsssettings
  3893.  
  3894. Write-Host "===== PowerSaving Settings =====" -ForegroundColor Yellow
  3895. applypowersavingsettings
  3896.  
  3897. Write-Host "===== IP-Interface Settings =====" -ForegroundColor Yellow
  3898. ApplyInterfaceSettings
  3899.  
  3900. Write-Host "===== Adapter Advanced Settings =====" -ForegroundColor Yellow
  3901. applyadvsettings
  3902. }
  3903. }
  3904.  
  3905. function RegistryTweaks{
  3906. #$ErrorActionPreference = 'Continue'
  3907. #DefaultReceiveWindow
  3908. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DefaultReceiveWindow")
  3909. if ($A -eq $false -and $cb_Afd_defaultrecWin.Text -ne $null -and $cb_Afd_defaultrecWin.Text -ne '' ){
  3910. Write-Host "Set AFDDefaultReceiveWindow to"$cb_Afd_defaultrecWin.Text -ForegroundColor Green
  3911. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultReceiveWindow" -Typ "Dword" -Value $cb_Afd_defaultrecWin.Text -Force
  3912. }elseif($A -eq $true -and $cb_Afd_defaultrecWin.Text -eq $null -or $cb_Afd_defaultrecWin.Text -eq ''){
  3913. Write-Warning "Removing AFDDefaultReceiveWindow"
  3914. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultReceiveWindow"
  3915. }else{
  3916. Write-Host "Set AFDDefaultReceiveWindow to"$cb_Afd_defaultrecWin.Text -ForegroundColor Green
  3917. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultReceiveWindow" -Value $cb_Afd_defaultrecWin.Text -Force
  3918. }
  3919.  
  3920. #DefaultSendWindow
  3921. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DefaultSendWindow")
  3922. if ($A -eq $false -and $cb_Afd_defaultSendWin.Text -ne $null -and $cb_Afd_defaultSendWin.Text -ne '' ){
  3923. Write-Host "Set AFDDefaultSendWindow to"$cb_Afd_defaultSendWin.Text -ForegroundColor Green
  3924. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultSendWindow" -Typ "Dword" -Value $cb_Afd_defaultSendWin.Text -Force
  3925. }elseif($A -eq $true -and $cb_Afd_defaultSendWin.Text -eq $null -or $cb_Afd_defaultSendWin.Text -eq ''){
  3926. Write-Warning "Removing AFDDefaultSendWindow"
  3927. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultSendWindow"
  3928. }else{
  3929. Write-Host "Set AFDDefaultSendWindow to"$cb_Afd_defaultSendWin.Text -ForegroundColor Green
  3930. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultSendWindow" -Value $cb_Afd_defaultSendWin.Text -Force
  3931. }
  3932.  
  3933. #DisableAddressSharing
  3934. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DisableAddressSharing")
  3935. if ($A -eq $false -and $cb_DisableAddressSharing.Text -ne $null -and $cb_DisableAddressSharing.Text -ne '' ){
  3936. Write-Host "Set AFDDisableAddressSharing to"$cb_DisableAddressSharing.Text -ForegroundColor Green
  3937. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableAddressSharing" -Typ "Dword" -Value $cb_DisableAddressSharing.Text -Force
  3938. }elseif($A -eq $true -and $cb_DisableAddressSharing.Text -eq $null -or $cb_DisableAddressSharing.Text -eq ''){
  3939. Write-Warning "Removing AFDDisableAddressSharing"
  3940. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableAddressSharing"
  3941. }else{
  3942. Write-Host "Set AFDDisableAddressSharing to"$cb_DisableAddressSharing.Text -ForegroundColor Green
  3943. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableAddressSharing" -Value $cb_DisableAddressSharing.Text -Force
  3944. }
  3945.  
  3946. #BufferMultiplier
  3947. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "BufferMultiplier")
  3948. if ($A -eq $false -and $cb_BufferMultiplier.Text -ne $null -and $cb_BufferMultiplier.Text -ne '' ){
  3949. Write-Host "Set AFDBufferMultiplier to"$cb_BufferMultiplier.Text -ForegroundColor Green
  3950. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferMultiplier" -Typ "Dword" -Value $cb_BufferMultiplier.Text -Force
  3951. }elseif($A -eq $true -and $cb_BufferMultiplier.Text -eq $null -or $cb_BufferMultiplier.Text -eq ''){
  3952. Write-Warning "Removing AFDBufferMultiplier"
  3953. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferMultiplier"
  3954. }else{
  3955. Write-Host "Set AFDBufferMultiplier to"$cb_BufferMultiplier.Text -ForegroundColor Green
  3956. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferMultiplier" -Value $cb_BufferMultiplier.Text -Force
  3957. }
  3958.  
  3959. #BufferAlignment
  3960. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "BufferAlignment")
  3961. if ($A -eq $false -and $cb_BufferAlignment.Text -ne $null -and $cb_BufferAlignment.Text -ne '' -and $cb_BufferAlignment.Text -ne '64'){
  3962. Write-Host "Set AFDBufferAlignment to"$cb_BufferAlignment.Text -ForegroundColor Green
  3963. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferAlignment" -Typ "Dword" -Value $cb_BufferAlignment.Text -Force
  3964. }elseif($A -eq $true -and $cb_BufferAlignment.Text -eq $null -or $cb_BufferAlignment.Text -eq '' -or $cb_BufferAlignment.Text -eq '64'){
  3965. Write-Warning "Removing AFDBufferAlignment"
  3966. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferAlignment"
  3967. }else{
  3968. Write-Host "Set AFDBufferAlignment to"$cb_BufferAlignment.Text -ForegroundColor Green
  3969. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferAlignment" -Value $cb_BufferAlignment.Text -Force
  3970. }
  3971.  
  3972. #DoNotHoldNICBuffers
  3973. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DoNotHoldNICBuffers")
  3974. if ($A -eq $false -and $cb_DoNotHoldNICBuffers.Text -ne $null -and $cb_DoNotHoldNICBuffers.Text -ne '' -and $cb_DoNotHoldNICBuffers.Text -ne '1' ){
  3975. Write-Host "Set AFDDoNotHoldNICBuffers to"$cb_DoNotHoldNICBuffers.Text -ForegroundColor Green
  3976. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DoNotHoldNICBuffers" -Typ "Dword" -Value $cb_DoNotHoldNICBuffers.Text -Force
  3977. }elseif($A -eq $true -and $cb_DoNotHoldNICBuffers.Text -eq $null -or $cb_DoNotHoldNICBuffers.Text -eq '' -or $cb_DoNotHoldNICBuffers.Text -eq '1'){
  3978. Write-Warning "Removing AFDDoNotHoldNICBuffers"
  3979. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DoNotHoldNICBuffers"
  3980. }else{
  3981. Write-Host "Set AFDDoNotHoldNICBuffers to"$cb_DoNotHoldNICBuffers.Text -ForegroundColor Green
  3982. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DoNotHoldNICBuffers" -Value $cb_DoNotHoldNICBuffers.Text -Force
  3983. }
  3984.  
  3985. #SmallBufferSize
  3986. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "SmallBufferSize")
  3987. if ($A -eq $false -and $cb_SmallBufferSize.Text -ne $null -and $cb_SmallBufferSize.Text -ne '' -and $cb_SmallBufferSize.Text -ne '128' ){
  3988. Write-Host "Set AFDSmallBufferSize to"$cb_SmallBufferSize.Text -ForegroundColor Green
  3989. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferSize" -Typ "Dword" -Value $cb_SmallBufferSize.Text -Force
  3990. }elseif($A -eq $true -and $cb_SmallBufferSize.Text -eq $null -or $cb_SmallBufferSize.Text -eq '' -or $cb_SmallBufferSize.Text -eq '128'){
  3991. Write-Warning "Removing AFDSmallBufferSize"
  3992. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferSize"
  3993. }else{
  3994. Write-Host "Set AFDSmallBufferSize to"$cb_SmallBufferSize.Text -ForegroundColor Green
  3995. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferSize" -Value $cb_SmallBufferSize.Text -Force
  3996. }
  3997.  
  3998. #MediumBufferSize
  3999. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "MediumBufferSize")
  4000. if ($A -eq $false -and $cb_MediumBufferSize.Text -ne $null -and $cb_MediumBufferSize.Text -ne '' -and $cb_MediumBufferSize.Text -ne '1504'){
  4001. Write-Host "Set AFDMediumBufferSize to"$cb_MediumBufferSize.Text -ForegroundColor Green
  4002. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferSize" -Typ "Dword" -Value $cb_MediumBufferSize.Text -Force
  4003. }elseif($A -eq $true -and $cb_MediumBufferSize.Text -eq $null -or $cb_MediumBufferSize.Text -eq '' -or $cb_MediumBufferSize.Text -eq '1504'){
  4004. Write-Warning "Removing AFDMediumBufferSize"
  4005. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferSize"
  4006. }else{
  4007. Write-Host "Set AFDMediumBufferSize to"$cb_MediumBufferSize.Text -ForegroundColor Green
  4008. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferSize" -Value $cb_MediumBufferSize.Text -Force
  4009. }
  4010.  
  4011. #LargeBufferSize
  4012. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "LargeBufferSize")
  4013. if ($A -eq $false -and $cb_LargeBufferSize.Text -ne $null -and $cb_LargeBufferSize.Text -ne '' -and $cb_LargeBufferSize.Text -ne '3472'){
  4014. Write-Host "Set AFDLargeBufferSize to"$cb_LargeBufferSize.Text -ForegroundColor Green
  4015. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargeBufferSize" -Typ "Dword" -Value $cb_LargeBufferSize.Text -Force
  4016. }elseif($A -eq $true -and $cb_LargeBufferSize.Text -eq $null -or $cb_LargeBufferSize.Text -eq '' -or $cb_LargeBufferSize.Text -eq '3472'){
  4017. Write-Warning "Removing AFDLargeBufferSize"
  4018. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargeBufferSize"
  4019. }else{
  4020. Write-Host "Set AFDLargeBufferSize to"$cb_LargeBufferSize.Text -ForegroundColor Green
  4021. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargeBufferSize" -Value $cb_LargeBufferSize.Text -Force
  4022. }
  4023.  
  4024. #HugeBufferSize
  4025. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "HugeBufferSize")
  4026. if ($A -eq $false -and $cb_HugeBufferSize.Text -ne $null -and $cb_HugeBufferSize.Text -ne '' -and $cb_HugeBufferSize.Text -ne '32768' ){
  4027. Write-Host "Set AFDHugeBufferSize to"$cb_HugeBufferSize.Text -ForegroundColor Green
  4028. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "HugeBufferSize" -Typ "Dword" -Value $cb_HugeBufferSize.Text -Force
  4029. }elseif($A -eq $true -and $cb_HugeBufferSize.Text -eq $null -or $cb_HugeBufferSize.Text -eq '' -or $cb_HugeBufferSize.Text -eq '32768'){
  4030. Write-Warning "Removing AFDHugeBufferSize"
  4031. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "HugeBufferSize"
  4032. }else{
  4033. Write-Host "Set AFDHugeBufferSize to"$cb_HugeBufferSize.Text -ForegroundColor Green
  4034. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "HugeBufferSize" -Value $cb_HugeBufferSize.Text -Force
  4035. }
  4036.  
  4037. #SmallBufferListDepth
  4038. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "SmallBufferListDepth")
  4039. if ($A -eq $false -and $cb_SmallBufferListDepth.Text -ne $null -and $cb_SmallBufferListDepth.Text -ne '' ){
  4040. Write-Host "Set AFDSmallBufferListDepth to"$cb_SmallBufferListDepth.Text -ForegroundColor Green
  4041. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferListDepth" -Typ "Dword" -Value $cb_SmallBufferListDepth.Text -Force
  4042. }elseif($A -eq $true -and $cb_SmallBufferListDepth.Text -eq $null -or $cb_SmallBufferListDepth.Text -eq ''){
  4043. Write-Warning "Removing AFDSmallBufferListDepth"
  4044. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferListDepth"
  4045. }else{
  4046. Write-Host "Set AFDSmallBufferListDepth to"$cb_SmallBufferListDepth.Text -ForegroundColor Green
  4047. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferListDepth" -Value $cb_SmallBufferListDepth.Text -Force
  4048. }
  4049.  
  4050. #MediumBufferListDepth
  4051. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "MediumBufferListDepth")
  4052. if ($A -eq $false -and $cb_MediumBufferListDepth.Text -ne $null -and $cb_MediumBufferListDepth.Text -ne '' ){
  4053. Write-Host "Set AFDMediumBufferListDepth to"$cb_MediumBufferListDepth.Text -ForegroundColor Green
  4054. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferListDepth" -Typ "Dword" -Value $cb_MediumBufferListDepth.Text -Force
  4055. }elseif($A -eq $true -and $cb_MediumBufferListDepth.Text -eq $null -or $cb_MediumBufferListDepth.Text -eq ''){
  4056. Write-Warning "Removing AFDMediumBufferListDepth"
  4057. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferListDepth"
  4058. }else{
  4059. Write-Host "Set AFDMediumBufferListDepth to"$cb_MediumBufferListDepth.Text -ForegroundColor Green
  4060. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferListDepth" -Value $cb_MediumBufferListDepth.Text -Force
  4061. }
  4062.  
  4063. #LargBufferListDepth
  4064. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "LargBufferListDepth")
  4065. if ($A -eq $false -and $cb_LargBufferListDepth.Text -ne $null -and $cb_LargBufferListDepth.Text -ne '' ){
  4066. Write-Host "Set AFDLargBufferListDepth to"$cb_LargBufferListDepth.Text -ForegroundColor Green
  4067. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargBufferListDepth" -Typ "Dword" -Value $cb_LargBufferListDepth.Text -Force
  4068. }elseif($A -eq $true -and $cb_LargBufferListDepth.Text -eq $null -or $cb_LargBufferListDepth.Text -eq ''){
  4069. Write-Warning "Removing AFDLargBufferListDepth"
  4070. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargBufferListDepth"
  4071. }else{
  4072. Write-Host "Set AFDLargBufferListDepth to"$cb_LargBufferListDepth.Text -ForegroundColor Green
  4073. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargBufferListDepth" -Value $cb_LargBufferListDepth.Text -Force
  4074. }
  4075.  
  4076. #DisableDirectAcceptEx
  4077. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DisableDirectAcceptEx")
  4078. if ($A -eq $false -and $cb_DisableDirectAcceptEx.Text -ne $null -and $cb_DisableDirectAcceptEx.Text -ne '' ){
  4079. Write-Host "Set AFDDisableDirectAcceptEx to"$cb_DisableDirectAcceptEx.Text -ForegroundColor Green
  4080. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableDirectAcceptEx" -Typ "Dword" -Value $cb_DisableDirectAcceptEx.Text -Force
  4081. }elseif($A -eq $true -and $cb_DisableDirectAcceptEx.Text -eq $null -or $cb_DisableDirectAcceptEx.Text -eq ''){
  4082. Write-Warning "Removing AFDDisableDirectAcceptEx"
  4083. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableDirectAcceptEx"
  4084. }else{
  4085. Write-Host "Set AFDDisableDirectAcceptEx to"$cb_DisableDirectAcceptEx.Text -ForegroundColor Green
  4086. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableDirectAcceptEx" -Value $cb_DisableDirectAcceptEx.Text -Force
  4087. }
  4088.  
  4089. #DisableChainedReceive
  4090. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DisableChainedReceive")
  4091. if ($A -eq $false -and $cb_DisableChainedReceive.Text -ne $null -and $cb_DisableChainedReceive.Text -ne '' -and $cb_DisableChainedReceive.Text -ne '0' ){
  4092. Write-Host "Set AFDDisableChainedReceive to"$cb_DisableChainedReceive.Text -ForegroundColor Green
  4093. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableChainedReceive" -Typ "Dword" -Value $cb_DisableChainedReceive.Text -Force
  4094. }elseif($A -eq $true -and $cb_DisableChainedReceive.Text -eq $null -or $cb_DisableChainedReceive.Text -eq '' -or $cb_DisableChainedReceive.Text -eq '0'){
  4095. Write-Warning "Removing AFDDisableChainedReceive"
  4096. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableChainedReceive"
  4097. }else{
  4098. Write-Host "Set AFDDisableChainedReceive to"$cb_DisableChainedReceive.Text -ForegroundColor Green
  4099. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableChainedReceive" -Value $cb_DisableChainedReceive.Text -Force
  4100. }
  4101.  
  4102. #DisableRawSecurity
  4103. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DisableRawSecurity")
  4104. if ($A -eq $false -and $cb_DisableRawSecurity.Text -ne $null -and $cb_DisableRawSecurity.Text -ne '' -and $cb_DisableRawSecurity.Text -ne '0'){
  4105. Write-Host "Set AFDDisableRawSecurity to"$cb_DisableRawSecurity.Text -ForegroundColor Green
  4106. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableRawSecurity" -Typ "Dword" -Value $cb_DisableRawSecurity.Text -Force
  4107. }elseif($A -eq $true -and $cb_DisableRawSecurity.Text -eq $null -or $cb_DisableRawSecurity.Text -eq '' -or $cb_DisableRawSecurity.Text -eq '0'){
  4108. Write-Warning "Removing AFDDisableRawSecurity"
  4109. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableRawSecurity"
  4110. }else{
  4111. Write-Host "Set AFDDisableRawSecurity to"$cb_DisableRawSecurity.Text -ForegroundColor Green
  4112. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableRawSecurity" -Value $cb_DisableRawSecurity.Text -Force
  4113. }
  4114.  
  4115. #DynamicSendBufferDisable
  4116. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DynamicSendBufferDisable")
  4117. if ($A -eq $false -and $cb_DynamicSendBufferDisable.Text -ne $null -and $cb_DynamicSendBufferDisable.Text -ne '' -and $cb_DynamicSendBufferDisable.Text -ne '1'){
  4118. Write-Host "Set AFDDynamicSendBufferDisable to"$cb_DynamicSendBufferDisable.Text -ForegroundColor Green
  4119. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DynamicSendBufferDisable" -Typ "Dword" -Value $cb_DynamicSendBufferDisable.Text -Force
  4120. }elseif($A -eq $true -and $cb_DynamicSendBufferDisable.Text -eq $null -or $cb_DynamicSendBufferDisable.Text -eq '' -or $cb_DynamicSendBufferDisable.Text -eq '1'){
  4121. Write-Warning "Removing AFDDynamicSendBufferDisable"
  4122. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DynamicSendBufferDisable"
  4123. }else{
  4124. Write-Host "Set AFDDynamicSendBufferDisable to"$cb_DynamicSendBufferDisable.Text -ForegroundColor Green
  4125. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DynamicSendBufferDisable" -Value $cb_DynamicSendBufferDisable.Text -Force
  4126. }
  4127.  
  4128. #FastSendDatagramThreshold
  4129. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "FastSendDatagramThreshold")
  4130. if ($A -eq $false -and $cb_FastSendDatagramThreshold.Text -ne $null -and $cb_FastSendDatagramThreshold.Text -ne '' ){
  4131. Write-Host "Set AFDFastSendDatagramThreshold to"$cb_FastSendDatagramThreshold.Text -ForegroundColor Green
  4132. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastSendDatagramThreshold" -Typ "Dword" -Value $cb_FastSendDatagramThreshold.Text -Force
  4133. }elseif($A -eq $true -and $cb_FastSendDatagramThreshold.Text -eq $null -or $cb_FastSendDatagramThreshold.Text -eq ''){
  4134. Write-Warning "Removing AFDFastSendDatagramThreshold"
  4135. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastSendDatagramThreshold"
  4136. }else{
  4137. Write-Host "Set AFDFastSendDatagramThreshold to"$cb_FastSendDatagramThreshold.Text -ForegroundColor Green
  4138. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastSendDatagramThreshold" -Value $cb_FastSendDatagramThreshold.Text -Force
  4139. }
  4140.  
  4141. #FastCopyReceiveThreshold
  4142. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "FastCopyReceiveThreshold")
  4143. if ($A -eq $false -and $cb_FastCopyReceiveThreshold.Text -ne $null -and $cb_FastCopyReceiveThreshold.Text -ne '' ){
  4144. Write-Host "Set AFDFastCopyReceiveThreshold to"$cb_FastCopyReceiveThreshold.Text -ForegroundColor Green
  4145. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastCopyReceiveThreshold" -Typ "Dword" -Value $cb_FastCopyReceiveThreshold.Text -Force
  4146. }elseif($A -eq $true -and $cb_FastCopyReceiveThreshold.Text -eq $null -or $cb_FastCopyReceiveThreshold.Text -eq ''){
  4147. Write-Warning "Removing AFDFastCopyReceiveThreshold"
  4148. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastCopyReceiveThreshold"
  4149. }else{
  4150. Write-Host "Set AFDFastCopyReceiveThreshold to"$cb_FastCopyReceiveThreshold.Text -ForegroundColor Green
  4151. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastCopyReceiveThreshold" -Value $cb_FastCopyReceiveThreshold.Text -Force
  4152. }
  4153.  
  4154. #IgnorePushBitOnReceives
  4155. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "IgnorePushBitOnReceives")
  4156. if ($A -eq $false -and $cb_IgnorePushBitOnReceives.Text -ne $null -and $cb_IgnorePushBitOnReceives.Text -ne '' -and $cb_IgnorePushBitOnReceives.Text -ne '0' ){
  4157. Write-Host "Set AFDIgnorePushBitOnReceives to"$cb_IgnorePushBitOnReceives.Text -ForegroundColor Green
  4158. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnorePushBitOnReceives" -Typ "Dword" -Value $cb_IgnorePushBitOnReceives.Text -Force
  4159. }elseif($A -eq $true -and $cb_IgnorePushBitOnReceives.Text -eq $null -or $cb_IgnorePushBitOnReceives.Text -eq '' -or $cb_IgnorePushBitOnReceives.Text -eq '0'){
  4160. Write-Warning "Removing AFDIgnorePushBitOnReceives"
  4161. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnorePushBitOnReceives"
  4162. }else{
  4163. Write-Host "Set AFDIgnorePushBitOnReceives to"$cb_IgnorePushBitOnReceives.Text -ForegroundColor Green
  4164. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnorePushBitOnReceives" -Value $cb_IgnorePushBitOnReceives.Text -Force
  4165. }
  4166.  
  4167. #IgnoreOrderlyRelease
  4168. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "IgnoreOrderlyRelease")
  4169. if ($A -eq $false -and $cb_IgnoreOrderlyRelease.Text -ne $null -and $cb_IgnoreOrderlyRelease.Text -ne '' -and $cb_IgnoreOrderlyRelease.Text -ne '0'){
  4170. Write-Host "Set AFDIgnoreOrderlyRelease to"$cb_IgnoreOrderlyRelease.Text -ForegroundColor Green
  4171. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnoreOrderlyRelease" -Typ "Dword" -Value $cb_IgnoreOrderlyRelease.Text -Force
  4172. }elseif($A -eq $true -and $cb_IgnoreOrderlyRelease.Text -eq $null -or $cb_IgnoreOrderlyRelease.Text -eq '' -or $cb_IgnoreOrderlyRelease.Text -eq '0'){
  4173. Write-Warning "Removing AFDIgnoreOrderlyRelease"
  4174. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnoreOrderlyRelease"
  4175. }else{
  4176. Write-Host "Set AFDIgnoreOrderlyRelease to"$cb_IgnoreOrderlyRelease.Text -ForegroundColor Green
  4177. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnoreOrderlyRelease" -Value $cb_IgnoreOrderlyRelease.Text -Force
  4178. }
  4179.  
  4180. #TransmitWorker
  4181. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "TransmitWorker")
  4182. if ($A -eq $false -and $cb_TransmitWorker.Text -ne $null -and $cb_TransmitWorker.Text -ne '' -and $cb_TransmitWorker.Text -ne '16'){
  4183. Write-Host "Set AFDTransmitWorker to"$cb_TransmitWorker.Text -ForegroundColor Green
  4184. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "TransmitWorker" -Typ "Dword" -Value $cb_TransmitWorker.Text -Force
  4185. }elseif($A -eq $true -and $cb_TransmitWorker.Text -eq $null -or $cb_TransmitWorker.Text -eq '' -or $cb_TransmitWorker.Text -eq '16'){
  4186. Write-Warning "Removing AFDTransmitWorker"
  4187. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "TransmitWorker"
  4188. }else{
  4189. Write-Host "Set AFDTransmitWorker to"$cb_TransmitWorker.Text -ForegroundColor Green
  4190. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "TransmitWorker" -Value $cb_TransmitWorker.Text -Force
  4191. }
  4192.  
  4193. #PriorityBoost
  4194. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "PriorityBoost")
  4195. if ($A -eq $false -and $cb_PriorityBoost.Text -ne $null -and $cb_PriorityBoost.Text -ne '' -and $cb_PriorityBoost.Text -ne '2'){
  4196. Write-Host "Set AFDPriorityBoost to"$cb_PriorityBoost.Text -ForegroundColor Green
  4197. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "PriorityBoost" -Typ "Dword" -Value $cb_PriorityBoost.Text -Force
  4198. }elseif($A -eq $true -and $cb_PriorityBoost.Text -eq $null -or $cb_PriorityBoost.Text -eq '' -or $cb_PriorityBoost.Text -eq '2'){
  4199. Write-Warning "Removing AFDPriorityBoost"
  4200. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "PriorityBoost"
  4201. }else{
  4202. Write-Host "Set AFDPriorityBoost to"$cb_PriorityBoost.Text -ForegroundColor Green
  4203. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "PriorityBoost" -Value $cb_PriorityBoost.Text -Force
  4204. }
  4205.  
  4206. #IrpStackSize
  4207. $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "IrpStackSize")
  4208. if ($A -eq $false -and $cb_IrpStackSize.Text -ne $null -and $cb_IrpStackSize.Text -ne '' -and $cb_IrpStackSize.Text -ne '4'){
  4209. Write-Host "Set AFDIrpStackSize to"$cb_IrpStackSize.Text -ForegroundColor Green
  4210. New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IrpStackSize" -Typ "Dword" -Value $cb_IrpStackSize.Text -Force
  4211. }elseif($A -eq $true -and $cb_IrpStackSize.Text -eq $null -or $cb_IrpStackSize.Text -eq '' -or $cb_IrpStackSize.Text -eq '4'){
  4212. Write-Warning "Removing AFDIrpStackSize"
  4213. Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IrpStackSize"
  4214. }else{
  4215. Write-Host "Set AFDIrpStackSize to"$cb_IrpStackSize.Text -ForegroundColor Green
  4216. Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IrpStackSize" -Value $cb_IrpStackSize.Text -Force
  4217. }
  4218.  
  4219. }
  4220.  
  4221. function Opacity {
  4222. $modes = @{OpacityOn = "0.90"; OpacityOff = "1"}
  4223. $Form.Opacity = $(if ($Form.Opacity -eq $modes.OpacityOn){ $modes.OpacityOff } else { $modes.OpacityOn})
  4224.  
  4225. }
  4226.  
  4227. function HWSettings {
  4228.  
  4229. if ($cb_MsiMode.SelectedIndex -eq (Get-ItemPropertyValue -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\MessageSignaledInterruptProperties" -Name "MSISupported")){
  4230. Write-Host "MSI-Mode is same then Registry, skipping." -ForegroundColor Green}
  4231.  
  4232. elseif ($cb_MsiMode.SelectedIndex -eq '0'){
  4233. Write-Host "Disabling MSI Mode." -ForegroundColor Green
  4234. Set-ItemProperty -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\MessageSignaledInterruptProperties" -Name "MSISupported" -Value "0"}
  4235.  
  4236. elseif ($cb_MsiMode.SelectedIndex -eq '1'){
  4237. Write-Host "Enabling MSI Mode." -ForegroundColor Green
  4238. Set-ItemProperty -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\MessageSignaledInterruptProperties" -Name "MSISupported" -Value "1"}
  4239.  
  4240.  
  4241. if ($DevicePriorityAvailable -eq $false){
  4242. Write-Host "Creating Device Priority DWORD with Value $($cb_InterruptPriority.Text)." -ForegroundColor Green
  4243. New-ItemProperty -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\Affinity Policy" -Name "DevicePriority" -Typ "Dword"
  4244. }elseif ($cb_InterruptPriority.SelectedIndex -eq '0'){
  4245. Write-Host "Setting DevicePriority to Undefined." -ForegroundColor Green
  4246. Set-ItemProperty -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\Affinity Policy" -Name "DevicePriority" -Value "0"}
  4247.  
  4248. elseif ($cb_InterruptPriority.SelectedIndex -eq '1'){
  4249. Write-Host "Setting DevicePriority to Low." -ForegroundColor Green
  4250. Set-ItemProperty -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\Affinity Policy" -Name "DevicePriority" -Value "1"
  4251. }
  4252.  
  4253. elseif ($cb_InterruptPriority.SelectedIndex -eq '2'){
  4254. Write-Host "Setting DevicePriority to Normal." -ForegroundColor Green
  4255. Set-ItemProperty -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\Affinity Policy" -Name "DevicePriority" -Value "2"
  4256. }
  4257.  
  4258. elseif ($cb_InterruptPriority.SelectedIndex -eq '3'){
  4259. Write-Host "Setting DevicePriority to High." -ForegroundColor Green
  4260. Set-ItemProperty -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\Affinity Policy" -Name "DevicePriority" -Value "3"
  4261. }
  4262. }
  4263.  
  4264.  
  4265. $btn_InterruptApply.Add_Click({cls; HWSettings})
  4266. $btn_registrytweaksapply.Add_Click({cls; RegistryTweaks})
  4267. $cb_IPv4.Add_CheckedChanged({ IPv4_CheckedChanged })
  4268. $cb_IPv6.Add_CheckedChanged({ IPv6_CheckedChanged })
  4269. $btn_applyInterfaceSettings.Add_Click({cls; ApplyInterfaceSettings})
  4270. $btn_openreg.Add_Click({btn_regopadap})
  4271. $btn_adaptrest.Add_Click({cls; adapter_restart})
  4272. $btn_applyadv.Add_Click({cls; applyadvsettings})
  4273. $btn_applyglobal.Add_Click({cls; applyglobal })
  4274. #$btn_applotadapters.Add_Click({applyotAdapters})
  4275. $btn_apply.Add_Click({ cls; applyrsssettings })
  4276. # Source: https://community.spiceworks.com/topic/2239276-script-help-to-disable-power-management-on-network-cards
  4277. $btn_applypowersettings.Add_Click({cls; applypowersavingsettings})
  4278. $btn_applyall.Add_Click({cls; applyall})
  4279. $btn_rssaddsupport.Add_Click({cls; RSSEnable})
  4280. $btn_unqueues.Add_Click({cls; RSSQueuesUnlock})
  4281. $btn_Opacity.Add_Click({Opacity})
  4282. $btn_afd.Add_Click({btn_regopenafd})
  4283. #Notes:
  4284. # Adding Additional Settings for Adv Tweaking
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.  
  4298. #endregion
  4299.  
  4300. [void]$Form.ShowDialog()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement