internal/dataTypes.psm1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 |
enum EnableDisable { Disabled = 0 Enabled = 1 } #region Buffers - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/keywords-that-can-be-edited Class ReceiveBuffers { [string] $RegistryKeyword = '*ReceiveBuffers' [int] $DisplayParameterType = '1' # 1 byte unsigned integer ReceiveBuffers () {} } Class TransmitBuffers { [string] $RegistryKeyword = '*TransmitBuffers' [int] $DisplayParameterType = '1' # 1 byte unsigned integer TransmitBuffers () {} } Class Buffers { $ReceiveBuffers = [ReceiveBuffers]::new() $TransmitBuffers = [TransmitBuffers]::new() Buffers () {} } #endregion #region ChecksumOffload - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/enumeration-keywords #Send and Receive TCP Checksum Offload for IPv4 and IPv6 #Send and Receive IP Checksum Offload for IPv4 #Send and Receive UDP Checksum offload for IPv4 and IPv6 #Support for TCP Checksum Standardized Keywords is mandatory. #endregion ChecksumOffload #region EncapOverhead Class EncapOverhead { [string] $RegistryKeyword = '*EncapOverhead' [int] $DisplayParameterType = '4' # 1 byte unsigned integer is preferred but 4 or less is acceptable [int] $DefaultRegistryValue = 0 [int] $NumericParameterBaseValue = 10 # Must be this value [int] $NumericParameterMaxValue = 160 # Must be >= 160 [int] $NumericParameterMinValue = 0 # Must be this value [int] $NumericParameterStepValue = 32 # Must be this value EncapOverhead () {} } #endregion EncapOverhead #region EncapsulatedPacketTaskOffload #endregion EncapsulatedPacketTaskOffload #region EncapsulatedPacketTaskOffloadNvgre Class EncapsulatedPacketTaskOffloadNvgre { [string] $RegistryKeyword = '*EncapsulatedPacketTaskOffloadNvgre' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ EncapsulatedPacketTaskOffloadNvgre () {} } #endregion EncapsulatedPacketTaskOffloadNvgre #region EncapsulatedPacketTaskOffloadVxlan Class EncapsulatedPacketTaskOffloadVxlan { [string] $RegistryKeyword = '*EncapsulatedPacketTaskOffloadVxlan' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ EncapsulatedPacketTaskOffloadVxlan () {} } #endregion EncapsulatedPacketTaskOffloadVxlan #region FlowControl - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/enumeration-keywords enum FlowControlVal { TxRxDisabled = 0 # Server Default TxEnabled = 1 RxEnabled = 2 RxTxEnabled = 3 # Client Default AutoNegotiation = 4 } Class FlowControl_Server { [string] $RegistryKeyword = '*FlowControl' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [FlowControlVal]::TxRxDisabled.Value__ [string] $DisplayDefaultValue = [FlowControlVal]::TxRxDisabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('FlowControlVal').Value__ FlowControl_Server () {} } Class FlowControl_Client { [string] $RegistryKeyword = '*FlowControl' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [FlowControlVal]::RxTxEnabled.Value__ [string] $DisplayDefaultValue = [FlowControlVal]::RxTxEnabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('FlowControlVal').Value__ FlowControl_Client () {} } Class FlowControl { $FlowControl_Server = [FlowControl_Server]::new() $FlowControl_Client = [FlowControl_Client]::new() FlowControl () {} } #endregion FlowControl #region InterruptModeration - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/enumeration-keywords Class InterruptModeration { [string] $RegistryKeyword = '*InterruptModeration' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ InterruptModeration () {} } #endregion InterruptModeration #region JumboPacket - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/keywords-that-can-be-edited Class JumboPacket { [string] $RegistryKeyword = '*JumboPacket' [int] $DisplayParameterType = '2' # 2 byte unsigned integer [int] $DefaultRegistryValue = 1514 [int] $NumericParameterBaseValue = 10 # Must be this value [int] $NumericParameterMaxValue = 9014 # Must be >= this value 9014 + EncapOverhead (160) [int] $NumericParameterMinValue = 1514 # Must be <= than this value [int] $NumericParameterStepValue = 1 # Must be this value JumboPacket () {} } #endregion JumboPacket #region LSO - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/using-registry-values-to-enable-and-disable-task-offloading Class LSOv2IPV4 { [string] $RegistryKeyword = '*LSOv2IPV4' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ LSOv2IPV4 () {} } Class LSOv2IPV6 { [string] $RegistryKeyword = '*LSOv2IPV6' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ LSOv2IPV6 () {} } Class LSO { $LSOv2IPV4 = [LSOv2IPV4]::new() $LSOv2IPV6 = [LSOv2IPV6]::new() LSO () {} } #endregion LSO #region NDKPI - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/inf-requirements-for-ndkpi enum NetworkDirectTechnologyVal { iWARP = 1 Infiniband = 2 RoCE = 3 RoCEv2 = 4 } enum NetworkDirectRoCEFrameSizeVal { Small = 256 Medium = 512 Default = 1024 Large = 2048 XLarge = 4096 } Class NetworkDirect { [string] $RegistryKeyword = '*NetworkDirect' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ NetworkDirect () {} } Class NetworkDirectTechnology { [string] $RegistryKeyword = '*NetworkDirectTechnology' [int] $DisplayParameterType = 5 [string[]] $ValidRegistryValues = [System.Enum]::GetValues('NetworkDirectTechnologyVal').Value__ NetworkDirectTechnology () {} } Class NetworkDirectRoCEFrameSize { [string] $RegistryKeyword = '*NetworkDirectRoCEFrameSize' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [NetworkDirectRoCEFrameSizeVal]::Default.Value__ [string[]] $ValidRegistryValues = [System.Enum]::GetValues('NetworkDirectRoCEFrameSizeVal').Value__ NetworkDirectRoCEFrameSize () {} } Class NDKPI { $NetworkDirect = [NetworkDirect]::new() $NetworkDirectTechnology = [NetworkDirectTechnology]::new() $NetworkDirectRoCEFrameSize = [NetworkDirectRoCEFrameSize]::new() } #endregion NDKPI #region NDIS Class NDIS { [string] $WS2016 = '6.60' [string] $WS2019 = '6.82' [string] $WS2022 = '6.85' [string] $WS2025 = '6.88' NDIS () {} } #endregion NDIS #region NicSwitch Class NicSwitch_1GbOrGreater { $SwitchName = 'Default Switch' # Must be this value $Flags = 0 # Must be this value $SwitchType = 1 # Must be this value $SwitchId = 0 # Must be this value $NumVFs = 4 # For 1GbE or Higher NicSwitch_1GbOrGreater () {} } Class NicSwitch_10GbOrGreater { $SwitchName = 'Default Switch' # Must be this value $Flags = 0 # Must be this value $SwitchType = 1 # Must be this value $SwitchId = 0 # Must be this value $NumVFs = 32 # For 10GbE or higher NicSwitch_10GbOrGreater () {} } Class NicSwitch { $NicSwitch_1GbOrGreater = [NicSwitch_1GbOrGreater]::new() $NicSwitch_10GbOrGreater = [NicSwitch_10GbOrGreater]::new() NicSwitch () {} } #endregion NicSwitch #region PriorityVLANTag - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/enumeration-keywords enum PriorityVLANTagVal { PriorityVLANDisabled = 0 PriorityEnabled = 1 VLANEnabled = 2 PriorityVLANEnabled = 3 } Class PriorityVLANTag { [string] $RegistryKeyword = '*PriorityVLANTag' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [PriorityVLANTagVal]::PriorityVLANEnabled.Value__ [string] $DisplayDefaultValue = [PriorityVLANTagVal]::PriorityVLANEnabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('PriorityVLANTagVal').Value__ PriorityVLANTag () {} } #endregion PriorityVLANTag #region PtpHardwareTimestamp Class PtpHardwareTimestamp { [string] $RegistryKeyword = '*PtpHardwareTimestamp' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Disabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Disabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ PtpHardwareTimestamp () {} } #endregion #region QOS - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/standardized-inf-keywords-for-ndis-qos Class QOS { [string] $RegistryKeyword = '*QOS' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ QOS () {} } #endregion QOS #region HWQOS - or QoSOffload Class QOSOffload { [string] $RegistryKeyword = '*QOSOffload' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ QoSOffload () {} } #endregion QOS #region RSC - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/standardized-inf-keywords-for-rsc Class RSCIPv4 { [string] $RegistryKeyword = '*RSCIPv4' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ RSCIPv4 () {} } Class RSCIPv6 { [string] $RegistryKeyword = '*RSCIPv6' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ RSCIPv6 () {} } Class RSC { $RSCIPv4 = [RSCIPv4]::new() $RSCIPv6 = [RSCIPv6]::new() RSC () {} } #endregion #region RSS - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/standardized-inf-keywords-for-rss enum RSSProfileVal { ClosestProcessor = 1 ClosestProcessorStatic = 2 NUMAScaling = 3 NUMAScalingStatic = 4 ConservativeScaling = 5 } Class RSS { [string] $RegistryKeyword = '*RSS' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ RSS () {} } Class MaxRSSProcessors_MSIXSupport_1Gb { [string] $RegistryKeyword = '*MaxRssProcessors' [int] $DisplayParameterType = 1 # 1 byte unsigned integer [int] $DefaultRegistryValue = 4 [int] $NumericParameterBaseValue = 10 # Must be this value [int] $NumericParameterMaxValue = 4 # Must be >= than this value [int] $NumericParameterMinValue = 1 # Must be this value [int] $NumericParameterStepValue = 1 # Must be this value MaxRSSProcessors_MSIXSupport_1Gb () {} } Class MaxRSSProcessors_MSIXSupport_10GbOrGreater { [string] $RegistryKeyword = '*MaxRssProcessors' [int] $DisplayParameterType = 1 # 1 byte unsigned integer [int] $DefaultRegistryValue = 8 [int] $NumericParameterBaseValue = 10 # Must be this value [int] $NumericParameterMaxValue = 8 # Must be >= than this value [int] $NumericParameterMinValue = 1 # Must be this value [int] $NumericParameterStepValue = 1 # Must be this value MaxRSSProcessors_MSIXSupport_10GbOrGreater () {} } Class MaxRSSProcessors_No_MSIXSupport_1Gb { [string] $RegistryKeyword = '*MaxRssProcessors' [int] $DisplayParameterType = 1 # 1 byte unsigned integer [int] $DefaultRegistryValue = 2 [int] $NumericParameterBaseValue = 10 # Must be this value [int] $NumericParameterMaxValue = 2 # Must be >= than this value [int] $NumericParameterMinValue = 1 # Must be this value [int] $NumericParameterStepValue = 1 # Must be this value MaxRSSProcessors_No_MSIXSupport_1Gb () {} } Class MaxRSSProcessors_No_MSIXSupport_10GbOrGreater { [string] $RegistryKeyword = '*MaxRssProcessors' [int] $DisplayParameterType = 1 # 1 byte unsigned integer [int] $DefaultRegistryValue = 4 [int] $NumericParameterBaseValue = 10 # Must be this value [int] $NumericParameterMaxValue = 4 # Must be >= than this value [int] $NumericParameterMinValue = 1 # Must be < than this value [int] $NumericParameterStepValue = 1 # Must be this value MaxRSSProcessors_No_MSIXSupport_10GbOrGreater () {} } Class MaxRSSProcessors { $MaxRSSProcessors_MSIXSupport_1Gb = [MaxRSSProcessors_MSIXSupport_1Gb]::new() $MaxRSSProcessors_MSIXSupport_10GbOrGreater = [MaxRSSProcessors_MSIXSupport_10GbOrGreater]::new() $MaxRSSProcessors_No_MSIXSupport_1Gb = [MaxRSSProcessors_No_MSIXSupport_1Gb]::new() $MaxRSSProcessors_No_MSIXSupport_10GbOrGreater = [MaxRSSProcessors_No_MSIXSupport_10GbOrGreater]::new() MaxRSSProcessors () {} } Class NumRSSQueues_MSIXSupport_1Gb { [string] $RegistryKeyword = '*NumRSSQueues' [int] $DisplayParameterType = 1 # 4 byte unsigned integer [int] $DefaultRegistryValue = 4 [int] $NumericParameterBaseValue = 10 # Must be this value [int] $NumericParameterMaxValue = 4 # Must be >= than this value [int] $NumericParameterMinValue = 1 # Must be this value [int] $NumericParameterStepValue = 1 # Must be this value NumRSSQueues_MSIXSupport_1Gb () {} } Class NumRSSQueues_MSIXSupport_10GbOrGreater { [string] $RegistryKeyword = '*NumRSSQueues' [int] $DisplayParameterType = 1 # 1 byte unsigned integer [int] $DefaultRegistryValue = 8 [int] $NumericParameterBaseValue = 10 # Must be this value [int] $NumericParameterMaxValue = 8 # Must be >= than this value [int] $NumericParameterMinValue = 1 # Must be this value [int] $NumericParameterStepValue = 1 # Must be this value NumRSSQueues_MSIXSupport_10GbOrGreater () {} } Class NumRSSQueues_No_MSIXSupport_1Gb { [string] $RegistryKeyword = '*NumRSSQueues' [int] $DisplayParameterType = 1 # 1 byte unsigned integer [int] $DefaultRegistryValue = 2 [int] $NumericParameterBaseValue = 10 # Must be this value [int] $NumericParameterMaxValue = 2 # Must be >= than this value [int] $NumericParameterMinValue = 1 # Must be this value [int] $NumericParameterStepValue = 1 # Must be this value NumRSSQueues_No_MSIXSupport_1Gb () {} } Class NumRSSQueues_No_MSIXSupport_10GbOrGreater { [string] $RegistryKeyword = '*NumRSSQueues' [int] $DisplayParameterType = 1 # 1 byte unsigned integer [int] $DefaultRegistryValue = 4 [int] $NumericParameterBaseValue = 10 # Must be this value [int] $NumericParameterMaxValue = 4 # Must be >= than this value [int] $NumericParameterMinValue = 1 # Must be < than this value [int] $NumericParameterStepValue = 1 # Must be this value NumRSSQueues_No_MSIXSupport_10GbOrGreater () {} } Class NumRSSQueues { # NumRSSQueues must support the same values as MaxRSSProcessors $NumRSSQueues_MSIXSupport_1Gb = [NumRSSQueues_MSIXSupport_1Gb]::new() $NumRSSQueues_MSIXSupport_10GbOrGreater = [NumRSSQueues_MSIXSupport_10GbOrGreater]::new() $NumRSSQueues_No_MSIXSupport_1Gb = [NumRSSQueues_No_MSIXSupport_1Gb]::new() $NumRSSQueues_No_MSIXSupport_10GbOrGreater = [NumRSSQueues_No_MSIXSupport_10GbOrGreater]::new() NumRSSQueues () {} } Class RSSProfile { [string] $RegistryKeyword = '*RSSProfile' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [RSSProfileVal]::NUMAScalingStatic.Value__ [string] $DisplayDefaultValue = [RSSProfileVal]::NUMAScalingStatic [string[]] $ValidRegistryValues = [System.Enum]::GetValues('RSSProfileVal').Value__ RSSProfile () {} } Class NumaNodeId { [string] $RegistryKeyword = '*NumaNodeId' [int] $DisplayParameterType = 1 # 1 byte unsigned integer [int] $DefaultRegistryValue = 65535 [int] $NumericParameterBaseValue = 10 # Must be this value [int] $NumericParameterMaxValue = 65535 # Must be this value [int] $NumericParameterMinValue = 0 # Must be < than this value [int] $NumericParameterStepValue = 1 # Must be this value NumaNodeId () {} } Class RssBaseProcGroup { [string] $RegistryKeyword = '*RssBaseProcGroup' [int] $DisplayParameterType = 1 # 1 byte unsigned integer [int] $DefaultRegistryValue = 0 [int] $NumericParameterBaseValue = 10 # Must be this value #[int] $NumericParameterMaxValue = # System specific [int] $NumericParameterMinValue = 0 # Must be < than this value [int] $NumericParameterStepValue = 1 # Must be this value RssBaseProcGroup () {} } Class RSSMaxProcGroup { [string] $RegistryKeyword = '*RSSMaxProcGroup' [int] $DisplayParameterType = 1 # 1 byte unsigned integer [int] $DefaultRegistryValue = 0 [int] $NumericParameterBaseValue = 10 # Must be this value #[int] $NumericParameterMaxValue = # System specific [int] $NumericParameterMinValue = 0 # Must be < than this value [int] $NumericParameterStepValue = 1 # Must be this value RSSMaxProcGroup () {} } Class RssBaseProcNumber { [string] $RegistryKeyword = '*RssBaseProcNumber' [int] $DisplayParameterType = 1 # 1 byte unsigned integer [int] $DefaultRegistryValue = 0 [int] $NumericParameterBaseValue = 10 # Must be this value #[int] $NumericParameterMaxValue = # System specific [int] $NumericParameterMinValue = 0 # Must be < than this value [int] $NumericParameterStepValue = 1 # Must be this value RssBaseProcNumber () {} } Class RssMaxProcNumber { [string] $RegistryKeyword = '*RssMaxProcNumber' [int] $DisplayParameterType = 1 # 1 byte unsigned integer [int] $DefaultRegistryValue = 63 [int] $NumericParameterBaseValue = 10 # Must be this value #[int] $NumericParameterMaxValue = # System specific [int] $NumericParameterMinValue = 0 # Must be < than this value [int] $NumericParameterStepValue = 1 # Must be this value RssMaxProcNumber () {} } Class RSSClass { $RSS = [RSS]::new() $MaxRSSProcessors = [MaxRSSProcessors]::new() $NumRSSQueues = [NumRSSQueues]::new() $NumaNodeId = [NumaNodeId]::new() $RssBaseProcGroup = [RssBaseProcGroup]::new() $RSSMaxProcGroup = [RSSMaxProcGroup]::new() $RssBaseProcNumber = [RssBaseProcNumber]::new() $RssMaxProcNumber = [RssMaxProcNumber]::new() $RSSProfile = [RSSProfile]::new() RSSClass () {} } #endregion RSS #region RSSOnHostVPorts Class RSSOnHostVPorts { [string] $RegistryKeyword = '*RSSOnHostVPorts' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ RSSOnHostVPorts () {} } #endregion RSSOnHostVPorts #region SpeedDuplex - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/enumeration-keywords Class SpeedDuplex { [string] $RegistryKeyword = '*SpeedDuplex' [int] $DisplayParameterType = 5 SpeedDuplex () {} } #endregion SRIOV #region SRIOV - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/standardized-inf-keywords-for-sr-iov Class SRIOV { [string] $RegistryKeyword = '*SRIOV' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ SRIOV () {} } #endregion SRIOV #region USO - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/udp-segmentation-offload-uso- Class USOIPv4 { [string] $RegistryKeyword = '*USOIPv4' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ USOIPv4 () {} } Class USOIPv6 { [string] $RegistryKeyword = '*USOIPv6' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ USOIPv6 () {} } Class USO { $USOIPv4 = [USOIPv4]::new() $USOIPv6 = [USOIPv6]::new() USO () {} } #endregion USO #region VLANID Class VLANID { [string] $RegistryKeyword = 'VLANID' [int] $DisplayParameterType = 2 # 2 byte unsigned integer [string] $DefaultRegistryValue = 0 [int] $NumericParameterBaseValue = 10 # Must be this value [int] $NumericParameterMaxValue = 4094 # Must be this value [int] $NumericParameterMinValue = 0 # Must be this value [int] $NumericParameterStepValue = 1 # Must be this value VLANID () {} } #endregion VLANID #region VMQ - https://docs.microsoft.com/en-us/windows-hardware/drivers/network/standardized-inf-keywords-for-vmq#vmq-rss Class VMQVlanFiltering { [string] $RegistryKeyword = '*VMQVlanFiltering' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ VMQVlanFiltering () {} } Class RssOrVmqPreference { [string] $RegistryKeyword = '*RssOrVmqPreference' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Disabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Disabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ RssOrVmqPreference () {} } Class VMQ { [string] $RegistryKeyword = '*VMQ' [int] $DisplayParameterType = 5 [string] $DefaultRegistryValue = [EnableDisable]::Enabled.Value__ [string] $DisplayDefaultValue = [EnableDisable]::Enabled [string[]] $ValidRegistryValues = [System.Enum]::GetValues('EnableDisable').Value__ #Device.Network.LAN.VMQ.VirtualMachineQueues VMQ () {} } Class VMQClass { $VMQ = [VMQ]::new() $VMQVlanFiltering = [VMQVlanFiltering]::new() $RssOrVmqPreference = [RssOrVmqPreference]::new() VMQClass () {} } #endregion VMQ #region VxlanUDPPortNumber Class VxlanUDPPortNumber { [string] $RegistryKeyword = '*VxlanUDPPortNumber' [int] $DisplayParameterType = '2' # 2 byte unsigned integer or greater [int] $DefaultRegistryValue = 4789 [int] $NumericParameterBaseValue = 10 # Must be this value [int] $NumericParameterMaxValue = 65535 # Must be < this value [int] $NumericParameterMinValue = 1024 # Must be this value [int] $NumericParameterStepValue = 1 # Must be this value VxlanUDPPortNumber () {} } #endregion VxlanUDPPortNumber Class AdapterDefinition { $Buffers = [Buffers]::new() # $ChecksumOffload - Not yet implemented $EncapOverhead = [EncapOverhead]::new() # $EncapsulatedPacketTaskOffload = [EncapsulatedPacketTaskOffload]::new() - Is this needed? $EncapsulatedPacketTaskOffloadNVGRE = [EncapsulatedPacketTaskOffloadNVGRE]::new() $EncapsulatedPacketTaskOffloadVxlan = [EncapsulatedPacketTaskOffloadVxlan]::new() $FlowControl = [FlowControl]::new() $InterruptModeration = [InterruptModeration]::new() $JumboPacket = [JumboPacket]::new() $LSO = [LSO]::new() $NDKPI = [NDKPI]::new() $NDIS = [NDIS]::new() $NicSwitch = [NicSwitch]::new() $PriorityVLANTag = [PriorityVLANTag]::new() $PtpHardwareTimestamp = [PtpHardwareTimestamp]::new() $QOS = [QOS]::new() $QOSOffload = [QOSOffload]::new() $RSC = [RSC]::new() $RSSClass = [RSSClass]::new() $RSSOnHostVPorts = [RSSOnHostVPorts]::new() $SpeedDuplex = [SpeedDuplex]::new() $SRIOV = [SRIOV]::new() $USO = [USO]::new() $VLANID = [VLANID]::new() $VMQClass = [VMQClass]::new() $VxlanUDPPortNumber = [VxlanUDPPortNumber]::new() } #region Requirements enum Base_WS2019_HCIv1 { PriorityVLANTag # Done FlowControl InterruptModeration JumboPacket } enum TenGbEOrGreater_WS2019_HCIv1 { RSCIPv4 # Done RSCIPv6 # Done VLANID # Done - We should move this to BASE for Server LSOv2IPV4 # Done LSOv2IPV6 # Done RSS MaxRSSProcessors NumRSSQueues RSSProfile NumaNodeId RssBaseProcGroup RSSMaxProcGroup RssBaseProcNumber RssMaxProcNumber QOS # Done VMQ VMQVlanFiltering RssOrVmqPreference # ChecksumOffload - Not yet implemented TransmitBuffers ReceiveBuffers } enum Standard_WS2019_HCIv1 { RSSOnHostVPorts SRIOV #NicSwitch - Not a keyword but should be verified VxlanUDPPortNumber EncapOverhead # EncapsulatedPacketTaskOffload - Not Implemented yet EncapsulatedPacketTaskOffloadNVGRE EncapsulatedPacketTaskOffloadVXLAN NetworkDirect NetworkDirectTechnology } enum Premium_WS2019_HCIv1 { RSSv2 #NDKm3 } enum Base_WS2022_HCIv2 { PriorityVLANTag # Done FlowControl InterruptModeration JumboPacket } enum TenGbEOrGreater_WS2022_HCIv2 { RSCIPv4 # Done RSCIPv6 # Done VLANID # Done - We should move this to BASE for Server LSOv2IPV4 # Done LSOv2IPV6 # Done RSS MaxRSSProcessors NumRSSQueues RSSProfile NumaNodeId RssBaseProcGroup RSSMaxProcGroup RssBaseProcNumber RssMaxProcNumber QOS # Done VMQ VMQVlanFiltering RssOrVmqPreference # ChecksumOffload - Not yet implemented TransmitBuffers ReceiveBuffers } enum Standard_WS2022_HCIv2 { RSSOnHostVPorts SRIOV #NicSwitch - Not a keyword but should be verified VxlanUDPPortNumber EncapOverhead # EncapsulatedPacketTaskOffload - Not Implemented yet EncapsulatedPacketTaskOffloadNVGRE EncapsulatedPacketTaskOffloadVXLAN NetworkDirect NetworkDirectTechnology #RSSv2 #NDKm3 } enum Premium_WS2022_HCIv2 { PtpHardwareTimestamp USOIPv4 USOIPv6 QosOffload } $Base = [System.Enum]::GetValues('Base_WS2019_HCIv1') | Foreach-Object { $_ } $TenGbEOrGreater = [System.Enum]::GetValues('Base_WS2019_HCIv1'), [System.Enum]::GetValues('TenGbEOrGreater_WS2019_HCIv1') | Foreach-Object { $_ } $Standard = [System.Enum]::GetValues('Base_WS2019_HCIv1'), [System.Enum]::GetValues('TenGbEOrGreater_WS2019_HCIv1'), [System.Enum]::GetValues('Standard_WS2019_HCIv1') | Foreach-Object { $_ } $Premium = [System.Enum]::GetValues('Base_WS2019_HCIv1'), [System.Enum]::GetValues('TenGbEOrGreater_WS2019_HCIv1'), [System.Enum]::GetValues('Standard_WS2019_HCIv1'), [System.Enum]::GetValues('Premium_WS2019_HCIv1') | Foreach-Object { $_ } Class WS2019_HCIv1 { $Base = [System.Enum]::GetValues('Base_WS2019_HCIv1') $TenGbEOrGreater = [System.Enum]::GetValues('Base_WS2019_HCIv1'), [System.Enum]::GetValues('TenGbEOrGreater_WS2019_HCIv1') $Standard = [System.Enum]::GetValues('Base_WS2019_HCIv1'), [System.Enum]::GetValues('TenGbEOrGreater_WS2019_HCIv1'), [System.Enum]::GetValues('Standard_WS2019_HCIv1') $Premium = [System.Enum]::GetValues('Base_WS2019_HCIv1'), [System.Enum]::GetValues('TenGbEOrGreater_WS2019_HCIv1'), [System.Enum]::GetValues('Standard_WS2019_HCIv1'), [System.Enum]::GetValues('Premium_WS2019_HCIv1') } $Base = [System.Enum]::GetValues('Base_WS2022_HCIv2') | Foreach-Object { $_ } $TenGbEOrGreater = [System.Enum]::GetValues('Base_WS2022_HCIv2'), [System.Enum]::GetValues('TenGbEOrGreater_WS2022_HCIv2') | Foreach-Object { $_ } $Standard = [System.Enum]::GetValues('Base_WS2022_HCIv2'), [System.Enum]::GetValues('TenGbEOrGreater_WS2022_HCIv2'), [System.Enum]::GetValues('Standard_WS2022_HCIv2') | Foreach-Object { $_ } $Premium = [System.Enum]::GetValues('Base_WS2022_HCIv2'), [System.Enum]::GetValues('TenGbEOrGreater_WS2022_HCIv2'), [System.Enum]::GetValues('Standard_WS2022_HCIv2'), [System.Enum]::GetValues('Premium_WS2022_HCIv2') | Foreach-Object { $_ } Class WS2022_HCIv2 { $Base = $Base $TenGbEOrGreater = $TenGbEOrGreater $Standard = $Standard $Premium = $Premium } Class Requirements { $WS2019_HCIv1 = [WS2019_HCIv1]::new() $WS2022_HCIv2 = [WS2022_HCIv2]::new() } #endregion Requirements |