Advertisement
St1cky

Network Tweaker

May 23rd, 2022 (edited)
160
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PowerShell 252.93 KB | None
  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                       = "Network  Adapter - Tweaker"
  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                 = 386
  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. @('1','0') | 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') | 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. $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))
  1969. $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))
  1970. $Groupbox2.controls.AddRange(@($Label10,$cb_osrss,$Label11,$cb_osrsc,$Label12,$cb_oschimney,$Label13,$cb_ostaskoff,$cb_osntd,$Label14,$cb_osntdais,$Label15,$cb_ospcf,$Label16))
  1971. $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))
  1972. $Groupbox5.controls.AddRange(@($Label32,$Label33,$cb_tcpiprssbasecpu,$cb_ndisrssbasecpu))
  1973. $Groupbox4.controls.AddRange(@($Label34,$cb_EnablePME,$Label36,$cb_EnableDynamicPowerGating,$Label37,$cb_EnableConnectedPowerGating,$Label38,$cb_AutoPowerSaveModeEnabled,$cb_NicAutoPowerSaver,$Label39,$Label40,$cb_DisableDelayedPowerUp,$Label41,$cb_ReduceSpeedOnPowerDown))
  1974. $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))
  1975. $Groupbox6.controls.AddRange(@($lb_MsiMode,$cb_MsiMode,$lb_InterruptPriority,$cb_InterruptPriority,$lb_DevicePolicy,$cb_DevicePolicy))
  1976. $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))
  1977.  
  1978.  
  1979. #region Logic
  1980. #Cleaning Code
  1981. cls
  1982. Add-Type -Name Window -Namespace Console -MemberDefinition '
  1983. [DllImport("Kernel32.dll")]
  1984. public static extern IntPtr GetConsoleWindow();
  1985.  
  1986. [DllImport("user32.dll")]
  1987. public static extern bool ShowWindow(IntPtr hWnd, Int32 nCmdShow);'
  1988.  
  1989. #Write your logic code here
  1990.  
  1991. #GUI Settings
  1992. #$ErrorActionPreference="Stop"
  1993. #$Form.Opacity = "0.90"
  1994.  
  1995. #Deselect Content for Updating Text/Value Changes
  1996. $Form.Add_MouseClick({$Form.ActiveControl = $null})
  1997. $Groupbox1.Add_MouseClick({$Form.ActiveControl = $null})
  1998. $Groupbox2.Add_MouseClick({$Form.ActiveControl = $null})
  1999. $Groupbox3.Add_MouseClick({$Form.ActiveControl = $null})
  2000. $Groupbox4.Add_MouseClick({$Form.ActiveControl = $null})
  2001. $Groupbox5.Add_MouseClick({$Form.ActiveControl = $null})
  2002. $Groupbox7.Add_MouseClick({$Form.ActiveControl = $null})
  2003. $Groupbox6.Add_MouseClick({$Form.ActiveControl = $null})
  2004. $Groupbox8.Add_MouseClick({$Form.ActiveControl = $null})
  2005. $Groupbox9.Add_MouseClick({$Form.ActiveControl = $null})
  2006.  
  2007.  
  2008. #Groupboxes
  2009. $Groupbox1.Font                = New-Object System.Drawing.Font('Calibri',10)
  2010. $Groupbox1.ForeColor           = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2011. $Groupbox2.Font                = New-Object System.Drawing.Font('Calibri',10)
  2012. $Groupbox2.ForeColor           = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2013. $Groupbox3.Font                = New-Object System.Drawing.Font('Calibri',10)
  2014. $Groupbox3.ForeColor           = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2015. $Groupbox4.Font                = New-Object System.Drawing.Font('Calibri',10)
  2016. $Groupbox4.ForeColor           = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2017. $Groupbox5.Font                = New-Object System.Drawing.Font('Calibri',10)
  2018. $Groupbox5.ForeColor           = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2019. $Groupbox7.Font                = New-Object System.Drawing.Font('Calibri',10)
  2020. $Groupbox7.ForeColor           = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2021. $Groupbox6.Font                = New-Object System.Drawing.Font('Calibri',10)
  2022. $Groupbox6.ForeColor           = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2023. $Groupbox8.Font                = New-Object System.Drawing.Font('Calibri',10)
  2024. $Groupbox8.ForeColor           = [System.Drawing.ColorTranslator]::FromHtml("#4a90e2")
  2025.  
  2026.  
  2027. #Buttons
  2028. $btn_openreg.Flatstyle = 'Flat'
  2029. $btn_apply.Flatstyle = 'Flat'
  2030. $btn_applyglobal.Flatstyle = 'Flat'
  2031. $btn_applyadv.Flatstyle = 'Flat'
  2032. $btn_adaptrest.Flatstyle = 'Flat'
  2033. $btn_unqueues.Flatstyle = 'Flat'
  2034. #$btn_applotadapters.Flatstyle = 'Flat'
  2035. $btn_applypowersettings.Flatstyle = 'Flat'
  2036. $btn_applyall.Flatstyle = 'Flat'
  2037. $btn_applyInterfaceSettings.Flatstyle = 'Flat'
  2038. $btn_rssaddsupport.Flatstyle = 'Flat'
  2039. $btn_registrytweaksapply.Flatstyle = 'Flat'
  2040. $btn_Opacity.Flatstyle = 'Flat'
  2041. $btn_InterruptApply.Flatstyle = 'Flat'
  2042.  
  2043.  
  2044.  
  2045. function Set-ConsoleColor ($bc, $fc) {
  2046.     $Host.UI.RawUI.BackgroundColor = $bc
  2047.     $Host.UI.RawUI.ForegroundColor = $fc
  2048.     Clear-Host
  2049. }
  2050. Set-ConsoleColor 'Black' 'Green'
  2051.  
  2052. #Locked Combos
  2053. $cb_AdapterNamesCombo.Flatstyle = 'Flat'
  2054. $cb_rss_onoff.Flatstyle = 'Flat'
  2055. $cb_rssprofile.Flatstyle = 'Flat'
  2056. $cb_rssbaseproc.Flatstyle = 'Flat'
  2057. $cb_rssmaxproc.Flatstyle = 'Flat'
  2058. $cb_rssmaxprocs.Flatstyle = 'Flat'
  2059. $cb_rssqueues.Flatstyle = 'Flat'
  2060. $cb_osrss.Flatstyle = 'Flat'
  2061. $cb_osrsc.Flatstyle = 'Flat'
  2062. $cb_oschimney.Flatstyle = 'Flat'
  2063. $cb_ostaskoff.Flatstyle = 'Flat'
  2064. $cb_osntd.Flatstyle = 'Flat'
  2065. $cb_osntdais.Flatstyle = 'Flat'
  2066. $cb_ospcf.Flatstyle = 'Flat'
  2067. $cb_flowcontrol.Flatstyle = 'Flat'
  2068. $cb_IPChecksumOffloadIPv4.Flatstyle = 'Flat'
  2069. $cb_TCPChecksumOffloadIPv4.Flatstyle = 'Flat'
  2070. $cb_TCPChecksumOffloadIPv6.Flatstyle = 'Flat'
  2071. $cb_UDPChecksumOffloadIPv4.Flatstyle = 'Flat'
  2072. $cb_UDPChecksumOffloadIPv6.Flatstyle = 'Flat'
  2073. $cb_InterruptModeration.Flatstyle = 'Flat'
  2074. $cb_LsoV1IPv4.Flatstyle = 'Flat'
  2075. $cb_LsoV2IPv4.Flatstyle = 'Flat'
  2076. $cb_LsoV2IPv6.Flatstyle = 'Flat'
  2077. $cb_PMARPOffload.Flatstyle = 'Flat'
  2078. $cb_PMNSOffload.Flatstyle = 'Flat'
  2079. $cb_PriorityVLANTag.Flatstyle = 'Flat'
  2080. $cb_ReceiveBuffers.Flatstyle = 'Flat'
  2081. $cb_TransmitBuffers.Flatstyle = 'Flat'
  2082. $cb_InterruptModerationRate.Flatstyle = 'Flat'
  2083. $cb_CoalesceBufferSize.Flatstyle = 'Flat'
  2084. $cb_rss_onoff.DropDownStyle = 'DropDownList'
  2085. $cb_AdapterNamesCombo.DropDownStyle = 'DropDownList'
  2086. $cb_rssprofile.DropDownStyle = 'DropDownList'
  2087. $cb_rssbaseproc.DropDownStyle = 'DropDownList'
  2088. $cb_rssmaxproc.DropDownStyle = 'DropDownList'
  2089. $cb_rssmaxprocs.DropDownStyle = 'DropDownList'
  2090. $cb_rssqueues.DropDownStyle = 'DropDownList'
  2091. $cb_osrss.DropDownStyle = 'DropDownList'
  2092. $cb_osrsc.DropDownStyle = 'DropDownList'
  2093. $cb_oschimney.DropDownStyle = 'DropDownList'
  2094. $cb_ostaskoff.DropDownStyle = 'DropDownList'
  2095. $cb_osntd.DropDownStyle = 'DropDownList'
  2096. $cb_osntdais.DropDownStyle = 'DropDownList'
  2097. $cb_ospcf.DropDownStyle = 'DropDownList'
  2098. $cb_flowcontrol.DropDownStyle = 'DropDownList'
  2099. $cb_IPChecksumOffloadIPv4.DropDownStyle = 'DropDownList'
  2100. $cb_TCPChecksumOffloadIPv4.DropDownStyle = 'DropDownList'
  2101. $cb_TCPChecksumOffloadIPv6.DropDownStyle = 'DropDownList'
  2102. $cb_UDPChecksumOffloadIPv4.DropDownStyle = 'DropDownList'
  2103. $cb_UDPChecksumOffloadIPv6.DropDownStyle = 'DropDownList'
  2104. $cb_InterruptModeration.DropDownStyle = 'DropDownList'
  2105. $cb_LsoV1IPv4.DropDownStyle = 'DropDownList'
  2106. $cb_LsoV2IPv4.DropDownStyle = 'DropDownList'
  2107. $cb_LsoV2IPv6.DropDownStyle = 'DropDownList'
  2108. $cb_PMARPOffload.DropDownStyle = 'DropDownList'
  2109. $cb_PMNSOffload.DropDownStyle = 'DropDownList'
  2110. $cb_PriorityVLANTag.DropDownStyle = 'DropDownList'
  2111. #$cb_CoalesceBufferSize.DropDownStyle = 'DropDownList'
  2112.  
  2113.  
  2114. $cb_Afd_defaultrecWin.Flatstyle = 'Flat'
  2115. $cb_Afd_defaultSendWin.Flatstyle = 'Flat'
  2116. $cb_BufferMultiplier.Flatstyle = 'Flat'
  2117. $cb_DisableAddressSharing.Flatstyle = 'Flat'
  2118. $cb_BufferAlignment.Flatstyle = 'Flat'
  2119. $cb_DoNotHoldNICBuffers.Flatstyle = 'Flat'
  2120. $cb_SmallBufferSize.Flatstyle = 'Flat'
  2121. $cb_MediumBufferSize.Flatstyle = 'Flat'
  2122. $cb_LargeBufferSize.Flatstyle = 'Flat'
  2123. $cb_HugeBufferSize.Flatstyle = 'Flat'
  2124. $cb_SmallBufferListDepth.Flatstyle = 'Flat'
  2125. $cb_MediumBufferListDepth.Flatstyle = 'Flat'
  2126. $cb_LargBufferListDepth.Flatstyle = 'Flat'
  2127. $cb_DisableChainedReceive.Flatstyle = 'Flat'
  2128. $cb_DisableDirectAcceptEx.Flatstyle = 'Flat'
  2129. $cb_DisableRawSecurity.Flatstyle = 'Flat'
  2130. $cb_DynamicSendBufferDisable.Flatstyle = 'Flat'
  2131. $cb_FastSendDatagramThreshold.Flatstyle = 'Flat'
  2132. $cb_FastCopyReceiveThreshold.Flatstyle = 'Flat'
  2133. $cb_IgnorePushBitOnReceives.Flatstyle = 'Flat'
  2134. $cb_IgnoreOrderlyRelease.Flatstyle = 'Flat'
  2135. $cb_TransmitWorker.Flatstyle = 'Flat'
  2136. $cb_PriorityBoost.Flatstyle = 'Flat'
  2137.  
  2138. $cb_DisablePortScaling.Flatstyle = 'Flat'
  2139. $cb_ManyCoreScaling.Flatstyle = 'Flat'
  2140. $cb_DisablePortScaling.DropDownStyle = 'DropDownList'
  2141. $cb_ManyCoreScaling.DropDownStyle = 'DropDownList'
  2142.  
  2143. $cb_PacketDirect.Flatstyle = 'Flat'
  2144. $cb_PacketDirect.DropDownStyle = 'DropDownList'
  2145.  
  2146. $cb_EnableCoalesce.Flatstyle = 'Flat'
  2147. $cb_EnableCoalesce.DropDownStyle = 'DropDownList'
  2148. $cb_EnableUdpTxScaling.Flatstyle = 'Flat'
  2149. $cb_EnableUdpTxScaling.DropDownStyle = 'DropDownList'
  2150.  
  2151. $cb_EnablePME.Flatstyle = 'Flat'
  2152. $cb_EnableDynamicPowerGating.Flatstyle = 'Flat'
  2153. $cb_EnableConnectedPowerGating.Flatstyle = 'Flat'
  2154. $cb_AutoPowerSaveModeEnabled.Flatstyle = 'Flat'
  2155. $cb_NicAutoPowerSaver.Flatstyle = 'Flat'
  2156. $cb_DisableDelayedPowerUp.Flatstyle = 'Flat'
  2157. $cb_ReduceSpeedOnPowerDown.Flatstyle = 'Flat'
  2158. $cb_EnablePME.DropDownStyle = 'DropDownList'
  2159. $cb_EnableDynamicPowerGating.DropDownStyle = 'DropDownList'
  2160. $cb_EnableConnectedPowerGating.DropDownStyle = 'DropDownList'
  2161. $cb_AutoPowerSaveModeEnabled.DropDownStyle = 'DropDownList'
  2162. $cb_NicAutoPowerSaver.DropDownStyle = 'DropDownList'
  2163. $cb_DisableDelayedPowerUp.DropDownStyle = 'DropDownList'
  2164. $cb_ReduceSpeedOnPowerDown.DropDownStyle = 'DropDownList'
  2165.  
  2166. $cb_DevicePolicy.Flatstyle = 'Flat'
  2167. $cb_MsiMode.Flatstyle = 'Flat'
  2168. $cb_InterruptPriority.Flatstyle = 'Flat'
  2169. $cb_MsiMode.DropDownStyle = 'DropDownList'
  2170. $cb_InterruptPriority.DropDownStyle = 'DropDownList'
  2171. $cb_DevicePolicy.DropDownStyle = 'DropDownList'
  2172. $cb_MsiMode.Enabled = $false
  2173. $cb_InterruptPriority.Enabled = $false
  2174. $lb_DevicePolicy.Enabled = $false
  2175. $cb_DevicePolicy.Enabled = $false
  2176. $btn_InterruptApply.Enabled = $false
  2177.  
  2178. $cb_AdvertiseDefaultRoute.Flatstyle = 'Flat'
  2179. $cb_Advertising.Flatstyle = 'Flat'
  2180. $cb_AutomaticMetric.Flatstyle = 'Flat'
  2181. $cb_ClampMss.Flatstyle = 'Flat'
  2182. $cb_DirectedMacWolPattern.Flatstyle = 'Flat'
  2183. $cb_EcnMarking.Flatstyle = 'Flat'
  2184. $cb_ForceArpNdWolPattern.Flatstyle = 'Flat'
  2185. $cb_Forwarding.Flatstyle = 'Flat'
  2186. $cb_IgnoreDefaultRoutes.Flatstyle = 'Flat'
  2187. $cb_ManagedAddressConfiguration.Flatstyle = 'Flat'
  2188. $cb_NeighborDiscoverySupported.Flatstyle = 'Flat'
  2189. $cb_NeighborUnreachabilityDetection.Flatstyle = 'Flat'
  2190. $cb_OtherStatefulConfiguration.Flatstyle = 'Flat'
  2191. $cb_RouterDiscovery.Flatstyle = 'Flat'
  2192. $cb_Store.Flatstyle = 'Flat'
  2193. $cb_WeakHostReceive.Flatstyle = 'Flat'
  2194. $cb_WeakHostSend.Flatstyle = 'Flat'
  2195. $cb_AdvertiseDefaultRoute.DropDownStyle = 'DropDownList'
  2196. $cb_Advertising.DropDownStyle = 'DropDownList'
  2197. $cb_AutomaticMetric.DropDownStyle = 'DropDownList'
  2198. $cb_ClampMss.DropDownStyle = 'DropDownList'
  2199. $cb_DirectedMacWolPattern.DropDownStyle = 'DropDownList'
  2200. $cb_EcnMarking.DropDownStyle = 'DropDownList'
  2201. $cb_ForceArpNdWolPattern.DropDownStyle = 'DropDownList'
  2202. $cb_Forwarding.DropDownStyle = 'DropDownList'
  2203. $cb_IgnoreDefaultRoutes.DropDownStyle = 'DropDownList'
  2204. $cb_ManagedAddressConfiguration.DropDownStyle = 'DropDownList'
  2205. $cb_NeighborDiscoverySupported.DropDownStyle = 'DropDownList'
  2206. $cb_NeighborUnreachabilityDetection.DropDownStyle = 'DropDownList'
  2207. $cb_OtherStatefulConfiguration.DropDownStyle = 'DropDownList'
  2208. $cb_RouterDiscovery.DropDownStyle = 'DropDownList'
  2209. $cb_Store.DropDownStyle = 'DropDownList'
  2210. $cb_WeakHostReceive.DropDownStyle = 'DropDownList'
  2211. $cb_WeakHostSend.DropDownStyle = 'DropDownList'
  2212.  
  2213. # ========================================================
  2214.  
  2215. # Loading at Startup Global Settings (OS Settings not Adapter specific)
  2216. $cb_osrss.text = (Get-NetOffloadGlobalSetting | select -expand ReceiveSideScaling)
  2217. $cb_osrsc.text = (Get-NetOffloadGlobalSetting | select -expand ReceiveSegmentCoalescing)
  2218. $cb_oschimney.text = (Get-NetOffloadGlobalSetting | select -expand Chimney)
  2219. $cb_ostaskoff.text = (Get-NetOffloadGlobalSetting | select -expand TaskOffload)
  2220. $cb_osntd.text = (Get-NetOffloadGlobalSetting | select -expand NetworkDirect)
  2221. $cb_osntdais.text = (Get-NetOffloadGlobalSetting | select -expand NetworkDirectAcrossIPSubnets)
  2222. $cb_ospcf.text = (Get-NetOffloadGlobalSetting | select -expand PacketCoalescingFilter)
  2223.  
  2224. # ========================================================
  2225. # RSS Global
  2226. $ErrorActionPreference = "SilentlyContinue"
  2227. $Global:TCPIP_RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
  2228. $Global:NDIS_RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\NDIS\Parameters"
  2229.  
  2230. $TCPIP_RssBaseCpu = (Get-ItemPropertyValue -Path "$TCPIP_RegPath" -Name "RssBaseCpu" -ErrorAction SilentlyContinue)
  2231. if ($TCPIP_RssBaseCpu -eq $null)
  2232.     {
  2233.         $cb_tcpiprssbasecpu.text = '0'
  2234.     }
  2235.     else
  2236.     {
  2237.         $cb_tcpiprssbasecpu.text = $TCPIP_RssBaseCpu
  2238.     }
  2239. $NDIS_RssBaseCpu = (Get-ItemPropertyValue -Path "$NDIS_RegPath" -Name "RssBaseCpu"-ErrorAction SilentlyContinue)
  2240. if ($NDIS_RssBaseCpu -eq $null)
  2241.     {
  2242.         $cb_ndisrssbasecpu.text = '0'
  2243.     }
  2244.     else
  2245.     {
  2246.         $cb_ndisrssbasecpu.text = $NDIS_RssBaseCpu
  2247.     }
  2248.    
  2249. $TCPIPRssBaseCpuValue = ($cb_tcpiprssbasecpu.text)
  2250. $NDISRssBaseCpuValue = ($cb_ndisrssbasecpu.text)
  2251. $cb_tcpiprssbasecpu.add_TextChanged({
  2252.     Write-Host "TCP/IP - RSSBaseCpu = "$cb_tcpiprssbasecpu.text
  2253.     Set-ItemProperty -Path "$TCPIP_RegPath" -Name "RssBaseCpu" -Value $cb_tcpiprssbasecpu.text -Type DWord -Force})
  2254. $cb_ndisrssbasecpu.add_TextChanged({
  2255.     Write-Host "NDIS - RSSBaseCpu = "$cb_ndisrssbasecpu.text
  2256.     Set-ItemProperty -Path "$NDIS_RegPath" -Name "RssBaseCpu" -Value $cb_ndisrssbasecpu.text -Type DWord -Force})
  2257.  
  2258. #$cb_tcpiprssbasecpu.TextChanged = (Set-ItemProperty -Path "$TCPIP_RegPath" -Name "RssBaseCpu" -Value $TCPIPRssBaseCpuValue -Type DWord -Force)
  2259. #$cb_ndisrssbasecpu.TextChanged = (Set-ItemProperty -Path "$NDIS_RegPath" -Name "RssBaseCpu" -Value $NDISRssBaseCpuValue -Type DWord -Force)
  2260.  
  2261. # ========================================================
  2262. # Apply Button Global Settings
  2263. function applyglobal {
  2264.     #cls
  2265.     if ($cb_osrss.text -eq (Get-NetOffloadGlobalSetting | select -expand ReceiveSideScaling))
  2266.     {
  2267.         #Write-Host " ReceiveSideScaling same as Current, skipping." -ForegroundColor green
  2268.     }
  2269.     else
  2270.     {
  2271.         Write-Host "Applying ReceiveSideScaling to"$cb_osrss.text -ForegroundColor Green
  2272.         Set-NetOffloadGlobalSetting -ReceiveSideScaling $cb_osrss.text
  2273.         $cb_osrss.text = (Get-NetOffloadGlobalSetting | select -expand ReceiveSideScaling)
  2274.     }
  2275.    
  2276.     if ($cb_osrsc.text -eq (Get-NetOffloadGlobalSetting | select -expand ReceiveSegmentCoalescing))
  2277.     {
  2278.         #Write-Host " ReceiveSegmentCoalescing same as Current, skipping." -ForegroundColor green
  2279.     }
  2280.     else
  2281.     {
  2282.         Write-Host "Applying ReceiveSegmentCoalescing to"$cb_osrsc.text -ForegroundColor Green
  2283.         Set-NetOffloadGlobalSetting -ReceiveSegmentCoalescing $cb_osrsc.text
  2284.         $cb_osrsc.text = (Get-NetOffloadGlobalSetting | select -expand ReceiveSegmentCoalescing)
  2285.     }
  2286.  
  2287.     if ($cb_oschimney.text -eq (Get-NetOffloadGlobalSetting | select -expand Chimney))
  2288.     {
  2289.         #Write-Host " Chimney same as Current, skipping." -ForegroundColor green
  2290.     }
  2291.     else
  2292.     {
  2293.         Write-Host "Applying Chimney to"$cb_oschimney.text -ForegroundColor Green
  2294.         Set-NetOffloadGlobalSetting -Chimney $cb_oschimney.text
  2295.         $cb_oschimney.text = (Get-NetOffloadGlobalSetting | select -expand Chimney)
  2296.     }
  2297.    
  2298.     if ($cb_ostaskoff.text -eq (Get-NetOffloadGlobalSetting | select -expand TaskOffload))
  2299.     {
  2300.         #Write-Host " TaskOffload same as Current, skipping." -ForegroundColor green
  2301.     }
  2302.     else
  2303.     {
  2304.         Write-Host "Applying TaskOffload to"$cb_ostaskoff.text -ForegroundColor Green
  2305.         Set-NetOffloadGlobalSetting -TaskOffload $cb_ostaskoff.text
  2306.         $cb_ostaskoff.text = (Get-NetOffloadGlobalSetting | select -expand TaskOffload)
  2307.     }
  2308.    
  2309.     if ($cb_osntd.text -eq (Get-NetOffloadGlobalSetting | select -expand NetworkDirect))
  2310.     {
  2311.         #Write-Host " NetworkDirect same as Current, skipping." -ForegroundColor green
  2312.     }
  2313.     else
  2314.     {
  2315.         Write-Host "Applying NetworkDirect to"$cb_osntd.text -ForegroundColor Green
  2316.         #Set-NetOffloadGlobalSetting -NetworkDirect $cb_osntd.text
  2317.         Apply_NetworkDirect
  2318.         $cb_osntd.text = (Get-NetOffloadGlobalSetting | select -expand NetworkDirect)
  2319.     }
  2320.    
  2321.     if ($cb_osntdais.text -eq (Get-NetOffloadGlobalSetting | select -expand NetworkDirectAcrossIPSubnets))
  2322.     {
  2323.         #Write-Host " NetworkDirectAcrossIPSubnets same as Current, skipping." -ForegroundColor green
  2324.     }
  2325.     else
  2326.     {
  2327.         Write-Host "Applying NetworkDirectAcrossIPSubnets to"$cb_osntdais.text -ForegroundColor Green
  2328.         ##Bypass
  2329.         ##Set-NetOffloadGlobalSetting -NetworkDirectAcrossIPSubnets $cb_osntdais.text
  2330.         Apply_NetworkDirectGlobalFlags
  2331.         $cb_osntdais.text = (Get-NetOffloadGlobalSetting | select -expand NetworkDirectAcrossIPSubnets)
  2332.     }
  2333.    
  2334.     if ($cb_ospcf.text -eq (Get-NetOffloadGlobalSetting | select -expand PacketCoalescingFilter))
  2335.     {
  2336.         #Write-Host " PacketCoalescingFilter same as Current, skipping." -ForegroundColor green
  2337.     }
  2338.     else
  2339.     {
  2340.         Write-Host "Applying PacketCoalescingFilter to"$cb_ospcf.text -ForegroundColor Green
  2341.         Set-NetOffloadGlobalSetting -PacketCoalescingFilter $cb_ospcf.text
  2342.         $cb_ospcf.text = (Get-NetOffloadGlobalSetting | select -expand PacketCoalescingFilter)
  2343.     }
  2344. }
  2345.  
  2346. function Apply_NetworkDirect{
  2347. $NetworkDirectAvaible = ((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NDIS\Parameters").PSObject.Properties.Name -contains "NetworkDirectDisable")
  2348.     if ($NetworkDirectAvaible -eq $false -and $cb_osntd.Text -eq 'Disabled' ){
  2349.             #Write-Host "Creating NetworkDirect DWORD with Value $($cb_osntd.Text)."  -ForegroundColor Green
  2350.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NDIS\Parameters" -Name "NetworkDirectDisable" -Typ "Dword" -Value "1"
  2351.         }else{
  2352.             #Write-Host "Removing NetworkDirect DWORD"
  2353.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NDIS\Parameters" -Name "NetworkDirectDisable"
  2354.         }
  2355. }
  2356.  
  2357. function Apply_NetworkDirectGlobalFlags{
  2358. $NetworkDirectGlobalFlags = ((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NDIS\Parameters").PSObject.Properties.Name -contains "NetworkDirectGlobalFlags")
  2359.     if ($NetworkDirectGlobalFlags -eq $false -and $cb_osntdais.Text -eq 'Allowed' ){
  2360.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NDIS\Parameters" -Name "NetworkDirectGlobalFlags" -Typ "Dword" -Value "1"
  2361.         }else{
  2362.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NDIS\Parameters" -Name "NetworkDirectGlobalFlags"
  2363.         }
  2364. }
  2365.  
  2366.  
  2367.  
  2368. #Adapter Selection
  2369. $AdapterName = Get-NetAdapter -physical | where status -eq 'up' | Select -expand InterfaceDescription
  2370. #$AdapterName = Get-NetAdapter -IncludeHidden | Select -expand InterfaceDescription
  2371. #if($AdapterName )
  2372. @($AdapterName) | ForEach-Object {[void] $cb_AdapterNamesCombo.Items.Add($_)}
  2373.  
  2374. function a {
  2375.     cls
  2376.     Write-Host $cb_AdapterNamesCombo.Text
  2377.     $Global:NIC_Desc = $cb_AdapterNamesCombo.Text
  2378.     $lbl_ndisver.Text = Get-NetAdapter -InterfaceDescription $AdapterName | Select -expand NdisVersion
  2379.     $PhysicalAdapter = Get-WmiObject -Class Win32_NetworkAdapter|Where-Object{$_.Name -like "$NIC_Desc"}
  2380.             $PhysicalAdapterName = $PhysicalAdapter.Name
  2381.             $DeviceID = $PhysicalAdapter.DeviceID
  2382.                 If([Int32]$DeviceID -lt 10)
  2383.                 {
  2384.                 $AdapterDeviceNumber = "000"+$DeviceID
  2385.                 }
  2386.                 Else
  2387.                 {
  2388.                 $AdapterDeviceNumber = "00"+$DeviceID
  2389.                 }
  2390.            
  2391.             $Global:EthernetClassGuid = Get-WmiObject Win32_PnPEntity | Where-Object{$_.Name -like "$NIC_Desc" } | Select -expand ClassGuid
  2392.             $Global:EthernetPNPDeviceID = Get-WmiObject Win32_PnPEntity | Where-Object{$_.Name -like "$NIC_Desc" } | Select -expand PNPDeviceID
  2393.             $Global:NetConnectionID = Get-WmiObject -Class Win32_NetworkAdapter | Where-Object{$_.Name -like "$NIC_Desc" } | Select -expand NetConnectionID
  2394.     #check whether the registry path exists.
  2395.         #SupressTerminationErrors
  2396.         $ErrorActionPreference="SilentlyContinue"
  2397.        
  2398.         $Global:KeyPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\$AdapterDeviceNumber"
  2399.         If(Test-Path -Path $KeyPath)
  2400.         {
  2401.             Write-Host "Path found at ($KeyPath)."
  2402.             $lbl_Path.Text = $KeyPath
  2403.         }
  2404.         Else
  2405.         {
  2406.             Write-Warning "The path ($KeyPath) not found."
  2407.         }
  2408.         #RSS Enabled or Not
  2409.         $Global:rssstatus = (Get-NetAdapterRss).Enabled
  2410.         if($rssstatus -eq 'True')
  2411.                 {
  2412.                 $cb_rss_onoff.Text = "Enable"
  2413.                 }
  2414.                 else
  2415.                 {
  2416.                 $cb_rss_onoff.Text = "Disable"
  2417.                 }
  2418.         if($rssstatus -eq $Null )
  2419.                 {
  2420.                     Write-Warning "RSS is handled by OS, because of Network Driver!"
  2421.                     $btn_rssaddsupport.Enabled = $true
  2422.                     #$cb_rssqueues.Enabled = $False
  2423.                     #$cb_rssprofile.Enabled = $False
  2424.                     #$cb_rssbaseproc.Enabled = $False
  2425.                     #$cb_rssmaxproc.Enabled = $False
  2426.                     #$cb_rssmaxprocs.Enabled = $False
  2427.                 }
  2428.                 else
  2429.                 {
  2430.                     $cb_rssqueues.Enabled = $true
  2431.                     $cb_rssprofile.Enabled = $true
  2432.                     $cb_rssbaseproc.Enabled = $true
  2433.                     $cb_rssmaxproc.Enabled = $true
  2434.                     $cb_rssmaxprocs.Enabled = $true
  2435.                     $btn_rssaddsupport.Enabled = $false
  2436.                 }
  2437.           if($cb_rss_onoff.Text -eq 'Enable')
  2438.             {
  2439.                 $Global:Rssstatusset = ($True)
  2440.             }
  2441.             else
  2442.             {
  2443.                 $Global:Rssstatusset = ($False)
  2444.             }
  2445.            
  2446.         #IPv6 Disabled?
  2447.         $IPv6_1 = (Get-ItemPropertyValue -Path "REGISTRY::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name "DisabledComponents")
  2448.         $IPv6_2 = (Get-ItemPropertyValue -Path "REGISTRY::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name "EnableICSIPv6")
  2449.        
  2450.         if ($IPv6_1 -eq "255" -and $IPv6_2 -eq "0"){
  2451.              Write-Warning  "IPv6 is Disabled by Registry."  -ForegroundColor Green
  2452.              $cb_IPv6.Checked = $False
  2453.              $cb_IPv6.Enabled = $False
  2454.              $cb_IPv6.Visible = $False
  2455.              $cb_IPv4.Checked = $True
  2456.              $Global:AddressFamily = "IPv4"
  2457.              }else{
  2458.               Write-Warning  "IPv4/IPv6 is Enabled by Registry. Selecting IPv4 as Default for AddressFamily"  -ForegroundColor Green
  2459.               $cb_IPv4.Checked = $true
  2460.               $cb_IPv6.Checked = $false
  2461.               $Global:AddressFamily = "IPv4"
  2462.              }
  2463.        
  2464.         #RSS Queues
  2465.         #Query Available RSSQueues
  2466.         $AdapterQueuesRegTest = (Test-Path -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum")
  2467.         if($rssstatus -eq $null -Or $cb_rssqueues.Items.Count -eq '0' -and $AdapterQueuesRegTest -eq $false){
  2468.             #Write-Host "Powershell"
  2469.             $Global:AdapterQueues = Get-NetAdapterRss -InterfaceDescription $NIC_Desc | select -expand NumberOfReceiveQueues
  2470.             $cb_rssqueues.Items.Add($AdapterQueues)
  2471.             $cb_rssqueues.Text = $AdapterQueues
  2472.             }else{
  2473.             #Write-Host "Registry"
  2474.             $AdapterQueues = Get-Item -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" | Select -ExpandProperty Property
  2475.             @($AdapterQueues) | ForEach-Object {[void] $cb_rssqueues.Items.Add($_)}
  2476.             $AdapterQueues = Get-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues" -Name "Default" | Select -expand Default
  2477.             $cb_rssqueues.Text = $AdapterQueues
  2478.             }
  2479.            
  2480.             #$RegistryQueues = Get-ItemPropertyValue -Path "$KeyPath\Ndi\Params\*NumRssQueues" -Name "Default" | Select -expand Default
  2481.             #$PowershellQueues = Get-NetAdapterRss -InterfaceDescription $NIC_Desc | select -expand NumberOfReceiveQueues
  2482.             #if($RegistryQueues -eq $PowershellQueues){
  2483.             #    Write-Host "NumberOfReceiveQueues is equal."
  2484.             #}else{
  2485.             #    Write-Warning "NumberOfReceiveQueues is not the same. (Powershell and Registry not equal!) Using Registry Value."
  2486.             #}
  2487.  
  2488.         #RSS Profiles
  2489.         $OSRSSProfiles = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetAdapterRss.Profile].GetEnumValues()
  2490.         @($OSRSSProfiles) | ForEach-Object {[void] $cb_rssprofile.Items.Add($_)}
  2491.         $cb_rssprofile.Text = Get-NetAdapterRss | Select -ExpandProperty Profile
  2492.        
  2493.         #RSS BaseProc
  2494.         $cb_rssbaseproc.Text = Get-NetAdapterRss | Select -ExpandProperty "BaseProcessorNumber"
  2495.         $cb_rssmaxproc.Text = Get-NetAdapterRss | Select -ExpandProperty "MaxProcessorNumber"
  2496.         $cb_rssmaxprocs.Text = Get-NetAdapterRss | Select -ExpandProperty "MaxProcessors"
  2497.        
  2498.         # Network Adapter Advanced Settings
  2499.         #
  2500.         #FlowControl
  2501.         $FlowControl = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*FlowControl")
  2502.         $cb_flowcontrol.SelectedIndex=$FlowControl
  2503.         #IPChecksumOffloadIPv4
  2504.         $IPChecksumOffloadIPv4 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*IPChecksumOffloadIPv4")
  2505.         $cb_IPChecksumOffloadIPv4.SelectedIndex=$IPChecksumOffloadIPv4
  2506.         #TCPChecksumOffloadIPv4
  2507.         $TCPChecksumOffloadIPv4 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv4")
  2508.         $cb_TCPChecksumOffloadIPv4.SelectedIndex=$TCPChecksumOffloadIPv4
  2509.         #TCPChecksumOffloadIPv6
  2510.         $TCPChecksumOffloadIPv6 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv6")
  2511.         $cb_TCPChecksumOffloadIPv6.SelectedIndex=$TCPChecksumOffloadIPv6
  2512.         #UDPChecksumOffloadIPv4
  2513.         $UDPChecksumOffloadIPv4 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv4")
  2514.         $cb_UDPChecksumOffloadIPv4.SelectedIndex=$UDPChecksumOffloadIPv4
  2515.         #UDPChecksumOffloadIPv6
  2516.         $UDPChecksumOffloadIPv6 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv6")
  2517.         $cb_UDPChecksumOffloadIPv6.SelectedIndex=$UDPChecksumOffloadIPv6
  2518.         #InterruptModeration
  2519.         $InterruptModeration = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*InterruptModeration")
  2520.         $cb_InterruptModeration.SelectedIndex=$InterruptModeration
  2521.         #InterruptModerationRate
  2522.         $InterruptModerationRate = (Get-ItemPropertyValue -Path "$KeyPath" -Name "ITR")
  2523.         $cb_InterruptModerationRate.Text=$InterruptModerationRate
  2524.         #LsoV2IPv4
  2525.         $LsoV2IPv4 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*LsoV2IPv4")
  2526.         $cb_LsoV2IPv4.SelectedIndex=$LsoV2IPv4
  2527.         #LsoV2IPv6
  2528.         $LsoV2IPv6 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*LsoV2IPv6")
  2529.         $cb_LsoV2IPv6.SelectedIndex=$LsoV2IPv6
  2530.         #LsoV1IPv4
  2531.         $LsoV1IPv4 = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*LsoV1IPv4")
  2532.         $cb_LsoV1IPv4.SelectedIndex=$LsoV1IPv4
  2533.         #PMARPOffload
  2534.         $PMARPOffload = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PMARPOffload")
  2535.         $cb_PMARPOffload.SelectedIndex=$PMARPOffload
  2536.         #PMNSOffload
  2537.         $PMNSOffload = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PMNSOffload")
  2538.         $cb_PMNSOffload.SelectedIndex=$PMNSOffload
  2539.         #PriorityVLANTag
  2540.         $PriorityVLANTag = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PriorityVLANTag")
  2541.         $cb_PriorityVLANTag.SelectedIndex=$PriorityVLANTag
  2542.         #ReceiveBuffers
  2543.         $ReceiveBuffers = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*ReceiveBuffers")
  2544.         $cb_ReceiveBuffers.Text=$ReceiveBuffers
  2545.         #TransmitBuffers
  2546.         $TransmitBuffers = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*TransmitBuffers")
  2547.         $cb_TransmitBuffers.Text=$TransmitBuffers
  2548.         #TxIntDelay
  2549.         $TxIntDelay = (Get-ItemPropertyValue -Path "$KeyPath" -Name "TxIntDelay")
  2550.         $tb_TxIntDelay.Text=$TxIntDelay
  2551.         #PacketDirect
  2552.         $PacketDirect = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PacketDirect")
  2553.         if($PacketDirect -eq $null){
  2554.             $cb_PacketDirect.Text="Undefined"
  2555.         }else{
  2556.             $cb_PacketDirect.SelectedIndex=$PacketDirect}
  2557.         #EnableCoalesce ( Default Enabled )
  2558.         $EnableCoalesce = (Get-ItemPropertyValue -Path "$KeyPath" -Name "EnableCoalesce")
  2559.         if($EnableCoalesce -eq $null){
  2560.             $cb_EnableCoalesce.Text="Enabled"
  2561.         }else{
  2562.             $cb_EnableCoalesce.SelectedIndex=$EnableCoalesce}
  2563.         #CoalesceBufferSize ( Default 2048 )
  2564.         $CoalesceBufferSize = (Get-ItemPropertyValue -Path "$KeyPath" -Name "CoalesceBufferSize")
  2565.         if($CoalesceBufferSize -eq $null){
  2566.             $cb_CoalesceBufferSize.Text="2048"
  2567.         }else{
  2568.             $cb_CoalesceBufferSize.Text=$CoalesceBufferSize}  
  2569.         #EnableUdpTxScaling
  2570.         $EnableUdpTxScaling = (Get-ItemPropertyValue -Path "$KeyPath" -Name "EnableUdpTxScaling")
  2571.         if($EnableUdpTxScaling -eq $null){
  2572.             $cb_EnableUdpTxScaling.Text="Enabled"
  2573.         }else{
  2574.             $cb_EnableUdpTxScaling.SelectedIndex=$EnableUdpTxScaling}
  2575.  
  2576.         #EnablePME
  2577.         $EnablePME = (Get-ItemPropertyValue -Path "$KeyPath" -Name "EnablePME")
  2578.             if ($EnablePME -eq '0' -or $EnablePME -eq '1' ){
  2579.                 $cb_EnablePME.SelectedIndex=$EnablePME
  2580.             }else{
  2581.                 $cb_EnablePME.Items.Add('Undeclared')
  2582.                 $cb_EnablePME.Text = 'Undeclared'
  2583.             }
  2584.         #EnableDynamicPowerGating
  2585.         $EnableDynamicPowerGating = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*EnableDynamicPowerGating")
  2586.             if ($EnableDynamicPowerGating -eq 0 -or $EnableDynamicPowerGating -eq 1 ){
  2587.                 $cb_EnableDynamicPowerGating.SelectedIndex=$EnableDynamicPowerGating
  2588.             }else{
  2589.                 $cb_EnableDynamicPowerGating.Items.Add('Undeclared')
  2590.                 $cb_EnableDynamicPowerGating.Text = 'Undeclared'
  2591.             }
  2592.         #EnableConnectedPowerGating
  2593.         $EnableConnectedPowerGating = (Get-ItemPropertyValue -Path "$KeyPath" -Name "EnableConnectedPowerGating")
  2594.             if ($EnableConnectedPowerGating -eq 0 -or $EnableConnectedPowerGating -eq 1 ){
  2595.                 $cb_EnableConnectedPowerGating.SelectedIndex=$EnableConnectedPowerGating
  2596.             }else{
  2597.                 $cb_EnableConnectedPowerGating.Items.Add('Undeclared')
  2598.                 $cb_EnableConnectedPowerGating.Text = 'Undeclared'
  2599.             }
  2600.    
  2601.         #AutoPowerSaveModeEnabled
  2602.         $AutoPowerSaveModeEnabled = (Get-ItemPropertyValue -Path "$KeyPath" -Name "AutoPowerSaveModeEnabled")
  2603.             if ($AutoPowerSaveModeEnabled -eq 0 -or $AutoPowerSaveModeEnabled -eq 1 ){
  2604.                 $cb_AutoPowerSaveModeEnabled.SelectedIndex=$AutoPowerSaveModeEnabled
  2605.             }else{
  2606.                 $cb_AutoPowerSaveModeEnabled.Items.Add('Undeclared')
  2607.                 $cb_EnableConnectedPowerGating.Text = 'Enabled'
  2608.             }
  2609.            
  2610.         #NicAutoPowerSaver
  2611.         $NicAutoPowerSaver = (Get-ItemPropertyValue -Path "$KeyPath" -Name "*NicAutoPowerSaver")
  2612.             if ($NicAutoPowerSaver -eq 0 -or $NicAutoPowerSaver -eq 1 ){
  2613.                 $cb_NicAutoPowerSaver.SelectedIndex=$NicAutoPowerSaver
  2614.             }else{
  2615.                 $cb_NicAutoPowerSaver.Items.Add('Undeclared')
  2616.                 $cb_NicAutoPowerSaver.Text = 'Undeclared'
  2617.             }
  2618.        
  2619.         #DisableDelayedPowerUp
  2620.         $DisableDelayedPowerUp = (Get-ItemPropertyValue -Path "$KeyPath" -Name "DisableDelayedPowerUp")
  2621.             if ($DisableDelayedPowerUp -eq 0 -or $DisableDelayedPowerUp -eq 1 ){
  2622.                 $cb_DisableDelayedPowerUp.SelectedIndex=$DisableDelayedPowerUp
  2623.             }else{
  2624.                 $cb_DisableDelayedPowerUp.Items.Add('Undeclared')
  2625.                 $cb_DisableDelayedPowerUp.Text = 'Undeclared'
  2626.             }
  2627.        
  2628.         #ReduceSpeedOnPowerDown
  2629.         $ReduceSpeedOnPowerDown = (Get-ItemPropertyValue -Path "$KeyPath" -Name "ReduceSpeedOnPowerDown")
  2630.             if ($ReduceSpeedOnPowerDown -eq 0 -or $ReduceSpeedOnPowerDown -eq 1 ){
  2631.                 $cb_ReduceSpeedOnPowerDown.SelectedIndex=$ReduceSpeedOnPowerDown
  2632.             }else{
  2633.                 $cb_ReduceSpeedOnPowerDown.Items.Add('Undeclared')
  2634.                 $cb_ReduceSpeedOnPowerDown.Text = 'Undeclared'
  2635.             }
  2636.            
  2637.         #DisablePortScaling
  2638.         $DisablePortScaling = (Get-ItemPropertyValue -Path "$KeyPath" -Name "DisablePortScaling")
  2639.             if ($DisablePortScaling -eq 0 -or $DisablePortScaling -eq 1 ){
  2640.                 $cb_DisablePortScaling.SelectedIndex=$DisablePortScaling
  2641.             }else{
  2642.                 $cb_DisablePortScaling.Items.Add('Undeclared')
  2643.                 $cb_DisablePortScaling.Text = 'Undeclared'
  2644.             }    
  2645.    
  2646.         #ManyCoreScaling
  2647.         $ManyCoreScaling = (Get-ItemPropertyValue -Path "$KeyPath" -Name "ManyCoreScaling")
  2648.             if ($ManyCoreScaling -eq 0 -or $ManyCoreScaling -eq 1 ){
  2649.                 $cb_ManyCoreScaling.SelectedIndex=$ManyCoreScaling
  2650.             }else{
  2651.                 $cb_ManyCoreScaling.Items.Add('Undeclared')
  2652.                 $cb_ManyCoreScaling.Text = 'Undeclared'
  2653.             }
  2654.  
  2655.  
  2656. #Getting Tweaks Settings
  2657.  
  2658.         #AFDDefaultReceiveWindow
  2659.         $AFDDefaultReceiveWindow = (Get-ItemPropertyValue -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultReceiveWindow")
  2660.         $cb_Afd_defaultRecWin.Text=$AFDDefaultReceiveWindow
  2661.  
  2662.         #AFDDefaultSendWindow
  2663.         $AFDDefaultSendWindow = (Get-ItemPropertyValue -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultSendWindow")
  2664.         $cb_Afd_defaultSendWin.Text=$AFDDefaultSendWindow
  2665.        
  2666.         #BufferMultiplier
  2667.         $AFDBufferMultiplier = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferMultiplier")
  2668.         $cb_BufferMultiplier.Text=$AFDBufferMultiplier
  2669.        
  2670.         #DisableAddressSharing
  2671.         $AFDDisableAddressSharing = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableAddressSharing")
  2672.         $cb_DisableAddressSharing.Text=$AFDDisableAddressSharing
  2673.  
  2674.         #BufferAlignment
  2675.         $AFDBufferAlignment = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferAlignment")
  2676.         $cb_BufferAlignment.Text=$AFDBufferAlignment
  2677.        
  2678.         #DoNotHoldNICBuffers
  2679.         $AFDDoNotHoldNICBuffers = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "DoNotHoldNICBuffers")
  2680.         $cb_DoNotHoldNICBuffers.Text=$AFDDoNotHoldNICBuffers
  2681.  
  2682.         #SmallBufferSize
  2683.         $AFDSmallBufferSize = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferSize")
  2684.         $cb_SmallBufferSize.Text=$AFDSmallBufferSize
  2685.  
  2686.         #MediumBufferSize
  2687.         $AFDMediumBufferSize = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferSize")
  2688.         $cb_MediumBufferSize.Text=$AFDMediumBufferSize
  2689.        
  2690.         #LargeBufferSize
  2691.         $AFDLargeBufferSize = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargeBufferSize")
  2692.         $cb_LargeBufferSize.Text=$AFDLargeBufferSize
  2693.        
  2694.         #HugeBufferSize
  2695.         $AFDHugeBufferSize = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "HugeBufferSize")
  2696.         $cb_HugeBufferSize.Text=$AFDHugeBufferSize        
  2697.        
  2698.         #SmallBufferListDepth
  2699.         $AFDSmallBufferListDepth = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferListDepth")
  2700.         $cb_SmallBufferListDepth.Text=$AFDSmallBufferListDepth
  2701.        
  2702.         #MediumBufferListDepth
  2703.         $AFDMediumBufferListDepth = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferListDepth")
  2704.         $cb_MediumBufferListDepth.Text=$AFDMediumBufferListDepth
  2705.        
  2706.         #LargBufferListDepth
  2707.         $AFDLargBufferListDepth = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargBufferListDepth")
  2708.         $cb_LargBufferListDepth.Text=$AFDLargBufferListDepth
  2709.        
  2710.         #DisableChainedReceive
  2711.         $AFDDisableChainedReceive = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableChainedReceive")
  2712.         $cb_DisableChainedReceive.Text=$AFDDisableChainedReceive
  2713.        
  2714.         #DisableDirectAcceptEx
  2715.         $AFDDisableDirectAcceptEx = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableDirectAcceptEx")
  2716.         $cb_DisableDirectAcceptEx.Text=$AFDDisableDirectAcceptEx
  2717.        
  2718.         #DisableRawSecurity
  2719.         $AFDDisableRawSecurity = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableRawSecurity")
  2720.         $cb_DisableRawSecurity.Text=$AFDDisableRawSecurity
  2721.        
  2722.         #DynamicSendBufferDisable
  2723.         $AFDDynamicSendBufferDisable = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "DynamicSendBufferDisable")
  2724.         $cb_DynamicSendBufferDisable.Text=$AFDDynamicSendBufferDisable
  2725.        
  2726.         #FastSendDatagramThreshold
  2727.         $AFDFastSendDatagramThreshold = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastSendDatagramThreshold")
  2728.         $cb_FastSendDatagramThreshold.Text=$AFDFastSendDatagramThreshold
  2729.        
  2730.         #FastCopyReceiveThreshold
  2731.         $AFDFastCopyReceiveThreshold = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastCopyReceiveThreshold")
  2732.         $cb_FastCopyReceiveThreshold.Text=$AFDFastCopyReceiveThreshold
  2733.        
  2734.         #IgnorePushBitOnReceives
  2735.         $AFDIgnorePushBitOnReceives = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnorePushBitOnReceives")
  2736.         $cb_IgnorePushBitOnReceives.Text=$AFDIgnorePushBitOnReceives
  2737.        
  2738.         #IgnoreOrderlyRelease
  2739.         $AFDIgnoreOrderlyRelease = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnoreOrderlyRelease")
  2740.         $cb_IgnoreOrderlyRelease.Text=$AFDIgnoreOrderlyRelease
  2741.        
  2742.         #TransmitWorker
  2743.         $AFDTransmitWorker = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "TransmitWorker")
  2744.         $cb_TransmitWorker.Text=$AFDTransmitWorker
  2745.        
  2746.          #PriorityBoost
  2747.         $AFDPriorityBoost = (Get-ItemPropertyValue -Path "REGISTRY::HKLM\System\CurrentControlSet\Services\AFD\Parameters" -Name "PriorityBoost")
  2748.         $cb_PriorityBoost.Text=$AFDPriorityBoost
  2749.        
  2750. #NetIPInterface
  2751.        
  2752.         #NetIPInterface
  2753.         #AdvertiseDefaultRoute
  2754.         $AdvertiseDefaultRoute = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.AdvertiseDefaultRoute].GetEnumValues()
  2755.         @($AdvertiseDefaultRoute) | ForEach-Object {[void] $cb_AdvertiseDefaultRoute.Items.Add($_)}
  2756.         $cb_AdvertiseDefaultRoute.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand AdvertiseDefaultRoute
  2757.            
  2758.         #Advertising
  2759.         $Advertising = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.Advertising].GetEnumValues()
  2760.         @($Advertising) | ForEach-Object {[void] $cb_Advertising.Items.Add($_)}
  2761.         $cb_Advertising.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Advertising
  2762.            
  2763.         #AutomaticMetric
  2764.         $AutomaticMetric = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.AutomaticMetric].GetEnumValues()
  2765.         @($AutomaticMetric) | ForEach-Object {[void] $cb_AutomaticMetric.Items.Add($_)}
  2766.         $cb_AutomaticMetric.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand AutomaticMetric
  2767.            
  2768.         #ClampMss
  2769.         $ClampMss = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.ClampMss].GetEnumValues()
  2770.         @($ClampMss) | ForEach-Object {[void] $cb_ClampMss.Items.Add($_)}
  2771.         $cb_ClampMss.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ClampMss
  2772.            
  2773.         #DirectedMacWolPattern
  2774.         $DirectedMacWolPattern = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.DirectedMacWolPattern].GetEnumValues()
  2775.         @($DirectedMacWolPattern) | ForEach-Object {[void] $cb_DirectedMacWolPattern.Items.Add($_)}
  2776.         $cb_DirectedMacWolPattern.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DirectedMacWolPattern
  2777.            
  2778.         #EcnMarking
  2779.         $EcnMarking = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.EcnMarking].GetEnumValues()
  2780.         @($EcnMarking) | ForEach-Object {[void] $cb_EcnMarking.Items.Add($_)}
  2781.         $cb_EcnMarking.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand EcnMarking
  2782.            
  2783.         #ForceArpNdWolPattern
  2784.         $ForceArpNdWolPattern = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.ForceArpNdWolPattern].GetEnumValues()
  2785.         @($ForceArpNdWolPattern) | ForEach-Object {[void] $cb_ForceArpNdWolPattern.Items.Add($_)}
  2786.         $cb_ForceArpNdWolPattern.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ForceArpNdWolPattern
  2787.            
  2788.         #Forwarding
  2789.         $Forwarding = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.Forwarding].GetEnumValues()
  2790.         @($Forwarding) | ForEach-Object {[void] $cb_Forwarding.Items.Add($_)}
  2791.         $cb_Forwarding.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Forwarding
  2792.            
  2793.         #IgnoreDefaultRoutes
  2794.         $IgnoreDefaultRoutes = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.IgnoreDefaultRoutes].GetEnumValues()
  2795.         @($IgnoreDefaultRoutes) | ForEach-Object {[void] $cb_IgnoreDefaultRoutes.Items.Add($_)}
  2796.         $cb_IgnoreDefaultRoutes.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand IgnoreDefaultRoutes
  2797.            
  2798.         #ManagedAddressConfiguration
  2799.         $ManagedAddressConfiguration = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.ManagedAddressConfiguration].GetEnumValues()
  2800.         @($ManagedAddressConfiguration) | ForEach-Object {[void] $cb_ManagedAddressConfiguration.Items.Add($_)}
  2801.         $cb_ManagedAddressConfiguration.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ManagedAddressConfiguration
  2802.            
  2803.         #NeighborDiscoverySupported
  2804.         $NeighborDiscoverySupported = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.NeighborDiscoverySupported].GetEnumValues()
  2805.         @($NeighborDiscoverySupported) | ForEach-Object {[void] $cb_NeighborDiscoverySupported.Items.Add($_)}
  2806.         $cb_NeighborDiscoverySupported.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NeighborDiscoverySupported
  2807.        
  2808.         #NeighborUnreachabilityDetection
  2809.         $NeighborUnreachabilityDetection = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.NeighborUnreachabilityDetection].GetEnumValues()
  2810.         @($NeighborUnreachabilityDetection) | ForEach-Object {[void] $cb_NeighborUnreachabilityDetection.Items.Add($_)}
  2811.         $cb_NeighborUnreachabilityDetection.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NeighborUnreachabilityDetection
  2812.        
  2813.         #OtherStatefulConfiguration
  2814.         $OtherStatefulConfiguration = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.OtherStatefulConfiguration].GetEnumValues()
  2815.         @($OtherStatefulConfiguration) | ForEach-Object {[void] $cb_OtherStatefulConfiguration.Items.Add($_)}
  2816.         $cb_OtherStatefulConfiguration.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand OtherStatefulConfiguration
  2817.        
  2818.         #RouterDiscovery
  2819.         $RouterDiscovery = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.RouterDiscovery].GetEnumValues()
  2820.         @($RouterDiscovery) | ForEach-Object {[void] $cb_RouterDiscovery.Items.Add($_)}
  2821.         $cb_RouterDiscovery.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand RouterDiscovery
  2822.        
  2823.         #Store
  2824.         $Store = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.Store].GetEnumValues()
  2825.         @($Store) | ForEach-Object {[void] $cb_Store.Items.Add($_)}
  2826.         $cb_Store.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Store
  2827.        
  2828.         #WeakHostReceive
  2829.         $WeakHostReceive = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.WeakHostReceive].GetEnumValues()
  2830.         @($WeakHostReceive) | ForEach-Object {[void] $cb_WeakHostReceive.Items.Add($_)}
  2831.         $cb_WeakHostReceive.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand WeakHostReceive
  2832.        
  2833.         #WeakHostSend
  2834.         $WeakHostSend = [Microsoft.PowerShell.Cmdletization.GeneratedTypes.NetIPInterface.WeakHostSend].GetEnumValues()
  2835.         @($WeakHostSend) | ForEach-Object {[void] $cb_WeakHostSend.Items.Add($_)}
  2836.         $cb_WeakHostSend.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand WeakHostSend
  2837.        
  2838.         #CurrentHopLimit
  2839.         #When this parameter value is set to 0, it uses this default.    
  2840.         $tb_CurrentHopLimit.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand CurrentHopLimit
  2841.        
  2842.         #BaseReachableTime
  2843.         #Specifies the base value for random reachable time, in milliseconds. For more information, see RFC 2461.
  2844.         #The default value is 30000.
  2845.         $tb_BaseReachableTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand BaseReachableTime
  2846.    
  2847.         #ReachableTime
  2848.         #Specifies an array of reachable time values. This parameter is the time, in milliseconds, that a node assumes that a neighbor
  2849.         #is reachable after having received a reachability confirmation. This parameter works with the NeighborUnreachabilityDetection parameter.
  2850.         $tb_ReachableTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ReachableTime
  2851.  
  2852.         #DadRetransmitTime
  2853.         #Specifies a value for the time interval between neighbor solicitation messages.
  2854.         $tb_DadRetransmitTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DadRetransmitTime
  2855.  
  2856.         #DadTransmits
  2857.         #Specifies a value for the number of consecutive messages sent while the network driver performs duplicate address detection.
  2858.         $tb_DadTransmits.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DadTransmits
  2859.  
  2860.         #NlMtu
  2861.         #Specifies the network layer Maximum Transmission Unit (MTU) value, in bytes, for an IP interface.
  2862.         #For IPv4 the minimum value is 576 bytes. For IPv6 the minimum is value is 1280 bytes.
  2863.         #For both IPv4 and IPv6, the maximum value is 2^32-1 (4294967295). You cannot set values outside these ranges.
  2864.         #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.
  2865.         $tb_NlMtu.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NlMtu
  2866.  
  2867.         #RetransmitTime (RetransmitTimeMs)
  2868.         #Specifies a value for timeout and retransmission, in milliseconds, for Neighbor Solicitation messages.
  2869.         #For more information, see RetransTimer in RFC 2461.
  2870.         #By default, the value is set to 1000.
  2871.         $tb_RetransmitTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand RetransmitTime
  2872.        
  2873.         $PathInterrupt = 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum'
  2874.         #$Global:EthernetClassGuid
  2875.         #$Global:EthernetPNPDeviceID
  2876.         $Global:NewPathInterrupt = "$PathInterrupt\$EthernetPNPDeviceID"
  2877.         $Test = Test-Path REGISTRY::$NewPathInterrupt
  2878.         if ($Test){
  2879.             $cb_MsiMode.Enabled = $True
  2880.             $cb_InterruptPriority.Enabled = $True
  2881.             $lb_MsiMode.Enabled = $True
  2882.             $lb_InterruptPriority.Enabled = $True
  2883.             $lb_DevicePolicy.Enabled = $True
  2884.             $cb_DevicePolicy.Enabled = $True
  2885.             $btn_InterruptApply.Enabled = $True
  2886.             $MsiModeRegistry = Get-ItemPropertyValue -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\MessageSignaledInterruptProperties" -Name "MSISupported"
  2887.             if($MsiModeRegistry -eq "1"){
  2888.                 $cb_MsiMode.Text = "Enabled"}
  2889.             if($MsiModeRegistry -eq "0"){
  2890.                 $cb_MsiMode.Text = "Disabled"}
  2891.            
  2892.             $DevicePriority = Get-ItemPropertyValue -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\Affinity Policy" -Name "DevicePriority"    
  2893.             $Global:DevicePriorityAvailable = ((Get-ItemProperty -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\Affinity Policy").PSObject.Properties.Name -contains "DevicePriority")
  2894.             if($DevicePriority -eq "0"){
  2895.                 $cb_InterruptPriority.Text = "Undefined"}
  2896.             if($DevicePriority -eq "1"){
  2897.                 $cb_InterruptPriority.Text = "Low"}
  2898.             if($DevicePriority -eq "2"){
  2899.                 $cb_InterruptPriority.Text = "Normal"}
  2900.             if($DevicePriority -eq "3"){
  2901.                 $cb_InterruptPriority.Text = "High"}
  2902.                
  2903.             $DevicePolicy = Get-ItemPropertyValue -Path "REGISTRY::$NewPathInterrupt\Device Parameters\Interrupt Management\Affinity Policy" -Name "DevicePolicy"        
  2904.             #Default Affinity policy, system dependent.
  2905.             if($DevicePolicy -eq "0" -or $DevicePolicy -eq $null){
  2906.                 $cb_DevicePolicy.Text = "MachineDefault"}
  2907.             #Target all processors located in same NUMA Node Device.
  2908.             if($DevicePolicy -eq "1"){
  2909.                 $cb_DevicePolicy.Text = "AllCloseProcessors"}
  2910.             #Target one processor located in same NUMA Node as Device.
  2911.             if($DevicePolicy -eq "2"){
  2912.                 $cb_DevicePolicy.Text = "OneCloseProcessor"}
  2913.             #Target all Processors in machine.
  2914.             if($DevicePolicy -eq "3"){
  2915.                 $cb_DevicePolicy.Text = "ProcessorsInMachine"}
  2916.             #Target processors specified in mask, use set Mask.
  2917.             if($DevicePolicy -eq "4"){
  2918.                 $cb_DevicePolicy.Text = "SpecifiedProcessors"}
  2919.             #Spread Message-Signaled-Interrupts to different processors, if possible.
  2920.             if($DevicePolicy -eq "5"){
  2921.                 $cb_DevicePolicy.Text = "SreadMessagesAcrossAllProcessors"}
  2922.             }
  2923. }
  2924.  
  2925. #AddRSSSupport
  2926. function RSSEnable{
  2927.     Write-Host "Enabling RSS Support for "$PhysicalAdapter.Name
  2928.     New-Item "$KeyPath\Ndi\Params\*RSS" -Force
  2929.        
  2930.     New-ItemProperty "$KeyPath\Ndi\Params\*RSS" -Name "ParamDesc" -PropertyTyp "String" -Value "Receive Side Scaling" -Force
  2931.     New-ItemProperty "$KeyPath\Ndi\Params\*RSS" -Name "default" -PropertyTyp "String" -Value "1" -Force
  2932.     New-ItemProperty "$KeyPath\Ndi\Params\*RSS" -Name "type" -PropertyTyp "String" -Value "enum" -Force
  2933.        
  2934.     New-Item "$KeyPath\Ndi\Params\*RSS\Enum" -Force
  2935.     New-ItemProperty "$KeyPath\Ndi\Params\*RSS\Enum" -Name "0" -PropertyTyp "String" -Value "Disabled" -Force
  2936.     New-ItemProperty "$KeyPath\Ndi\Params\*RSS\Enum" -Name "1" -PropertyTyp "String" -Value "Enabled" -Force
  2937. }
  2938.  
  2939.  
  2940.         function applyadvsettings {
  2941.         #cls
  2942.         #FlowControl
  2943.         if ($cb_flowcontrol.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*FlowControl")){
  2944.             Write-Host "FlowControl is same then Registry, skipping."  -ForegroundColor green}
  2945.  
  2946.             elseif ($cb_flowcontrol.SelectedIndex -eq '0'){
  2947.             Write-Host "Disabling FlowControl"  -ForegroundColor Green
  2948.             Set-ItemProperty -Path "$KeyPath" -Name "*FlowControl" -Value "0" -Force}
  2949.            
  2950.             elseif ($cb_flowcontrol.SelectedIndex -eq '1'){
  2951.             Write-Host "Enabling Tx for FlowControl" -ForegroundColor Green
  2952.             Set-ItemProperty -Path "$KeyPath" -Name "*FlowControl" -Value "1" -Force}
  2953.            
  2954.             elseif ($cb_flowcontrol.SelectedIndex -eq '2'){
  2955.             Write-Host "Enabling Rx for FlowControl" -ForegroundColor Green
  2956.             Set-ItemProperty -Path "$KeyPath" -Name "*FlowControl" -Value "2" -Force}
  2957.            
  2958.             elseif ($cb_flowcontrol.SelectedIndex -eq '3'){
  2959.             Write-Host "Enabling Tx & Rx for FlowControl" -ForegroundColor Green
  2960.             Set-ItemProperty -Path "$KeyPath" -Name "*FlowControl" -Value "3" -Force}
  2961.            
  2962.         #IPChecksumOffloadIPv4        
  2963.         if ($cb_IPChecksumOffloadIPv4.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*IPChecksumOffloadIPv4")){
  2964.             Write-Host "IPChecksumOffloadIPv4 is same then Registry, skipping."  -ForegroundColor green}
  2965.  
  2966.             elseif ($cb_IPChecksumOffloadIPv4.SelectedIndex -eq '0'){
  2967.             Write-Host "Disabling IPChecksumOffloadIPv4"  -ForegroundColor Green
  2968.             Set-ItemProperty -Path "$KeyPath" -Name "*IPChecksumOffloadIPv4" -Value "0" -Force}
  2969.            
  2970.             elseif ($cb_IPChecksumOffloadIPv4.SelectedIndex -eq '1'){
  2971.             Write-Host "Enabling Tx for IPChecksumOffloadIPv4" -ForegroundColor Green
  2972.             Set-ItemProperty -Path "$KeyPath" -Name "*IPChecksumOffloadIPv4" -Value "1" -Force}
  2973.            
  2974.             elseif ($cb_IPChecksumOffloadIPv4.SelectedIndex -eq '2'){
  2975.             Write-Host "Enabling Rx for IPChecksumOffloadIPv4" -ForegroundColor Green
  2976.             Set-ItemProperty -Path "$KeyPath" -Name "*IPChecksumOffloadIPv4" -Value "2" -Force}
  2977.            
  2978.             elseif ($cb_IPChecksumOffloadIPv4.SelectedIndex -eq '3'){
  2979.             Write-Host "Enabling Tx & Rx for IPChecksumOffloadIPv4" -ForegroundColor Green
  2980.             Set-ItemProperty -Path "$KeyPath" -Name "*IPChecksumOffloadIPv4" -Value "3" -Force}
  2981.            
  2982.         #TCPChecksumOffloadIPv4
  2983.         if ($cb_TCPChecksumOffloadIPv4.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv4")){
  2984.             Write-Host "TCPChecksumOffloadIPv4 is same then Registry, skipping."  -ForegroundColor green}
  2985.  
  2986.             elseif ($cb_TCPChecksumOffloadIPv4.SelectedIndex -eq '0'){
  2987.             Write-Host "Disabling TCPChecksumOffloadIPv4"  -ForegroundColor Green
  2988.             Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv4" -Value "0" -Force}
  2989.            
  2990.             elseif ($cb_TCPChecksumOffloadIPv4.SelectedIndex -eq '1'){
  2991.             Write-Host "Enabling Tx for TCPChecksumOffloadIPv4" -ForegroundColor Green
  2992.             Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv4" -Value "1" -Force}
  2993.            
  2994.             elseif ($cb_TCPChecksumOffloadIPv4.SelectedIndex -eq '2'){
  2995.             Write-Host "Enabling Rx for TCPChecksumOffloadIPv4" -ForegroundColor Green
  2996.             Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv4" -Value "2" -Force}
  2997.            
  2998.             elseif ($cb_TCPChecksumOffloadIPv4.SelectedIndex -eq '3'){
  2999.             Write-Host "Enabling Tx & Rx for TCPChecksumOffloadIPv4" -ForegroundColor Green
  3000.             Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv4" -Value "3" -Force}
  3001.            
  3002.         #TCPChecksumOffloadIPv6
  3003.         if ($cb_TCPChecksumOffloadIPv6.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv6")){
  3004.             Write-Host "TCPChecksumOffloadIPv6 is same then Registry, skipping."  -ForegroundColor green}
  3005.  
  3006.             elseif ($cb_TCPChecksumOffloadIPv6.SelectedIndex -eq '0'){
  3007.             Write-Host "Disabling TCPChecksumOffloadIPv6"  -ForegroundColor Green
  3008.             Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv6" -Value "0" -Force}
  3009.            
  3010.             elseif ($cb_TCPChecksumOffloadIPv6.SelectedIndex -eq '1'){
  3011.             Write-Host "Enabling Tx for TCPChecksumOffloadIPv6" -ForegroundColor Green
  3012.             Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv6" -Value "1" -Force}
  3013.            
  3014.             elseif ($cb_TCPChecksumOffloadIPv6.SelectedIndex -eq '2'){
  3015.             Write-Host "Enabling Rx for TCPChecksumOffloadIPv6" -ForegroundColor Green
  3016.             Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv6" -Value "2" -Force}
  3017.            
  3018.             elseif ($cb_TCPChecksumOffloadIPv6.SelectedIndex -eq '3'){
  3019.             Write-Host "Enabling Tx & Rx for TCPChecksumOffloadIPv6" -ForegroundColor Green
  3020.             Set-ItemProperty -Path "$KeyPath" -Name "*TCPChecksumOffloadIPv6" -Value "3" -Force}    
  3021.        
  3022.         #UDPChecksumOffloadIPv4
  3023.         if ($cb_UDPChecksumOffloadIPv4.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv4")){
  3024.             Write-Host "UDPChecksumOffloadIPv4 is same then Registry, skipping."  -ForegroundColor Green}
  3025.  
  3026.             elseif ($cb_UDPChecksumOffloadIPv4.SelectedIndex -eq '0'){
  3027.             Write-Host "Disabling UDPChecksumOffloadIPv4"  -ForegroundColor Green
  3028.             Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv4" -Value "0" -Force}
  3029.            
  3030.             elseif ($cb_UDPChecksumOffloadIPv4.SelectedIndex -eq '1'){
  3031.             Write-Host "Enabling Tx for UDPChecksumOffloadIPv4" -ForegroundColor Green
  3032.             Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv4" -Value "1" -Force}
  3033.            
  3034.             elseif ($cb_UDPChecksumOffloadIPv4.SelectedIndex -eq '2'){
  3035.             Write-Host "Enabling Rx for UDPChecksumOffloadIPv4" -ForegroundColor Green
  3036.             Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv4" -Value "2" -Force}
  3037.            
  3038.             elseif ($cb_UDPChecksumOffloadIPv4.SelectedIndex -eq '3'){
  3039.             Write-Host "Enabling Tx & Rx for UDPChecksumOffloadIPv4" -ForegroundColor Green
  3040.             Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv4" -Value "3" -Force}
  3041.        
  3042.         #UDPChecksumOffloadIPv6
  3043.         if ($cb_UDPChecksumOffloadIPv6.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv6")){
  3044.             Write-Host "UDPChecksumOffloadIPv6 is same then Registry, skipping."  -ForegroundColor Green}
  3045.  
  3046.             elseif ($cb_UDPChecksumOffloadIPv6.SelectedIndex -eq '0'){
  3047.             Write-Host "Disabling UDPChecksumOffloadIPv6"  -ForegroundColor Green
  3048.             Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv6" -Value "0" -Force}
  3049.            
  3050.             elseif ($cb_UDPChecksumOffloadIPv6.SelectedIndex -eq '1'){
  3051.             Write-Host "Enabling Tx for UDPChecksumOffloadIPv6" -ForegroundColor Green
  3052.             Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv6" -Value "1" -Force}
  3053.            
  3054.             elseif ($cb_UDPChecksumOffloadIPv6.SelectedIndex -eq '2'){
  3055.             Write-Host "Enabling Rx for UDPChecksumOffloadIPv6" -ForegroundColor Green
  3056.             Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv6" -Value "2" -Force}
  3057.            
  3058.             elseif ($cb_UDPChecksumOffloadIPv6.SelectedIndex -eq '3'){
  3059.             Write-Host "Enabling Tx & Rx for UDPChecksumOffloadIPv6" -ForegroundColor Green
  3060.             Set-ItemProperty -Path "$KeyPath" -Name "*UDPChecksumOffloadIPv6" -Value "3" -Force}
  3061.            
  3062.         #Large-Send-Offload V2 (IPv4)
  3063.         if ($cb_LsoV2IPv4.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*LsoV2IPv4")){
  3064.             Write-Host "LsoV2IPv4 is same then Registry, skipping."  -ForegroundColor green}    
  3065.            
  3066.             elseif ($cb_LsoV2IPv4.SelectedIndex -eq '0'){
  3067.             Write-Host "Disabling LsoV2IPv4"  -ForegroundColor Green
  3068.             Set-ItemProperty -Path "$KeyPath" -Name "*LsoV2IPv4" -Value "0" -Force}
  3069.            
  3070.             elseif ($cb_LsoV2IPv4.SelectedIndex -eq '1'){
  3071.             Write-Host "Enabling LsoV2IPv4" -ForegroundColor Green
  3072.             Set-ItemProperty -Path "$KeyPath" -Name "*LsoV2IPv4" -Value "1" -Force}
  3073.            
  3074.         #Large-Send-Offload V2 (IPv6)
  3075.         if ($cb_LsoV2IPv6.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*LsoV2IPv6")){
  3076.             Write-Host "LsoV2IPv6 is same then Registry, skipping."  -ForegroundColor green}    
  3077.            
  3078.             elseif ($cb_LsoV2IPv6.SelectedIndex -eq '0'){
  3079.             Write-Host "Disabling LsoV2IPv4"  -ForegroundColor Green
  3080.             Set-ItemProperty -Path "$KeyPath" -Name "*LsoV2IPv6" -Value "0" -Force}
  3081.            
  3082.             elseif ($cb_LsoV2IPv6.SelectedIndex -eq '1'){
  3083.             Write-Host "Enabling LsoV2IPv6" -ForegroundColor Green
  3084.             Set-ItemProperty -Path "$KeyPath" -Name "*LsoV2IPv6" -Value "1" -Force}
  3085.            
  3086.         #Large-Send-Offload V1 (IPv4)
  3087.         if ($cb_LsoV1IPv4.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*LsoV1IPv4")){
  3088.             Write-Host "LsoV1IPv4 is same then Registry, skipping."  -ForegroundColor green}    
  3089.            
  3090.             elseif ($cb_LsoV1IPv4.SelectedIndex -eq '0'){
  3091.             Write-Host "Disabling LsoV1IPv4"  -ForegroundColor Green
  3092.             Set-ItemProperty -Path "$KeyPath" -Name "*LsoV1IPv4" -Value "0" -Force}
  3093.            
  3094.             elseif ($cb_LsoV1IPv4.SelectedIndex -eq '1'){
  3095.             Write-Host "Enabling LsoV1IPv4" -ForegroundColor Green
  3096.             Set-ItemProperty -Path "$KeyPath" -Name "*LsoV1IPv4" -Value "1" -Force}              
  3097.            
  3098.         #PMARPOffload
  3099.         if ($cb_PMARPOffload.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PMARPOffload")){
  3100.             Write-Host "PMARPOffload is same then Registry, skipping."  -ForegroundColor green}    
  3101.            
  3102.             elseif ($cb_PMARPOffload.SelectedIndex -eq '0'){
  3103.             Write-Host "Disabling PMARPOffload"  -ForegroundColor Green
  3104.             Set-ItemProperty -Path "$KeyPath" -Name "*PMARPOffload" -Value "0" -Force}
  3105.            
  3106.             elseif ($cb_PMARPOffload.SelectedIndex -eq '1'){
  3107.             Write-Host "Enabling PMARPOffload" -ForegroundColor Green
  3108.             Set-ItemProperty -Path "$KeyPath" -Name "*PMARPOffload" -Value "1" -Force}
  3109.            
  3110.         #PMNSOffload
  3111.         if ($cb_PMNSOffload.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PMNSOffload")){
  3112.             Write-Host "PMNSOffload is same then Registry, skipping."  -ForegroundColor green}    
  3113.            
  3114.             elseif ($cb_PMNSOffload.SelectedIndex -eq '0'){
  3115.             Write-Host "Disabling PMNSOffload"  -ForegroundColor Green
  3116.             Set-ItemProperty -Path "$KeyPath" -Name "*PMNSOffload" -Value "0" -Force}
  3117.            
  3118.             elseif ($cb_PMNSOffload.SelectedIndex -eq '1'){
  3119.             Write-Host "Enabling PMNSOffload" -ForegroundColor Green
  3120.             Set-ItemProperty -Path "$KeyPath" -Name "*PMNSOffload" -Value "1" -Force}
  3121.            
  3122.         #PriorityVLANTag  
  3123.         if ($cb_PriorityVLANTag.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*PriorityVLANTag")){
  3124.             Write-Host "PriorityVLANTag is same then Registry, skipping."  -ForegroundColor Green}    
  3125.            
  3126.             elseif ($cb_PriorityVLANTag.SelectedIndex -eq '0'){
  3127.             Write-Host "Disabling PriorityVLANTag"  -ForegroundColor Green
  3128.             Set-ItemProperty -Path "$KeyPath" -Name "*PriorityVLANTag" -Value "0" -Force}
  3129.            
  3130.             elseif ($cb_PriorityVLANTag.SelectedIndex -eq '1'){
  3131.             Write-Host "Enabling Paketpriorität" -ForegroundColor Green
  3132.             Set-ItemProperty -Path "$KeyPath" -Name "*PriorityVLANTag" -Value "1" -Force}
  3133.            
  3134.             elseif ($cb_PriorityVLANTag.SelectedIndex -eq '2'){
  3135.             Write-Host "Enabling VLAN" -ForegroundColor Green
  3136.             Set-ItemProperty -Path "$KeyPath" -Name "*PriorityVLANTag" -Value "2" -Force}
  3137.            
  3138.             elseif ($cb_PriorityVLANTag.SelectedIndex -eq '3'){
  3139.             Write-Host "Enabling Paketpriorität and VLAN" -ForegroundColor Green
  3140.             Set-ItemProperty -Path "$KeyPath" -Name "*PriorityVLANTag" -Value "3" -Force}
  3141.            
  3142.         #ReceiveBuffers  
  3143.         if ($cb_ReceiveBuffers.Text -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*ReceiveBuffers"))
  3144.             {
  3145.             Write-Host "ReceiveBuffers is same then Registry, skipping."  -ForegroundColor Green
  3146.             }    
  3147.             else
  3148.             {
  3149.             Write-Host "Set ReceiveBuffers to $($cb_ReceiveBuffers.Text)"  -ForegroundColor Green
  3150.             Set-ItemProperty -Path "$KeyPath" -Name "*ReceiveBuffers" -Value "$($cb_ReceiveBuffers.Text)" -Force
  3151.             }
  3152.            
  3153.         #TransmitBuffers  
  3154.         if ($cb_TransmitBuffers.Text -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*TransmitBuffers"))
  3155.             {
  3156.             Write-Host "TransmitBuffers is same then Registry, skipping."  -ForegroundColor Green
  3157.             }    
  3158.             else
  3159.             {
  3160.             Write-Host "Set TransmitBuffers to $($cb_TransmitBuffers.Text)"  -ForegroundColor Green
  3161.             Set-ItemProperty -Path "$KeyPath" -Name "*TransmitBuffers" -Value "$($cb_TransmitBuffers.Text)" -Force
  3162.             }  
  3163.            
  3164.         #InterruptModeration
  3165.         if ($cb_InterruptModeration.SelectedIndex -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "*InterruptModeration")){
  3166.             Write-Host "InterruptModeration is same then Registry, skipping."  -ForegroundColor Green}
  3167.  
  3168.             elseif ($cb_InterruptModeration.SelectedIndex -eq '0'){
  3169.             Write-Host "Disabling InterruptModeration"  -ForegroundColor Green
  3170.             Set-ItemProperty -Path "$KeyPath" -Name "*InterruptModeration" -Value "0" -Force}
  3171.            
  3172.             elseif ($cb_InterruptModeration.SelectedIndex -eq '1'){
  3173.             Write-Host "Enabling InterruptModeration" -ForegroundColor Green
  3174.             Set-ItemProperty -Path "$KeyPath" -Name "*InterruptModeration" -Value "1" -Force}    
  3175.        
  3176.         #InterruptModerationRate
  3177.         #$RegITR = (Get-ItemPropertyValue -Path "$KeyPath" -Name "ITR")
  3178.         #if ($cb_InterruptModerationRate.Text -eq $RegITR -xor $cb_InterruptModerationRate.SelectedIndex >0){
  3179.             #Write-Host "InterruptModerationRate is same then Registry, skipping."  -ForegroundColor green}
  3180.            
  3181.             if ($cb_InterruptModerationRate.Text -match 'Disabled'){
  3182.             #Write-Host "Disabling InterruptModeration"  -ForegroundColor Green
  3183.             Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "0" -Force}
  3184.            
  3185.             elseif ($cb_InterruptModerationRate.Text -match 'Minimal'){
  3186.             #Write-Host "Setting InterruptModerationRate to 200 - Minimal" -ForegroundColor Green
  3187.             Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "200" -Force}        
  3188.            
  3189.             elseif ($cb_InterruptModerationRate.Text -match 'Low'){
  3190.             #Write-Host "Setting InterruptModerationRate to 400 - Low" -ForegroundColor Green
  3191.             Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "400" -Force}  
  3192.            
  3193.             elseif ($cb_InterruptModerationRate.Text -match 'Medium'){
  3194.             #Write-Host "Setting InterruptModerationRate to 950 - Medium" -ForegroundColor Green
  3195.             Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "950" -Force}  
  3196.            
  3197.             elseif ($cb_InterruptModerationRate.Text -match 'High'){
  3198.             #Write-Host "Setting InterruptModerationRate to 2000 - High" -ForegroundColor Green
  3199.             Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "2000" -Force}  
  3200.            
  3201.             elseif ($cb_InterruptModerationRate.Text -match 'Extreme'){
  3202.             #Write-Host "Setting InterruptModerationRate to 3600 - Extreme" -ForegroundColor Green
  3203.             Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "3600" -Force}  
  3204.            
  3205.             elseif ($cb_InterruptModerationRate.Text -match 'Adaptive'){
  3206.             #Write-Host "Setting InterruptModerationRate to 65535 - Adaptive" -ForegroundColor Green
  3207.             Set-ItemProperty -Path "$KeyPath" -Name "ITR" -Value "65535" -Force}  
  3208.             #For applications where low latency is critical, this setting should be approximately 8000 interrupts per second.
  3209.            
  3210.            
  3211.            
  3212.            
  3213.             #TxIntDelay
  3214.             #I-219V 28TxDelay Default
  3215.             if ($tb_TxIntDelay.Text -eq (Get-ItemPropertyValue -Path "$KeyPath" -Name "TxIntDelay"))
  3216.             {
  3217.             Write-Host "TxIntDelay is same then Registry, skipping."  -ForegroundColor Green
  3218.             }    
  3219.             else
  3220.             {
  3221.             Write-Host "Set TxIntDelay to"$tb_TxIntDelay.Text  -ForegroundColor Green
  3222.             Set-ItemProperty -Path "$KeyPath" -Name "TxIntDelay" -Value $tb_TxIntDelay.Text -Force
  3223.             }
  3224.             #PacketDirect
  3225.             #Unsure Default Enabled or Disabled
  3226.             #Ref:https://docs.microsoft.com/en-us/windows-hardware/drivers/network/introduction-to-ndis-pdpi
  3227.             if ($cb_PacketDirect.Text -match 'Undefined'){
  3228.                 #Write-Host "PacketDirect to"$cb_PacketDirect.Text  -ForegroundColor Green
  3229.                 Remove-ItemProperty -Path "$KeyPath" -Name "*PacketDirect" -Force}  
  3230.             if ($cb_PacketDirect.Text -match 'Enabled'){
  3231.                 Write-Host "PacketDirect to"$cb_PacketDirect.Text  -ForegroundColor Green
  3232.                 New-ItemProperty -Path "$KeyPath" -Name "*PacketDirect" -Value "1" -PropertyType "String" -Force}  
  3233.             if ($cb_PacketDirect.Text -match 'Disabled'){
  3234.                 Write-Host "PacketDirect to"$cb_PacketDirect.Text  -ForegroundColor Green
  3235.                 New-ItemProperty -Path "$KeyPath" -Name "*PacketDirect" -Value "0" -PropertyType "String" -Force}
  3236.                
  3237.             #EnableCoalesce
  3238.             if ($cb_EnableCoalesce.Text -match 'Undefined'){
  3239.                 #Write-Host "EnableCoalesce to"$cb_EnableCoalesce.Text  -ForegroundColor Green
  3240.                 Remove-ItemProperty -Path "$KeyPath" -Name "EnableCoalesce" -Force}  
  3241.             if ($cb_EnableCoalesce.Text -match 'Enabled'){
  3242.                 Write-Host "EnableCoalesce to"$cb_EnableCoalesce.Text  -ForegroundColor Green
  3243.                 New-ItemProperty -Path "$KeyPath" -Name "EnableCoalesce" -Value "1" -PropertyType "DWORD" -Force}  
  3244.             if ($cb_EnableCoalesce.Text -match 'Disabled'){
  3245.                 Write-Host "EnableCoalesce to"$cb_EnableCoalesce.Text  -ForegroundColor Green
  3246.                 New-ItemProperty -Path "$KeyPath" -Name "EnableCoalesce" -Value "0" -PropertyType "DWORD" -Force}
  3247.            
  3248.             #CoalesceBufferSize
  3249.             $A=((Get-ItemProperty -Path "$KeyPath").PSObject.Properties.Name -contains "CoalesceBufferSize")
  3250.             if ($A -eq $false -and $cb_CoalesceBufferSize.Text -ne $null -and $cb_CoalesceBufferSize.Text -ne '2048' ){
  3251.                 Write-Host "Set CoalesceBufferSize to"$cb_CoalesceBufferSize.Text -ForegroundColor Green
  3252.                 New-ItemProperty -Path "$KeyPath" -Name "CoalesceBufferSize" -Typ "Dword" -Value $cb_CoalesceBufferSize.Text -Force
  3253.             }elseif($A -eq $true -and $cb_CoalesceBufferSize.Text -eq $null -or $cb_CoalesceBufferSize.Text -eq ''){
  3254.                 Write-Warning "Removing CoalesceBufferSize"
  3255.                 Remove-ItemProperty -Path "$KeyPath" -Name "CoalesceBufferSize"
  3256.             }else{
  3257.                 Write-Host "Set CoalesceBufferSize to"$cb_CoalesceBufferSize.Text -ForegroundColor Green
  3258.                 Set-ItemProperty -Path "$KeyPath" -Name "CoalesceBufferSize" -Value $cb_CoalesceBufferSize.Text -Force 
  3259.             }
  3260.            
  3261.             #EnableUdpTxScaling
  3262.             if ($cb_EnableUdpTxScaling.Text -match 'Undefined'){
  3263.                 #Write-Host "EnableUdpTxScaling to"$cb_EnableUdpTxScaling.Text  -ForegroundColor Green
  3264.                 Remove-ItemProperty -Path "$KeyPath" -Name "EnableUdpTxScaling" -Force}  
  3265.             if ($cb_EnableUdpTxScaling.Text -match 'Enabled'){
  3266.                 Write-Host "EnableUdpTxScaling to"$cb_EnableUdpTxScaling.Text  -ForegroundColor Green
  3267.                 New-ItemProperty -Path "$KeyPath" -Name "EnableUdpTxScaling" -Value "1" -PropertyType "DWORD" -Force}  
  3268.             if ($cb_EnableUdpTxScaling.Text -match 'Disabled'){
  3269.                 Write-Host "EnableUdpTxScaling to"$cb_EnableUdpTxScaling.Text  -ForegroundColor Green
  3270.                 New-ItemProperty -Path "$KeyPath" -Name "EnableUdpTxScaling" -Value "0" -PropertyType "DWORD" -Force}
  3271.                
  3272. }
  3273.  
  3274.         function applypowersavingsettings {
  3275.             #cls
  3276.             # ========================================================
  3277.             # PowerSettings
  3278.  
  3279.             #EnablePME
  3280.             # Enables/disables wake-up from Advanced Power Management (APM) sleep states.
  3281.             if ($cb_EnablePME.SelectedIndex -eq '0'){
  3282.             Write-Host "Disabling (APM) sleep states"  -ForegroundColor Green
  3283.             New-ItemProperty -Path "$KeyPath" -Name "EnablePME" -PropertyType DWORD -Value "0" -Force}
  3284.             if ($cb_EnablePME.SelectedIndex -eq '1'){
  3285.             Write-Host "Enabling (APM) sleep states" -ForegroundColor Green
  3286.             New-ItemProperty -Path "$KeyPath" -Name "EnablePME" -PropertyType DWORD -Value "1" -Force}
  3287.             if ($cb_EnablePME.SelectedIndex -eq '2'){
  3288.             Write-Host "Skipping (APM) sleep states"  -ForegroundColor Green}
  3289.            
  3290.             #EnableDynamicPowerGating
  3291.             if ($cb_EnableDynamicPowerGating.SelectedIndex -eq '0'){
  3292.             Write-Host "Disabling DynamicPowerGating"  -ForegroundColor Green
  3293.             New-ItemProperty -Path "$KeyPath" -Name "*EnableDynamicPowerGating" -PropertyType String -Value "0" -Force}
  3294.             if ($cb_EnableDynamicPowerGating.SelectedIndex -eq '1'){
  3295.             Write-Host "Enabling DynamicPowerGating" -ForegroundColor Green
  3296.             New-ItemProperty -Path "$KeyPath" -Name "*EnableDynamicPowerGating" -PropertyType String -Value "1" -Force}
  3297.             if ($cb_EnableDynamicPowerGating.SelectedIndex -eq '2'){
  3298.             Write-Host "Skipping DynamicPowerGating" -ForegroundColor Green}
  3299.  
  3300.             #EnableConnectedPowerGating
  3301.             if ($cb_EnableConnectedPowerGating.SelectedIndex -eq '0'){
  3302.             Write-Host "Disabling ConnectedPowerGating"  -ForegroundColor Green
  3303.             New-ItemProperty -Path "$KeyPath" -Name "EnableConnectedPowerGating" -PropertyType DWORD -Value "0" -Force}
  3304.             if ($cb_EnableConnectedPowerGating.SelectedIndex -eq '1'){
  3305.             Write-Host "Enabling ConnectedPowerGating" -ForegroundColor Green
  3306.             New-ItemProperty -Path "$KeyPath" -Name "EnableConnectedPowerGating" -PropertyType DWORD -Value "1" -Force}
  3307.             if ($cb_EnableConnectedPowerGating.SelectedIndex -eq '2'){
  3308.             Write-Host "Skipping ConnectedPowerGating" -ForegroundColor Green}
  3309.            
  3310.             #AutoPowerSaveModeEnabled
  3311.             if ($cb_AutoPowerSaveModeEnabled.SelectedIndex -eq '0'){
  3312.             Write-Host "Disabling AutoPowerSaveMode"  -ForegroundColor Green
  3313.             New-ItemProperty -Path "$KeyPath" -Name "AutoPowerSaveModeEnabled" -PropertyType DWORD -Value "0" -Force}
  3314.             if ($cb_AutoPowerSaveModeEnabled.SelectedIndex -eq '1'){
  3315.             Write-Host "Enabling AutoPowerSaveMode" -ForegroundColor Green
  3316.             New-ItemProperty -Path "$KeyPath" -Name "AutoPowerSaveModeEnabled" -PropertyType DWORD -Value "1" -Force}
  3317.             if ($cb_AutoPowerSaveModeEnabled.SelectedIndex -eq '2'){
  3318.             Write-Host "Skipping AutoPowerSaveMode" -ForegroundColor Green}
  3319.            
  3320.             #NicAutoPowerSaver
  3321.             if ($cb_NicAutoPowerSaver.SelectedIndex -eq '0'){
  3322.             Write-Host "Disabling NicAutoPowerSaver"  -ForegroundColor Green
  3323.             New-ItemProperty -Path "$KeyPath" -Name "*NicAutoPowerSaver" -PropertyType String -Value "0" -Force}
  3324.             if ($cb_NicAutoPowerSaver.SelectedIndex -eq '1'){
  3325.             Write-Host "Enabling NicAutoPowerSaver" -ForegroundColor Green
  3326.             New-ItemProperty -Path "$KeyPath" -Name "*NicAutoPowerSaver" -PropertyType String -Value "1" -Force}
  3327.             if ($cb_NicAutoPowerSaver.SelectedIndex -eq '2'){
  3328.             Write-Host "Skipping NicAutoPowerSaver" -ForegroundColor Green}
  3329.            
  3330.             #DisableDelayedPowerUp
  3331.             if ($cb_DisableDelayedPowerUp.SelectedIndex -eq '0'){
  3332.             Write-Host "Enabling DelayedPowerUp" -ForegroundColor Green
  3333.             New-ItemProperty -Path "$KeyPath" -Name "DisableDelayedPowerUp" -PropertyType DWORD -Value "0" -Force}
  3334.             if ($cb_DisableDelayedPowerUp.SelectedIndex -eq '1'){
  3335.             Write-Host "Disabling DelayedPowerUp"  -ForegroundColor Green
  3336.             New-ItemProperty -Path "$KeyPath" -Name "DisableDelayedPowerUp" -PropertyType DWORD -Value "1" -Force}
  3337.             if ($cb_DisableDelayedPowerUp.SelectedIndex -eq '2'){
  3338.             Write-Host "Skipping DelayedPowerUp" -ForegroundColor Green}
  3339.            
  3340.             #ReduceSpeedOnPowerDown
  3341.             if ($cb_ReduceSpeedOnPowerDown.SelectedIndex -eq '0'){
  3342.             Write-Host "Disabling ReduceSpeedOnPowerDown" -ForegroundColor Green
  3343.             New-ItemProperty -Path "$KeyPath" -Name "ReduceSpeedOnPowerDown" -PropertyType DWORD -Value "0" -Force}
  3344.             if ($cb_ReduceSpeedOnPowerDown.SelectedIndex -eq '1'){
  3345.             Write-Host "Enabling ReduceSpeedOnPowerDown"  -ForegroundColor Green
  3346.             New-ItemProperty -Path "$KeyPath" -Name "ReduceSpeedOnPowerDown" -PropertyType DWORD -Value "1" -Force}
  3347.             if ($cb_ReduceSpeedOnPowerDown.SelectedIndex -eq '2'){
  3348.             Write-Host "Skipping ReduceSpeedOnPowerDown" -ForegroundColor Green}
  3349.            
  3350.            
  3351.         }
  3352.  
  3353.         #Adding more then Default RSSQueues
  3354.         function RSSQueuesUnlock{
  3355.         $NumRssQueues1 = Test-Path -Path "$KeyPath\Ndi\Params\*NumRssQueues"
  3356.         $NumRssQueues2 = Test-Path -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum"
  3357.         $AdapterQueuesOriginal = Get-ItemProperty "$KeyPath\Ndi\Params\*NumRssQueues" -Name "default" | select -expand default
  3358.        
  3359.        
  3360.         #If($NumRssQueues1 -eq $False){
  3361.             New-Item -Path "$KeyPath\Ndi\Params\*NumRssQueues" -Force
  3362.             New-ItemProperty "$KeyPath\Ndi\Params\*NumRssQueues" -Name "ParamDesc" -PropertyTyp "String" -Value "Maximum Number of RSS Queues" -Force
  3363.             New-ItemProperty "$KeyPath\Ndi\Params\*NumRssQueues" -Name "default" -PropertyTyp "String" -Value $AdapterQueuesOriginal -Force
  3364.             New-ItemProperty "$KeyPath\Ndi\Params\*NumRssQueues" -Name "type" -PropertyTyp "String" -Value "enum" -Force
  3365.         #}
  3366.         #If($NumRssQueues2 -eq $False){
  3367.             New-Item -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Force
  3368.             New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "1" -PropertyType STRING -Value "1 Queue" -Force
  3369.             New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "2" -PropertyType STRING -Value "2 Queues" -Force
  3370.             New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "3" -PropertyType STRING -Value "3 Queues" -Force
  3371.             New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "4" -PropertyType STRING -Value "4 Queues" -Force
  3372.             New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "5" -PropertyType STRING -Value "5 Queues" -Force
  3373.             New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "6" -PropertyType STRING -Value "6 Queues" -Force
  3374.             New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "7" -PropertyType STRING -Value "7 Queues" -Force
  3375.             New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "8" -PropertyType STRING -Value "8 Queues" -Force
  3376.             New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "9" -PropertyType STRING -Value "9 Queues" -Force
  3377.             New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "10" -PropertyType STRING -Value "10 Queues" -Force
  3378.             New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "11" -PropertyType STRING -Value "11 Queues" -Force
  3379.             New-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" -Name "12" -PropertyType STRING -Value "12 Queues" -Force
  3380.         #}  
  3381.         $cb_rssqueues.Items.Clear()
  3382.         $AdapterQueuesDefault = Get-ItemProperty "$KeyPath\Ndi\Params\*NumRssQueues" -Name "default" | select -expand default
  3383.         #Query Avaible RSSQueues
  3384.         $AdapterQueues = Get-Item -Path "$KeyPath\Ndi\Params\*NumRssQueues\Enum" | Select -ExpandProperty Property
  3385.         @($AdapterQueues) | ForEach-Object {[void] $cb_rssqueues.Items.Add($_)}
  3386.         $cb_rssqueues.Text = $AdapterQueuesDefault
  3387.         #$btn_unqueues.Enabled = $False
  3388.         }
  3389.  
  3390.  
  3391. $cb_AdapterNamesCombo.Add_SelectedValueChanged({ a; NetIPInterface })
  3392.  
  3393. function adapter_restart {
  3394.     Try {
  3395.     Restart-NetAdapter -InterfaceDescription $NIC_Desc
  3396.     Write-Host "Restarting Adapter $NIC_Desc now!" -ForegroundColor Red
  3397.     }
  3398.     catch{
  3399.         Write-Host "No Adapter selected." -ForegroundColor Red
  3400.         }
  3401. }
  3402.  
  3403. # Open RegPath Adapter per Button
  3404.  
  3405. function btn_regopadap {
  3406.         Try {
  3407.         $regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit"
  3408.         $name = "LastKey"
  3409.         $value = "Computer\"+(Convert-Path ($Global:KeyPath))
  3410.                 New-ItemProperty -Path $regPath -Name $name -Value $value -PropertyType String -Force | Out-Null
  3411.                 Start-Process RegEdit
  3412.             }
  3413.             catch
  3414.             {
  3415.                 Write-Host "No Adapter selected." -ForegroundColor Red
  3416.             }
  3417. }
  3418.  
  3419. function Interrupt{
  3420.     $Path = 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum'
  3421.     #$Global:EthernetClassGuid
  3422.     #$Global:EthernetPNPDeviceID
  3423.     $NewPath = "$Path\$EthernetPNPDeviceID"
  3424.     $Test = Test-Path REGISTRY::$NewPath
  3425.     if ($Test){
  3426.    
  3427.     }else{
  3428.     Write-Warning "GPU not found. Abort"
  3429.     }
  3430. }
  3431.  
  3432. function bypassrssqueues{
  3433.     $error.clear()
  3434.     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
  3435.          } catch { Write-Warning "Error occured while Setting Set-NetAdapterRss, Abort." }
  3436.     if (!$error) { Write-Host 'No Error Occured, while Setting Set-NetAdapterRss without NumberOfReceiveQueues. Continue.'
  3437.                     Write-Host "Using Registry now, to set RSS Queues to $($cb_rssqueues.Text)"
  3438.                     Set-ItemProperty -Path "$KeyPath\Ndi\Params\*NumRssQueues" -Name "default" -Value $cb_rssqueues.Text -Force -ErrorAction "Stop"
  3439.                     Write-Host "Done."
  3440.         }
  3441. }
  3442. function applyrsssettings {
  3443.        
  3444.         #DisablePortScaling
  3445.         if ($cb_DisablePortScaling.SelectedIndex -eq '0'){
  3446.         Write-Host "Disabling DisablePortScaling" -ForegroundColor Green
  3447.         New-ItemProperty -Path "$KeyPath" -Name "DisablePortScaling" -PropertyType DWORD -Value "0" -Force}
  3448.         if ($cb_DisablePortScaling.SelectedIndex -eq '1'){
  3449.         Write-Host "Enabling DisablePortScaling"  -ForegroundColor Green
  3450.         New-ItemProperty -Path "$KeyPath" -Name "DisablePortScaling" -PropertyType DWORD -Value "1" -Force}
  3451.         if ($cb_DisablePortScaling.SelectedIndex -eq '2'){
  3452.         Write-Host "Skipping DisablePortScaling"  -ForegroundColor Green}
  3453.        
  3454.         #ManyCoreScaling
  3455.         if ($cb_ManyCoreScaling.SelectedIndex -eq '0'){
  3456.         Write-Host "Disabling ManyCoreScaling" -ForegroundColor Green
  3457.         New-ItemProperty -Path "$KeyPath" -Name "ManyCoreScaling" -PropertyType DWORD -Value "0" -Force}
  3458.         if ($cb_ManyCoreScaling.SelectedIndex -eq '1'){
  3459.         Write-Host "Enabling ManyCoreScaling"  -ForegroundColor Green
  3460.         New-ItemProperty -Path "$KeyPath" -Name "ManyCoreScaling" -PropertyType DWORD -Value "1" -Force}
  3461.         if ($cb_ManyCoreScaling.SelectedIndex -eq '2'){
  3462.         Write-Host "Skipping ManyCoreScaling"  -ForegroundColor Green}
  3463.        
  3464.         #Write-Host "Testing Setting RSS"
  3465.         $error.clear()
  3466.         try {
  3467.             #Write-Host "Using Powersh. now to set rss"
  3468.             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
  3469.             Write-Host "Using Powershell to Set-NetAdapterRss."
  3470.             }
  3471.             catch { Write-Warning "Error occured while Setting Set-NetAdapterRss, testing now without NumberOfReceiveQueues!"
  3472.             bypassrssqueues
  3473.             }
  3474.         #if (!$error) { Write-Host "No Error Occured, while Setting Set-NetAdapterRss with NumberOfReceiveQueues." }
  3475.        
  3476.         #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)
  3477. }
  3478.  
  3479. function ApplyInterfaceSettings{
  3480.     if ($cb_AdvertiseDefaultRoute.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand AdvertiseDefaultRoute)){
  3481.         Write-Host "AdvertiseDefaultRoute is same, skipping."  -ForegroundColor green}
  3482.         else{
  3483.             Write-Host "AdvertiseDefaultRoute:"$cb_AdvertiseDefaultRoute.Text  -ForegroundColor Green
  3484.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -AdvertiseDefaultRoute $cb_AdvertiseDefaultRoute.Text
  3485.         }
  3486.     if ($cb_Advertising.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Advertising)){
  3487.         Write-Host "Advertising is same, skipping."  -ForegroundColor green}
  3488.         else{
  3489.             Write-Host "Advertising:"$cb_Advertising.Text  -ForegroundColor Green
  3490.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -Advertising $cb_Advertising.Text
  3491.         }
  3492.     if ($cb_AutomaticMetric.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand AutomaticMetric)){
  3493.         Write-Host "AutomaticMetric is same, skipping."  -ForegroundColor green}
  3494.         else{
  3495.             Write-Host "AutomaticMetric:"$cb_AutomaticMetric.Text  -ForegroundColor Green
  3496.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -AutomaticMetric $cb_AutomaticMetric.Text
  3497.         }
  3498.     if ($cb_ClampMss.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ClampMss)){
  3499.         Write-Host "ClampMss is same, skipping."  -ForegroundColor green}
  3500.         else{
  3501.             Write-Host "ClampMss:"$cb_ClampMss.Text  -ForegroundColor Green
  3502.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -ClampMss $cb_ClampMss.Text
  3503.         }
  3504.     if ($DirectedMacWolPattern.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DirectedMacWolPattern)){
  3505.         Write-Host "DirectedMacWolPattern is same, skipping."  -ForegroundColor green}
  3506.         else{
  3507.             Write-Host "DirectedMacWolPattern:"$DirectedMacWolPattern.Text  -ForegroundColor Green
  3508.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -DirectedMacWolPattern $DirectedMacWolPattern.Text
  3509.         }
  3510.     if ($cb_EcnMarking.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand EcnMarking)){
  3511.         Write-Host "EcnMarking is same, skipping."  -ForegroundColor green}
  3512.         else{
  3513.             Write-Host "EcnMarking:"$cb_EcnMarking.Text  -ForegroundColor Green
  3514.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -EcnMarking $cb_EcnMarking.Text
  3515.         }
  3516.     if ($cb_ForceArpNdWolPattern.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ForceArpNdWolPattern)){
  3517.         Write-Host "ForceArpNdWolPattern is same, skipping."  -ForegroundColor green}
  3518.         else{
  3519.             Write-Host "ForceArpNdWolPattern:"$cb_ForceArpNdWolPattern.Text  -ForegroundColor Green
  3520.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -ForceArpNdWolPattern $cb_ForceArpNdWolPattern.Text
  3521.         }
  3522.     if ($cb_Forwarding.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Forwarding)){
  3523.         Write-Host "Forwarding is same, skipping."  -ForegroundColor green}
  3524.         else{
  3525.             Write-Host "Forwarding:"$cb_Forwarding.Text  -ForegroundColor Green
  3526.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -Forwarding $cb_Forwarding.Text
  3527.         }
  3528.     if ($cb_IgnoreDefaultRoutes.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand IgnoreDefaultRoutes)){
  3529.         Write-Host "IgnoreDefaultRoutes is same, skipping."  -ForegroundColor green}
  3530.         else{
  3531.             Write-Host "IgnoreDefaultRoutes:"$cb_IgnoreDefaultRoutes.Text  -ForegroundColor Green
  3532.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -IgnoreDefaultRoutes $cb_IgnoreDefaultRoutes.Text
  3533.         }
  3534.     if ($cb_ManagedAddressConfiguration.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ManagedAddressConfiguration)){
  3535.         Write-Host "ManagedAddressConfiguration is same, skipping."  -ForegroundColor green}
  3536.         else{
  3537.             Write-Host "ManagedAddressConfiguration:"$cb_ManagedAddressConfiguration.Text  -ForegroundColor Green
  3538.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -ManagedAddressConfiguration $cb_ManagedAddressConfiguration.Text
  3539.         }
  3540.     if ($cb_NeighborDiscoverySupported.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NeighborDiscoverySupported)){
  3541.         Write-Host "NeighborDiscoverySupported is same, skipping."  -ForegroundColor green}
  3542.         else{
  3543.             Write-Host "NeighborDiscoverySupported:"$cb_NeighborDiscoverySupported.Text  -ForegroundColor Green
  3544.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -NeighborDiscoverySupported $cb_NeighborDiscoverySupported.Text
  3545.         }
  3546.     if ($cb_NeighborUnreachabilityDetection.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NeighborUnreachabilityDetection)){
  3547.         Write-Host "NeighborUnreachabilityDetection is same, skipping."  -ForegroundColor green}
  3548.         else{
  3549.             Write-Host "NeighborUnreachabilityDetection:"$cb_NeighborUnreachabilityDetection.Text  -ForegroundColor Green
  3550.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -NeighborUnreachabilityDetection $cb_NeighborUnreachabilityDetection.Text
  3551.         }
  3552.     if ($cb_OtherStatefulConfiguration.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand OtherStatefulConfiguration)){
  3553.         Write-Host "OtherStatefulConfiguration is same, skipping."  -ForegroundColor green}
  3554.         else{
  3555.             Write-Host "OtherStatefulConfiguration:"$cb_OtherStatefulConfiguration.Text  -ForegroundColor Green
  3556.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -OtherStatefulConfiguration $cb_OtherStatefulConfiguration.Text
  3557.         }
  3558.     if ($cb_RouterDiscovery.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand RouterDiscovery)){
  3559.         Write-Host "RouterDiscovery is same, skipping."  -ForegroundColor green}
  3560.         else{
  3561.             Write-Host "RouterDiscovery:"$cb_RouterDiscovery.Text  -ForegroundColor Green
  3562.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -RouterDiscovery $cb_RouterDiscovery.Text
  3563.         }
  3564.     if ($cb_Store.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Store)){
  3565.         Write-Host "Store is same, skipping."  -ForegroundColor green}
  3566.         else{
  3567.             Write-Host "Store:"$cb_Store.Text  -ForegroundColor Green
  3568.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -Store $cb_Store.Text
  3569.         }
  3570.     if ($cb_WeakHostReceive.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand WeakHostReceive)){
  3571.         Write-Host "WeakHostReceive is same, skipping."  -ForegroundColor green}
  3572.         else{
  3573.             Write-Host "WeakHostReceive:"$cb_WeakHostReceive.Text  -ForegroundColor Green
  3574.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -Store $cb_WeakHostReceive.Text
  3575.         }
  3576.     if ($cb_WeakHostSend.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand WeakHostSend)){
  3577.         Write-Host "WeakHostSend is same, skipping."  -ForegroundColor green}
  3578.         else{
  3579.             Write-Host "WeakHostSend:"$cb_WeakHostSend.Text  -ForegroundColor Green
  3580.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -Store $cb_WeakHostSend.Text
  3581.         }
  3582.     if ($tb_CurrentHopLimit.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand CurrentHopLimit)){
  3583.         Write-Host "CurrentHopLimit is same, skipping."  -ForegroundColor green}
  3584.         else{
  3585.             Write-Host "CurrentHopLimit:"$tb_CurrentHopLimit.Text  -ForegroundColor Green
  3586.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -CurrentHopLimit $tb_CurrentHopLimit.Text
  3587.         }
  3588.     if ($tb_BaseReachableTime.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand BaseReachableTime)){
  3589.         Write-Host "BaseReachableTime is same, skipping."  -ForegroundColor green}
  3590.         else{
  3591.             Write-Host "BaseReachableTime:"$tb_BaseReachableTime.Text  -ForegroundColor Green
  3592.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -BaseReachableTime $tb_BaseReachableTime.Text
  3593.         }
  3594.     if ($tb_ReachableTime.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ReachableTime)){
  3595.         Write-Host "ReachableTime is same, skipping."  -ForegroundColor green}
  3596.         else{
  3597.             Write-Host "ReachableTime:"$tb_ReachableTime.Text  -ForegroundColor Green
  3598.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -ReachableTime $tb_ReachableTime.Text
  3599.         }
  3600.     if ($tb_DadRetransmitTime.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DadRetransmitTime)){
  3601.         Write-Host "DadRetransmitTime is same, skipping."  -ForegroundColor green}
  3602.         else{
  3603.             Write-Host "DadRetransmitTime:"$tb_DadRetransmitTime.Text  -ForegroundColor Green
  3604.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -DadRetransmitTime $tb_DadRetransmitTime.Text
  3605.         }
  3606.     if ($tb_DadTransmits.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DadTransmits)){
  3607.         Write-Host "DadTransmits is same, skipping."  -ForegroundColor green}
  3608.         else{
  3609.             Write-Host "DadTransmits:"$tb_DadTransmits.Text  -ForegroundColor Green
  3610.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -DadTransmits $tb_DadTransmits.Text
  3611.         }
  3612.     if ($tb_NlMtu.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NlMtu)){
  3613.         Write-Host "NlMtu is same, skipping."  -ForegroundColor green}
  3614.         else{
  3615.             Write-Host "NlMtu:"$tb_NlMtu.Text  -ForegroundColor Green
  3616.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -NlMtu $tb_NlMtu.Text
  3617.         }
  3618.     if ($tb_RetransmitTime.Text -eq (Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand RetransmitTime)){
  3619.         Write-Host "RetransmitTime is same, skipping."  -ForegroundColor green}
  3620.         else{
  3621.             Write-Host "RetransmitTime:"$tb_RetransmitTime.Text  -ForegroundColor Green
  3622.             Set-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily -RetransmitTime $tb_RetransmitTime.Text
  3623.         }
  3624. }
  3625.  
  3626. function IPv4_CheckedChanged(){
  3627. if ($cb_IPv4.Checked){
  3628.     $cb_IPv6.Enabled = $false
  3629.     $Global:AddressFamily = "IPv4"
  3630.     RefreshingNetIPInterfaceSettings
  3631.     }else{
  3632.     $cb_IPv6.Enabled = $true
  3633.     $Global:AddressFamily = "IPv6"
  3634.     RefreshingNetIPInterfaceSettings
  3635.     }
  3636. if ($cb_IPv4.Checked -eq $false -and $cb_IPv6.Checked -eq $false -or $cb_IPv4.Checked -eq $false -and $cb_IPv6.Visible -eq $false ){
  3637.         Write-Warning "IPv4 and IPv6 are not Checked, Disabling Interface-Settings."
  3638.         $Groupbox7.Enabled = $false
  3639.         $btn_applyInterfaceSettings.Enabled = $false
  3640.     }else{
  3641.         $Groupbox7.Enabled = $true
  3642.         $btn_applyInterfaceSettings.Enabled = $true
  3643.     }
  3644. }
  3645.  
  3646. function IPv6_CheckedChanged(){
  3647. if ($cb_IPv6.Checked){
  3648.     $cb_IPv4.Enabled = $false
  3649.     $Global:AddressFamily = "IPv6"
  3650.     RefreshingNetIPInterfaceSettings
  3651.     }else{
  3652.     $cb_IPv4.Enabled = $true
  3653.     $Global:AddressFamily = "IPv4"}
  3654.     RefreshingNetIPInterfaceSettings
  3655.     }
  3656.    
  3657. if ($cb_IPv4.Checked -eq $false -and $cb_IPv6.Checked -eq $false -or $cb_IPv4.Checked -eq $false -and $cb_IPv6.Visible -eq $false  ){
  3658.         Write-Warning "IPv4 and IPv6 are not Checked, Disabling Interface-Settings."
  3659.         $Groupbox7.Enabled = $false
  3660.         $btn_applyInterfaceSettings.Enabled = $false
  3661.     }else{
  3662.         $Groupbox7.Enabled = $true
  3663.         $btn_applyInterfaceSettings.Enabled = $true
  3664.     }
  3665.  
  3666. function RefreshingNetIPInterfaceSettings{
  3667.     #NetIPInterface
  3668.         #AdvertiseDefaultRoute
  3669.         $cb_AdvertiseDefaultRoute.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand AdvertiseDefaultRoute
  3670.            
  3671.         #Advertising
  3672.         $cb_Advertising.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Advertising
  3673.            
  3674.         #AutomaticMetric
  3675.         $cb_AutomaticMetric.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand AutomaticMetric
  3676.            
  3677.         #ClampMss
  3678.         $cb_ClampMss.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ClampMss
  3679.            
  3680.         #DirectedMacWolPattern
  3681.         $cb_DirectedMacWolPattern.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DirectedMacWolPattern
  3682.            
  3683.         #EcnMarking
  3684.         $cb_EcnMarking.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand EcnMarking
  3685.            
  3686.         #ForceArpNdWolPattern
  3687.         $cb_ForceArpNdWolPattern.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ForceArpNdWolPattern
  3688.            
  3689.         #Forwarding
  3690.         $cb_Forwarding.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Forwarding
  3691.            
  3692.         #IgnoreDefaultRoutes
  3693.         $cb_IgnoreDefaultRoutes.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand IgnoreDefaultRoutes
  3694.            
  3695.         #ManagedAddressConfiguration
  3696.         $cb_ManagedAddressConfiguration.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ManagedAddressConfiguration
  3697.            
  3698.         #NeighborDiscoverySupported
  3699.         $cb_NeighborDiscoverySupported.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NeighborDiscoverySupported
  3700.        
  3701.         #NeighborUnreachabilityDetection
  3702.         $cb_NeighborUnreachabilityDetection.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NeighborUnreachabilityDetection
  3703.        
  3704.         #OtherStatefulConfiguration
  3705.         $cb_OtherStatefulConfiguration.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand OtherStatefulConfiguration
  3706.        
  3707.         #RouterDiscovery
  3708.         $cb_RouterDiscovery.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand RouterDiscovery
  3709.        
  3710.         #Store
  3711.         $cb_Store.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand Store
  3712.        
  3713.         #WeakHostReceive
  3714.         $cb_WeakHostReceive.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand WeakHostReceive
  3715.        
  3716.         #WeakHostSend
  3717.         $cb_WeakHostSend.Text =  Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand WeakHostSend
  3718.        
  3719.         #CurrentHopLimit
  3720.         #When this parameter value is set to 0, it uses this default.    
  3721.         $tb_CurrentHopLimit.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand CurrentHopLimit
  3722.        
  3723.         #BaseReachableTime
  3724.         #Specifies the base value for random reachable time, in milliseconds. For more information, see RFC 2461.
  3725.         #The default value is 30000.
  3726.         $tb_BaseReachableTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand BaseReachableTime
  3727.    
  3728.         #ReachableTime
  3729.         #Specifies an array of reachable time values. This parameter is the time, in milliseconds, that a node assumes that a neighbor
  3730.         #is reachable after having received a reachability confirmation. This parameter works with the NeighborUnreachabilityDetection parameter.
  3731.         $tb_ReachableTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand ReachableTime
  3732.  
  3733.         #DadRetransmitTime
  3734.         #Specifies a value for the time interval between neighbor solicitation messages.
  3735.         $tb_DadRetransmitTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DadRetransmitTime
  3736.  
  3737.         #DadTransmits
  3738.         #Specifies a value for the number of consecutive messages sent while the network driver performs duplicate address detection.
  3739.         $tb_DadTransmits.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand DadTransmits
  3740.  
  3741.         #NlMtu
  3742.         #Specifies the network layer Maximum Transmission Unit (MTU) value, in bytes, for an IP interface.
  3743.         #For IPv4 the minimum value is 576 bytes. For IPv6 the minimum is value is 1280 bytes.
  3744.         #For both IPv4 and IPv6, the maximum value is 2^32-1 (4294967295). You cannot set values outside these ranges.
  3745.         #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.
  3746.         $tb_NlMtu.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand NlMtu
  3747.  
  3748.         #RetransmitTime (RetransmitTimeMs)
  3749.         #Specifies a value for timeout and retransmission, in milliseconds, for Neighbor Solicitation messages.
  3750.         #For more information, see RetransTimer in RFC 2461.
  3751.         #By default, the value is set to 1000.
  3752.         $tb_RetransmitTime.Text = Get-NetIPInterface -InterfaceAlias $NetConnectionID -AddressFamily $Global:AddressFamily | Select-Object -Expand RetransmitTime
  3753.    
  3754. }
  3755.  
  3756. function applyall{
  3757.     if($Groupbox7.Enabled -eq $False){
  3758.     Write-Host "Applying All Settings!" -ForegroundColor Yellow
  3759.     Write-Host "`n"
  3760.     Write-Host "===== Global Settings =====" -ForegroundColor Yellow
  3761.     applyglobal
  3762.     Write-Host "`n"
  3763.     Write-Host "===== RSS Settings =====" -ForegroundColor Yellow
  3764.     applyrsssettings
  3765.     Write-Host "`n"
  3766.     Write-Host "===== PowerSaving Settings =====" -ForegroundColor Yellow
  3767.     applypowersavingsettings
  3768.     Write-Host "`n"
  3769.     Write-Warning "===== IP-Interface Settings ====="
  3770.     Write-Warning "IPv4 or IPv6 not specified!"
  3771.     Write-Host "`n"
  3772.     Write-Host "===== Adapter Advanced Settings =====" -ForegroundColor Yellow
  3773.     applyadvsettings    
  3774.        
  3775.     }else{
  3776.     Write-Host "Applying All Settings!" -ForegroundColor Yellow
  3777.    
  3778.     Write-Host "===== Global Settings =====" -ForegroundColor Yellow
  3779.     applyglobal
  3780.    
  3781.     Write-Host "===== RSS Settings =====" -ForegroundColor Yellow
  3782.     applyrsssettings
  3783.    
  3784.     Write-Host "===== PowerSaving Settings =====" -ForegroundColor Yellow
  3785.     applypowersavingsettings
  3786.    
  3787.     Write-Host "===== IP-Interface Settings =====" -ForegroundColor Yellow
  3788.     ApplyInterfaceSettings
  3789.    
  3790.     Write-Host "===== Adapter Advanced Settings =====" -ForegroundColor Yellow
  3791.     applyadvsettings
  3792.     }
  3793. }
  3794.  
  3795. function RegistryTweaks{
  3796.         #$ErrorActionPreference = 'Continue'
  3797.         #DefaultReceiveWindow
  3798.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DefaultReceiveWindow")
  3799.         if ($A -eq $false -and $cb_Afd_defaultrecWin.Text -ne $null -and $cb_Afd_defaultrecWin.Text -ne '' ){
  3800.             Write-Host "Set AFDDefaultReceiveWindow to"$cb_Afd_defaultrecWin.Text -ForegroundColor Green
  3801.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultReceiveWindow" -Typ "Dword" -Value $cb_Afd_defaultrecWin.Text -Force
  3802.         }elseif($A -eq $true -and $cb_Afd_defaultrecWin.Text -eq $null -or $cb_Afd_defaultrecWin.Text -eq ''){
  3803.             Write-Warning "Removing AFDDefaultReceiveWindow"
  3804.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultReceiveWindow"
  3805.         }else{
  3806.             Write-Host "Set AFDDefaultReceiveWindow to"$cb_Afd_defaultrecWin.Text -ForegroundColor Green
  3807.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultReceiveWindow" -Value $cb_Afd_defaultrecWin.Text -Force   
  3808.         }
  3809.        
  3810.         #DefaultSendWindow
  3811.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DefaultSendWindow")
  3812.         if ($A -eq $false -and $cb_Afd_defaultSendWin.Text -ne $null -and $cb_Afd_defaultSendWin.Text -ne '' ){
  3813.             Write-Host "Set AFDDefaultSendWindow to"$cb_Afd_defaultSendWin.Text -ForegroundColor Green
  3814.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultSendWindow" -Typ "Dword" -Value $cb_Afd_defaultSendWin.Text -Force
  3815.         }elseif($A -eq $true -and $cb_Afd_defaultSendWin.Text -eq $null -or $cb_Afd_defaultSendWin.Text -eq ''){
  3816.             Write-Warning "Removing AFDDefaultSendWindow"
  3817.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultSendWindow"
  3818.         }else{
  3819.             Write-Host "Set AFDDefaultSendWindow to"$cb_Afd_defaultSendWin.Text -ForegroundColor Green
  3820.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DefaultSendWindow" -Value $cb_Afd_defaultSendWin.Text -Force 
  3821.         }
  3822.        
  3823.         #DisableAddressSharing
  3824.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DisableAddressSharing")
  3825.         if ($A -eq $false -and $cb_DisableAddressSharing.Text -ne $null -and $cb_DisableAddressSharing.Text -ne '' ){
  3826.             Write-Host "Set AFDDisableAddressSharing to"$cb_DisableAddressSharing.Text -ForegroundColor Green
  3827.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableAddressSharing" -Typ "Dword" -Value $cb_DisableAddressSharing.Text -Force
  3828.         }elseif($A -eq $true -and $cb_DisableAddressSharing.Text -eq $null -or $cb_DisableAddressSharing.Text -eq ''){
  3829.             Write-Warning "Removing AFDDisableAddressSharing"
  3830.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableAddressSharing"
  3831.         }else{
  3832.             Write-Host "Set AFDDisableAddressSharing to"$cb_DisableAddressSharing.Text -ForegroundColor Green
  3833.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableAddressSharing" -Value $cb_DisableAddressSharing.Text -Force  
  3834.         }
  3835.        
  3836.         #BufferMultiplier
  3837.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "BufferMultiplier")
  3838.         if ($A -eq $false -and $cb_BufferMultiplier.Text -ne $null -and $cb_BufferMultiplier.Text -ne '' ){
  3839.             Write-Host "Set AFDBufferMultiplier to"$cb_BufferMultiplier.Text -ForegroundColor Green
  3840.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferMultiplier" -Typ "Dword" -Value $cb_BufferMultiplier.Text -Force
  3841.         }elseif($A -eq $true -and $cb_BufferMultiplier.Text -eq $null -or $cb_BufferMultiplier.Text -eq ''){
  3842.             Write-Warning "Removing AFDBufferMultiplier"
  3843.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferMultiplier"
  3844.         }else{
  3845.             Write-Host "Set AFDBufferMultiplier to"$cb_BufferMultiplier.Text -ForegroundColor Green
  3846.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferMultiplier" -Value $cb_BufferMultiplier.Text -Force
  3847.         }
  3848.        
  3849.         #BufferAlignment
  3850.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "BufferAlignment")
  3851.         if ($A -eq $false -and $cb_BufferAlignment.Text -ne $null -and $cb_BufferAlignment.Text -ne '' ){
  3852.             Write-Host "Set AFDBufferAlignment to"$cb_BufferAlignment.Text -ForegroundColor Green
  3853.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferAlignment" -Typ "Dword" -Value $cb_BufferAlignment.Text -Force
  3854.         }elseif($A -eq $true -and $cb_BufferAlignment.Text -eq $null -or $cb_BufferAlignment.Text -eq ''){
  3855.             Write-Warning "Removing AFDBufferAlignment"
  3856.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferAlignment"
  3857.         }else{
  3858.             Write-Host "Set AFDBufferAlignment to"$cb_BufferAlignment.Text -ForegroundColor Green
  3859.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "BufferAlignment" -Value $cb_BufferAlignment.Text -Force  
  3860.         }
  3861.        
  3862.         #DoNotHoldNICBuffers
  3863.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DoNotHoldNICBuffers")
  3864.         if ($A -eq $false -and $cb_DoNotHoldNICBuffers.Text -ne $null -and $cb_DoNotHoldNICBuffers.Text -ne '' ){
  3865.             Write-Host "Set AFDDoNotHoldNICBuffers to"$cb_DoNotHoldNICBuffers.Text -ForegroundColor Green
  3866.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DoNotHoldNICBuffers" -Typ "Dword" -Value $cb_DoNotHoldNICBuffers.Text -Force
  3867.         }elseif($A -eq $true -and $cb_DoNotHoldNICBuffers.Text -eq $null -or $cb_DoNotHoldNICBuffers.Text -eq ''){
  3868.             Write-Warning "Removing AFDDoNotHoldNICBuffers"
  3869.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DoNotHoldNICBuffers"
  3870.         }else{
  3871.             Write-Host "Set AFDDoNotHoldNICBuffers to"$cb_DoNotHoldNICBuffers.Text -ForegroundColor Green
  3872.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DoNotHoldNICBuffers" -Value $cb_DoNotHoldNICBuffers.Text -Force  
  3873.         }
  3874.        
  3875.         #SmallBufferSize
  3876.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "SmallBufferSize")
  3877.         if ($A -eq $false -and $cb_SmallBufferSize.Text -ne $null -and $cb_SmallBufferSize.Text -ne '' ){
  3878.             Write-Host "Set AFDSmallBufferSize to"$cb_SmallBufferSize.Text -ForegroundColor Green
  3879.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferSize" -Typ "Dword" -Value $cb_SmallBufferSize.Text -Force
  3880.         }elseif($A -eq $true -and $cb_SmallBufferSize.Text -eq $null -or $cb_SmallBufferSize.Text -eq ''){
  3881.             Write-Warning "Removing AFDSmallBufferSize"
  3882.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferSize"
  3883.         }else{
  3884.             Write-Host "Set AFDSmallBufferSize to"$cb_SmallBufferSize.Text -ForegroundColor Green
  3885.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferSize" -Value $cb_SmallBufferSize.Text -Force  
  3886.         }
  3887.        
  3888.         #MediumBufferSize
  3889.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "MediumBufferSize")
  3890.         if ($A -eq $false -and $cb_MediumBufferSize.Text -ne $null -and $cb_MediumBufferSize.Text -ne '' ){
  3891.             Write-Host "Set AFDMediumBufferSize to"$cb_MediumBufferSize.Text -ForegroundColor Green
  3892.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferSize" -Typ "Dword" -Value $cb_MediumBufferSize.Text -Force
  3893.         }elseif($A -eq $true -and $cb_MediumBufferSize.Text -eq $null -or $cb_MediumBufferSize.Text -eq ''){
  3894.             Write-Warning "Removing AFDMediumBufferSize"
  3895.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferSize"
  3896.         }else{
  3897.             Write-Host "Set AFDMediumBufferSize to"$cb_MediumBufferSize.Text -ForegroundColor Green
  3898.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferSize" -Value $cb_MediumBufferSize.Text -Force
  3899.         }
  3900.        
  3901.         #LargeBufferSize
  3902.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "LargeBufferSize")
  3903.         if ($A -eq $false -and $cb_LargeBufferSize.Text -ne $null -and $cb_LargeBufferSize.Text -ne '' ){
  3904.             Write-Host "Set AFDLargeBufferSize to"$cb_LargeBufferSize.Text -ForegroundColor Green
  3905.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargeBufferSize" -Typ "Dword" -Value $cb_LargeBufferSize.Text -Force
  3906.         }elseif($A -eq $true -and $cb_LargeBufferSize.Text -eq $null -or $cb_LargeBufferSize.Text -eq ''){
  3907.             Write-Warning "Removing AFDLargeBufferSize"
  3908.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargeBufferSize"
  3909.         }else{
  3910.             Write-Host "Set AFDLargeBufferSize to"$cb_LargeBufferSize.Text -ForegroundColor Green
  3911.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargeBufferSize" -Value $cb_LargeBufferSize.Text -Force  
  3912.         }
  3913.        
  3914.         #HugeBufferSize
  3915.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "HugeBufferSize")
  3916.         if ($A -eq $false -and $cb_HugeBufferSize.Text -ne $null -and $cb_HugeBufferSize.Text -ne '' ){
  3917.             Write-Host "Set AFDHugeBufferSize to"$cb_HugeBufferSize.Text -ForegroundColor Green
  3918.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "HugeBufferSize" -Typ "Dword" -Value $cb_HugeBufferSize.Text -Force
  3919.         }elseif($A -eq $true -and $cb_HugeBufferSize.Text -eq $null -or $cb_HugeBufferSize.Text -eq ''){
  3920.             Write-Warning "Removing AFDHugeBufferSize"
  3921.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "HugeBufferSize"
  3922.         }else{
  3923.             Write-Host "Set AFDHugeBufferSize to"$cb_HugeBufferSize.Text -ForegroundColor Green
  3924.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "HugeBufferSize" -Value $cb_HugeBufferSize.Text -Force
  3925.         }
  3926.        
  3927.         #SmallBufferListDepth
  3928.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "SmallBufferListDepth")
  3929.         if ($A -eq $false -and $cb_SmallBufferListDepth.Text -ne $null -and $cb_SmallBufferListDepth.Text -ne '' ){
  3930.             Write-Host "Set AFDSmallBufferListDepth to"$cb_SmallBufferListDepth.Text -ForegroundColor Green
  3931.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferListDepth" -Typ "Dword" -Value $cb_SmallBufferListDepth.Text -Force
  3932.         }elseif($A -eq $true -and $cb_SmallBufferListDepth.Text -eq $null -or $cb_SmallBufferListDepth.Text -eq ''){
  3933.             Write-Warning "Removing AFDSmallBufferListDepth"
  3934.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferListDepth"
  3935.         }else{
  3936.             Write-Host "Set AFDSmallBufferListDepth to"$cb_SmallBufferListDepth.Text -ForegroundColor Green
  3937.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "SmallBufferListDepth" -Value $cb_SmallBufferListDepth.Text -Force
  3938.         }
  3939.        
  3940.         #MediumBufferListDepth
  3941.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "MediumBufferListDepth")
  3942.         if ($A -eq $false -and $cb_MediumBufferListDepth.Text -ne $null -and $cb_MediumBufferListDepth.Text -ne '' ){
  3943.             Write-Host "Set AFDMediumBufferListDepth to"$cb_MediumBufferListDepth.Text -ForegroundColor Green
  3944.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferListDepth" -Typ "Dword" -Value $cb_MediumBufferListDepth.Text -Force
  3945.         }elseif($A -eq $true -and $cb_MediumBufferListDepth.Text -eq $null -or $cb_MediumBufferListDepth.Text -eq ''){
  3946.             Write-Warning "Removing AFDMediumBufferListDepth"
  3947.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferListDepth"
  3948.         }else{
  3949.             Write-Host "Set AFDMediumBufferListDepth to"$cb_MediumBufferListDepth.Text -ForegroundColor Green
  3950.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "MediumBufferListDepth" -Value $cb_MediumBufferListDepth.Text -Force  
  3951.         }
  3952.        
  3953.         #LargBufferListDepth
  3954.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "LargBufferListDepth")
  3955.         if ($A -eq $false -and $cb_LargBufferListDepth.Text -ne $null -and $cb_LargBufferListDepth.Text -ne '' ){
  3956.             Write-Host "Set AFDLargBufferListDepth to"$cb_LargBufferListDepth.Text -ForegroundColor Green
  3957.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargBufferListDepth" -Typ "Dword" -Value $cb_LargBufferListDepth.Text -Force
  3958.         }elseif($A -eq $true -and $cb_LargBufferListDepth.Text -eq $null -or $cb_LargBufferListDepth.Text -eq ''){
  3959.             Write-Warning "Removing AFDLargBufferListDepth"
  3960.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargBufferListDepth"
  3961.         }else{
  3962.             Write-Host "Set AFDLargBufferListDepth to"$cb_LargBufferListDepth.Text -ForegroundColor Green
  3963.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "LargBufferListDepth" -Value $cb_LargBufferListDepth.Text -Force  
  3964.         }
  3965.        
  3966.         #DisableDirectAcceptEx
  3967.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DisableDirectAcceptEx")
  3968.         if ($A -eq $false -and $cb_DisableDirectAcceptEx.Text -ne $null -and $cb_DisableDirectAcceptEx.Text -ne '' ){
  3969.             Write-Host "Set AFDDisableDirectAcceptEx to"$cb_DisableDirectAcceptEx.Text -ForegroundColor Green
  3970.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableDirectAcceptEx" -Typ "Dword" -Value $cb_DisableDirectAcceptEx.Text -Force
  3971.         }elseif($A -eq $true -and $cb_DisableDirectAcceptEx.Text -eq $null -or $cb_DisableDirectAcceptEx.Text -eq ''){
  3972.             Write-Warning "Removing AFDDisableDirectAcceptEx"
  3973.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableDirectAcceptEx"
  3974.         }else{
  3975.             Write-Host "Set AFDDisableDirectAcceptEx to"$cb_DisableDirectAcceptEx.Text -ForegroundColor Green
  3976.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableDirectAcceptEx" -Value $cb_DisableDirectAcceptEx.Text -Force  
  3977.         }
  3978.        
  3979.         #DisableChainedReceive
  3980.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DisableChainedReceive")
  3981.         if ($A -eq $false -and $cb_DisableChainedReceive.Text -ne $null -and $cb_DisableChainedReceive.Text -ne '' ){
  3982.             Write-Host "Set AFDDisableChainedReceive to"$cb_DisableChainedReceive.Text -ForegroundColor Green
  3983.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableChainedReceive" -Typ "Dword" -Value $cb_DisableChainedReceive.Text -Force
  3984.         }elseif($A -eq $true -and $cb_DisableChainedReceive.Text -eq $null -or $cb_DisableChainedReceive.Text -eq ''){
  3985.             Write-Warning "Removing AFDDisableChainedReceive"
  3986.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableChainedReceive"
  3987.         }else{
  3988.             Write-Host "Set AFDDisableChainedReceive to"$cb_DisableChainedReceive.Text -ForegroundColor Green
  3989.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableChainedReceive" -Value $cb_DisableChainedReceive.Text -Force  
  3990.         }
  3991.        
  3992.         #DisableRawSecurity
  3993.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DisableRawSecurity")
  3994.         if ($A -eq $false -and $cb_DisableRawSecurity.Text -ne $null -and $cb_DisableRawSecurity.Text -ne '' ){
  3995.             Write-Host "Set AFDDisableRawSecurity to"$cb_DisableRawSecurity.Text -ForegroundColor Green
  3996.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableRawSecurity" -Typ "Dword" -Value $cb_DisableRawSecurity.Text -Force
  3997.         }elseif($A -eq $true -and $cb_DisableRawSecurity.Text -eq $null -or $cb_DisableRawSecurity.Text -eq ''){
  3998.             Write-Warning "Removing AFDDisableRawSecurity"
  3999.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableRawSecurity"
  4000.         }else{
  4001.             Write-Host "Set AFDDisableRawSecurity to"$cb_DisableRawSecurity.Text -ForegroundColor Green
  4002.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DisableRawSecurity" -Value $cb_DisableRawSecurity.Text -Force
  4003.         }
  4004.        
  4005.         #DynamicSendBufferDisable
  4006.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "DynamicSendBufferDisable")
  4007.         if ($A -eq $false -and $cb_DynamicSendBufferDisable.Text -ne $null -and $cb_DynamicSendBufferDisable.Text -ne '' ){
  4008.             Write-Host "Set AFDDynamicSendBufferDisable to"$cb_DynamicSendBufferDisable.Text -ForegroundColor Green
  4009.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DynamicSendBufferDisable" -Typ "Dword" -Value $cb_DynamicSendBufferDisable.Text -Force
  4010.         }elseif($A -eq $true -and $cb_DynamicSendBufferDisable.Text -eq $null -or $cb_DynamicSendBufferDisable.Text -eq ''){
  4011.             Write-Warning "Removing AFDDynamicSendBufferDisable"
  4012.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DynamicSendBufferDisable"
  4013.         }else{
  4014.             Write-Host "Set AFDDynamicSendBufferDisable to"$cb_DynamicSendBufferDisable.Text -ForegroundColor Green
  4015.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "DynamicSendBufferDisable" -Value $cb_DynamicSendBufferDisable.Text -Force
  4016.         }
  4017.        
  4018.         #FastSendDatagramThreshold
  4019.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "FastSendDatagramThreshold")
  4020.         if ($A -eq $false -and $cb_FastSendDatagramThreshold.Text -ne $null -and $cb_FastSendDatagramThreshold.Text -ne '' ){
  4021.             Write-Host "Set AFDFastSendDatagramThreshold to"$cb_FastSendDatagramThreshold.Text -ForegroundColor Green
  4022.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastSendDatagramThreshold" -Typ "Dword" -Value $cb_FastSendDatagramThreshold.Text -Force
  4023.         }elseif($A -eq $true -and $cb_FastSendDatagramThreshold.Text -eq $null -or $cb_FastSendDatagramThreshold.Text -eq ''){
  4024.             Write-Warning "Removing AFDFastSendDatagramThreshold"
  4025.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastSendDatagramThreshold"
  4026.         }else{
  4027.             Write-Host "Set AFDFastSendDatagramThreshold to"$cb_FastSendDatagramThreshold.Text -ForegroundColor Green
  4028.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastSendDatagramThreshold" -Value $cb_FastSendDatagramThreshold.Text -Force  
  4029.         }
  4030.        
  4031.         #FastCopyReceiveThreshold
  4032.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "FastCopyReceiveThreshold")
  4033.         if ($A -eq $false -and $cb_FastCopyReceiveThreshold.Text -ne $null -and $cb_FastCopyReceiveThreshold.Text -ne '' ){
  4034.             Write-Host "Set AFDFastCopyReceiveThreshold to"$cb_FastCopyReceiveThreshold.Text -ForegroundColor Green
  4035.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastCopyReceiveThreshold" -Typ "Dword" -Value $cb_FastCopyReceiveThreshold.Text -Force
  4036.         }elseif($A -eq $true -and $cb_FastCopyReceiveThreshold.Text -eq $null -or $cb_FastCopyReceiveThreshold.Text -eq ''){
  4037.             Write-Warning "Removing AFDFastCopyReceiveThreshold"
  4038.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastCopyReceiveThreshold"
  4039.         }else{
  4040.             Write-Host "Set AFDFastCopyReceiveThreshold to"$cb_FastCopyReceiveThreshold.Text -ForegroundColor Green
  4041.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "FastCopyReceiveThreshold" -Value $cb_FastCopyReceiveThreshold.Text -Force
  4042.         }
  4043.        
  4044.         #IgnorePushBitOnReceives
  4045.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "IgnorePushBitOnReceives")
  4046.         if ($A -eq $false -and $cb_IgnorePushBitOnReceives.Text -ne $null -and $cb_IgnorePushBitOnReceives.Text -ne '' ){
  4047.             Write-Host "Set AFDIgnorePushBitOnReceives to"$cb_IgnorePushBitOnReceives.Text -ForegroundColor Green
  4048.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnorePushBitOnReceives" -Typ "Dword" -Value $cb_IgnorePushBitOnReceives.Text -Force
  4049.         }elseif($A -eq $true -and $cb_IgnorePushBitOnReceives.Text -eq $null -or $cb_IgnorePushBitOnReceives.Text -eq ''){
  4050.             Write-Warning "Removing AFDIgnorePushBitOnReceives"
  4051.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnorePushBitOnReceives"
  4052.         }else{
  4053.             Write-Host "Set AFDIgnorePushBitOnReceives to"$cb_IgnorePushBitOnReceives.Text -ForegroundColor Green
  4054.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnorePushBitOnReceives" -Value $cb_IgnorePushBitOnReceives.Text -Force  
  4055.         }
  4056.        
  4057.         #IgnoreOrderlyRelease
  4058.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "IgnoreOrderlyRelease")
  4059.         if ($A -eq $false -and $cb_IgnoreOrderlyRelease.Text -ne $null -and $cb_IgnoreOrderlyRelease.Text -ne '' ){
  4060.             Write-Host "Set AFDIgnoreOrderlyRelease to"$cb_IgnoreOrderlyRelease.Text -ForegroundColor Green
  4061.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnoreOrderlyRelease" -Typ "Dword" -Value $cb_IgnoreOrderlyRelease.Text -Force
  4062.         }elseif($A -eq $true -and $cb_IgnoreOrderlyRelease.Text -eq $null -or $cb_IgnoreOrderlyRelease.Text -eq ''){
  4063.             Write-Warning "Removing AFDIgnoreOrderlyRelease"
  4064.             Remove-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnoreOrderlyRelease"
  4065.         }else{
  4066.             Write-Host "Set AFDIgnoreOrderlyRelease to"$cb_IgnoreOrderlyRelease.Text -ForegroundColor Green
  4067.             Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters" -Name "IgnoreOrderlyRelease" -Value $cb_IgnoreOrderlyRelease.Text -Force
  4068.         }
  4069.        
  4070.         #TransmitWorker
  4071.         $A=((Get-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters").PSObject.Properties.Name -contains "TransmitWorker")
  4072.         if ($A -eq $false -and $cb_TransmitWorker.Text -ne $null -and $cb_TransmitWorker.Text -ne '' ){
  4073.             Write-Host "Set AFDTransmitWorker to"$cb_TransmitWorker.Text -ForegroundColor Green
  4074.             New-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parame