dscresources/CIS_Microsoft_Windows_Server_2019_Member_Server_Release_20H2/CIS_Microsoft_Windows_Server_2019_Member_Server_Release_20H2.schema.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
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
Configuration CIS_Microsoft_Windows_Server_2019_Member_Server_Release_20H2
{
    param
    (
        [String[]]$ExcludeList = @(),
        [Boolean]$LevelOne = $true,
        [Boolean]$LevelTwo = $false,
        [Boolean]$NextGenerationWindowsSecurity = $false,
        [ValidateRange(1,60)]
        [Int32]$cis112MaximumPasswordAge = 60,
        [ValidateRange(1,998)]
        [Int32]$cis113MinimumPasswordAge = 30,
        [ValidateRange(15,99999)]
        [Int32]$cis121Accountlockoutduration = 15,
        [ValidateRange(10,999)]
        [Int32]$cis122Accountlockoutthreshold = 10,
        [ValidateRange(15,99999)]
        [Int32]$cis123Resetaccountlockoutcounterafter = 15,
        [ValidateRange(15,64)]
        [Int32]$cis1825PasswordLength = 15,
        [ValidateRange(30,365)]
        [Int32]$cis1826PasswordAgeDays = 30,
        [ValidateRange(0,90)]
        [Int32]$cis18412WarningLevel = 90,
        [ValidateSet('0','1','2','3','4','5')]
        [String]$cis1849ScreenSaverGracePeriod = '0',
        [ValidateRange(180,365)]
        [Int32]$cis18910212DeferFeatureUpdatesPeriodInDays = 180,
        [ValidateRange(32768,2147483647)]
        [Int32]$cis1892612MaxSize = 32768,
        [ValidateRange(196608,2147483647)]
        [Int32]$cis1892622MaxSize = 196608,
        [ValidateRange(32768,2147483647)]
        [Int32]$cis1892632MaxSize = 32768,
        [ValidateRange(32768,2147483647)]
        [Int32]$cis1892642MaxSize = 32768,
        [Int32]$cis189623101MaxIdleTime = 900000,
        [ValidateLength(1,256)]
        [String]$cis2315AccountsRenameadministratoraccount,
        [ValidateLength(1,256)]
        [String]$cis2316AccountsRenameguestaccount,
        [ValidateRange(1,30)]
        [Int32]$cis2365MaximumPasswordAge = 30,
        [ValidateRange(1,900)]
        [Int32]$cis2373InactivityTimeoutSecs = 900,
        [ValidateLength(1,2048)]
        [String]$cis2374LegalNoticeText,
        [ValidateLength(1,512)]
        [String]$cis2375LegalNoticeCaption,
        [ValidateSet('0','1','2','3','4')]
        [String]$cis2376CachedLogonsCount = '4',
        [ValidateLength(1,15)]
        [Int32]$cis2391AutoDisconnect = 15,
        [ValidateRange(16384,2147483647)]
        [Int32]$cis916LogFileSize = 16384,
        [ValidateRange(16384,2147483647)]
        [Int32]$cis926LogFileSize = 16384,
        [ValidateRange(16384,2147483647)]
        [Int32]$cis938LogFileSize = 16384
    )

    Import-DSCResource -ModuleName 'PSDesiredStateConfiguration'
    Import-DSCResource -ModuleName 'CISDSC' -Name 'CISService'
    Import-DSCResource -ModuleName 'AuditPolicyDSC' -ModuleVersion '1.4.0.0'
    Import-DSCResource -ModuleName 'SecurityPolicyDSC' -ModuleVersion '2.10.0.0'

    if($ExcludeList -notcontains '2.3.1.5' -and $PSBoundParameters.Keys -notcontains 'cis2315AccountsRenameadministratoraccount'){
        throw 'Please add "2.3.1.5" to the ExcludeList or provide a value for "cis2315AccountsRenameadministratoraccount"'
    }
    if($ExcludeList -notcontains '2.3.1.6' -and $PSBoundParameters.Keys -notcontains 'cis2316AccountsRenameguestaccount'){
        throw 'Please add "2.3.1.6" to the ExcludeList or provide a value for "cis2316AccountsRenameguestaccount"'
    }
    if($ExcludeList -notcontains '2.3.7.4' -and $PSBoundParameters.Keys -notcontains 'cis2374LegalNoticeText'){
        throw 'Please add "2.3.7.4" to the ExcludeList or provide a value for "cis2374LegalNoticeText"'
    }
    if($ExcludeList -notcontains '2.3.7.5' -and $PSBoundParameters.Keys -notcontains 'cis2375LegalNoticeCaption'){
        throw 'Please add "2.3.7.5" to the ExcludeList or provide a value for "cis2375LegalNoticeCaption"'
    }

    if($ExcludeList -notcontains '1.1.1' -and $LevelOne){
        AccountPolicy "1.1.1 - (L1) Ensure Enforce password history is set to 24 or more password(s)" {
            Enforce_password_history = 24
            Name = 'Enforce_password_history'
        }
    }
    if($ExcludeList -notcontains '1.1.2' -and $LevelOne){
        AccountPolicy "1.1.2 - (L1) Ensure Maximum password age is set to 60 or fewer days but not 0" {
            Maximum_Password_Age = $cis112MaximumPasswordAge
            Name = 'Maximum_Password_Age'
        }
    }
    if($ExcludeList -notcontains '1.1.3' -and $LevelOne){
        AccountPolicy "1.1.3 - (L1) Ensure Minimum password age is set to 1 or more day(s)" {
            Minimum_Password_Age = $cis113MinimumPasswordAge
            Name = 'Minimum_Password_Age'
        }
    }
    if($ExcludeList -notcontains '1.1.4' -and $LevelOne){
        AccountPolicy "1.1.4 - (L1) Ensure Minimum password length is set to 14 or more character(s)" {
            Minimum_Password_Length = 14
            Name = 'Minimum_Password_Length'
        }
    }
    if($ExcludeList -notcontains '1.1.5' -and $LevelOne){
        AccountPolicy "1.1.5 - (L1) Ensure Password must meet complexity requirements is set to Enabled" {
            Name = 'Password_must_meet_complexity_requirements'
            Password_must_meet_complexity_requirements = 'Enabled'
        }
    }
    if($ExcludeList -notcontains '1.1.6' -and $LevelOne){
        AccountPolicy "1.1.6 - (L1) Ensure Store passwords using reversible encryption is set to Disabled" {
            Name = 'Store_passwords_using_reversible_encryption'
            Store_passwords_using_reversible_encryption = 'Disabled'
        }
    }
    if($ExcludeList -notcontains '1.2.1' -and $LevelOne){
        AccountPolicy "1.2.1 - (L1) Ensure Account lockout duration is set to 15 or more minute(s)" {
            Account_lockout_duration = $cis121Accountlockoutduration
            Name = 'Account_lockout_duration'
        }
    }
    if($ExcludeList -notcontains '1.2.2' -and $LevelOne){
        AccountPolicy "1.2.2 - (L1) Ensure Account lockout threshold is set to 10 or fewer invalid logon attempt(s) but not 0" {
            Account_lockout_threshold = $cis122Accountlockoutthreshold
            Name = 'Account_lockout_threshold'
        }
    }
    if($ExcludeList -notcontains '1.2.3' -and $LevelOne){
        AccountPolicy "1.2.3 - (L1) Ensure Reset account lockout counter after is set to 15 or more minute(s)" {
            Name = 'Reset_account_lockout_counter_after'
            Reset_account_lockout_counter_after = $cis123Resetaccountlockoutcounterafter
        }
    }
    if($ExcludeList -notcontains '2.2.1' -and $LevelOne){
        UserRightsAssignment "2.2.1 - (L1) Ensure Access Credential Manager as a trusted caller is set to No One" {
            Force = $true
            Identity = @('')
            Policy = 'Access_Credential_Manager_as_a_trusted_caller'
        }
    }
    if($ExcludeList -notcontains '2.2.3' -and $LevelOne){
        UserRightsAssignment "2.2.3 - (L1) Ensure Access this computer from the network is set to Administrators Authenticated Users (MS only)" {
            Force = $true
            Identity = @('*S-1-5-11','*S-1-5-32-544')
            Policy = 'Access_this_computer_from_the_network'
        }
    }
    if($ExcludeList -notcontains '2.2.4' -and $LevelOne){
        UserRightsAssignment "2.2.4 - (L1) Ensure Act as part of the operating system is set to No One" {
            Force = $true
            Identity = @('')
            Policy = 'Act_as_part_of_the_operating_system'
        }
    }
    if($ExcludeList -notcontains '2.2.6' -and $LevelOne){
        UserRightsAssignment "2.2.6 - (L1) Ensure Adjust memory quotas for a process is set to Administrators LOCAL SERVICE NETWORK SERVICE" {
            Force = $true
            Identity = @('*S-1-5-19','*S-1-5-20','*S-1-5-32-544')
            Policy = 'Adjust_memory_quotas_for_a_process'
        }
    }
    if($ExcludeList -notcontains '2.2.7' -and $LevelOne){
        UserRightsAssignment "2.2.7 - (L1) Ensure Allow log on locally is set to Administrators" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Allow_log_on_locally'
        }
    }
    if($ExcludeList -notcontains '2.2.9' -and $LevelOne){
        UserRightsAssignment "2.2.9 - (L1) Ensure Allow log on through Remote Desktop Services is set to Administrators Remote Desktop Users (MS only)" {
            Force = $true
            Identity = @('*S-1-5-32-544','*S-1-5-32-555')
            Policy = 'Allow_log_on_through_Remote_Desktop_Services'
        }
    }
    if($ExcludeList -notcontains '2.2.10' -and $LevelOne){
        UserRightsAssignment "2.2.10 - (L1) Ensure Back up files and directories is set to Administrators" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Back_up_files_and_directories'
        }
    }
    if($ExcludeList -notcontains '2.2.11' -and $LevelOne){
        UserRightsAssignment "2.2.11 - (L1) Ensure Change the system time is set to Administrators LOCAL SERVICE" {
            Force = $true
            Identity = @('*S-1-5-19','*S-1-5-32-544')
            Policy = 'Change_the_system_time'
        }
    }
    if($ExcludeList -notcontains '2.2.12' -and $LevelOne){
        UserRightsAssignment "2.2.12 - (L1) Ensure Change the time zone is set to Administrators LOCAL SERVICE" {
            Force = $true
            Identity = @('*S-1-5-19','*S-1-5-32-544')
            Policy = 'Change_the_time_zone'
        }
    }
    if($ExcludeList -notcontains '2.2.13' -and $LevelOne){
        UserRightsAssignment "2.2.13 - (L1) Ensure Create a pagefile is set to Administrators" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Create_a_pagefile'
        }
    }
    if($ExcludeList -notcontains '2.2.14' -and $LevelOne){
        UserRightsAssignment "2.2.14 - (L1) Ensure Create a token object is set to No One" {
            Force = $true
            Identity = @('')
            Policy = 'Create_a_token_object'
        }
    }
    if($ExcludeList -notcontains '2.2.15' -and $LevelOne){
        UserRightsAssignment "2.2.15 - (L1) Ensure Create global objects is set to Administrators LOCAL SERVICE NETWORK SERVICE SERVICE" {
            Force = $true
            Identity = @('*S-1-5-19','*S-1-5-20','*S-1-5-32-544','*S-1-5-6')
            Policy = 'Create_global_objects'
        }
    }
    if($ExcludeList -notcontains '2.2.16' -and $LevelOne){
        UserRightsAssignment "2.2.16 - (L1) Ensure Create permanent shared objects is set to No One" {
            Force = $true
            Identity = @('')
            Policy = 'Create_permanent_shared_objects'
        }
    }
    if($ExcludeList -notcontains '2.2.18' -and $LevelOne){
        UserRightsAssignment "2.2.18 - (L1) Ensure Create symbolic links is set to Administrators NT VIRTUAL MACHINEVirtual Machines (MS only)" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Create_symbolic_links'
        }
    }
    if($ExcludeList -notcontains '2.2.19' -and $LevelOne){
        UserRightsAssignment "2.2.19 - (L1) Ensure Debug programs is set to Administrators" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Debug_programs'
        }
    }
    if($ExcludeList -notcontains '2.2.21' -and $LevelOne){
        UserRightsAssignment "2.2.21 - (L1) Ensure Deny access to this computer from the network to include Guests Local account and member of Administrators group (MS only)" {
            Force = $true
            Identity = @('*S-1-5-114','*S-1-5-32-546')
            Policy = 'Deny_access_to_this_computer_from_the_network'
        }
    }
    if($ExcludeList -notcontains '2.2.22' -and $LevelOne){
        UserRightsAssignment "2.2.22 - (L1) Ensure Deny log on as a batch job to include Guests" {
            Force = $true
            Identity = @('*S-1-5-32-546')
            Policy = 'Deny_log_on_as_a_batch_job'
        }
    }
    if($ExcludeList -notcontains '2.2.23' -and $LevelOne){
        UserRightsAssignment "2.2.23 - (L1) Ensure Deny log on as a service to include Guests" {
            Force = $true
            Identity = @('*S-1-5-32-546')
            Policy = 'Deny_log_on_as_a_service'
        }
    }
    if($ExcludeList -notcontains '2.2.24' -and $LevelOne){
        UserRightsAssignment "2.2.24 - (L1) Ensure Deny log on locally to include Guests" {
            Force = $true
            Identity = @('*S-1-5-32-546')
            Policy = 'Deny_log_on_locally'
        }
    }
    if($ExcludeList -notcontains '2.2.26' -and $LevelOne){
        UserRightsAssignment "2.2.26 - (L1) Ensure Deny log on through Remote Desktop Services is set to Guests Local account (MS only)" {
            Force = $true
            Identity = @('*S-1-5-113','*S-1-5-32-546')
            Policy = 'Deny_log_on_through_Remote_Desktop_Services'
        }
    }
    if($ExcludeList -notcontains '2.2.28' -and $LevelOne){
        UserRightsAssignment "2.2.28 - (L1) Ensure Enable computer and user accounts to be trusted for delegation is set to No One (MS only)" {
            Force = $true
            Identity = @('')
            Policy = 'Enable_computer_and_user_accounts_to_be_trusted_for_delegation'
        }
    }
    if($ExcludeList -notcontains '2.2.29' -and $LevelOne){
        UserRightsAssignment "2.2.29 - (L1) Ensure Force shutdown from a remote system is set to Administrators" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Force_shutdown_from_a_remote_system'
        }
    }
    if($ExcludeList -notcontains '2.2.30' -and $LevelOne){
        UserRightsAssignment "2.2.30 - (L1) Ensure Generate security audits is set to LOCAL SERVICE NETWORK SERVICE" {
            Force = $true
            Identity = @('*S-1-5-19','*S-1-5-20')
            Policy = 'Generate_security_audits'
        }
    }
    if($ExcludeList -notcontains '2.2.32' -and $LevelOne){
        UserRightsAssignment "2.2.32 - (L1) Ensure Impersonate a client after authentication is set to Administrators LOCAL SERVICE NETWORK SERVICE SERVICE and (when the Web Server (IIS) Role with Web Services Role Service is installed) IISIUSRS (MS only)" {
            Force = $true
            Identity = @('*S-1-5-19','*S-1-5-20','*S-1-5-32-544','*S-1-5-6')
            Policy = 'Impersonate_a_client_after_authentication'
        }
    }
    if($ExcludeList -notcontains '2.2.33' -and $LevelOne){
        UserRightsAssignment "2.2.33 - (L1) Ensure Increase scheduling priority is set to Administrators Window ManagerWindow Manager Group" {
            Force = $true
            Identity = @('*S-1-5-32-544','*S-1-5-90-0')
            Policy = 'Increase_scheduling_priority'
        }
    }
    if($ExcludeList -notcontains '2.2.34' -and $LevelOne){
        UserRightsAssignment "2.2.34 - (L1) Ensure Load and unload device drivers is set to Administrators" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Load_and_unload_device_drivers'
        }
    }
    if($ExcludeList -notcontains '2.2.35' -and $LevelOne){
        UserRightsAssignment "2.2.35 - (L1) Ensure Lock pages in memory is set to No One" {
            Force = $true
            Identity = @('')
            Policy = 'Lock_pages_in_memory'
        }
    }
    if($ExcludeList -notcontains '2.2.38' -and $LevelOne){
        UserRightsAssignment "2.2.38 - (L1) Ensure Manage auditing and security log is set to Administrators (MS only)" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Manage_auditing_and_security_log'
        }
    }
    if($ExcludeList -notcontains '2.2.39' -and $LevelOne){
        UserRightsAssignment "2.2.39 - (L1) Ensure Modify an object label is set to No One" {
            Force = $true
            Identity = @('')
            Policy = 'Modify_an_object_label'
        }
    }
    if($ExcludeList -notcontains '2.2.40' -and $LevelOne){
        UserRightsAssignment "2.2.40 - (L1) Ensure Modify firmware environment values is set to Administrators" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Modify_firmware_environment_values'
        }
    }
    if($ExcludeList -notcontains '2.2.41' -and $LevelOne){
        UserRightsAssignment "2.2.41 - (L1) Ensure Perform volume maintenance tasks is set to Administrators" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Perform_volume_maintenance_tasks'
        }
    }
    if($ExcludeList -notcontains '2.2.42' -and $LevelOne){
        UserRightsAssignment "2.2.42 - (L1) Ensure Profile single process is set to Administrators" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Profile_single_process'
        }
    }
    if($ExcludeList -notcontains '2.2.43' -and $LevelOne){
        UserRightsAssignment "2.2.43 - (L1) Ensure Profile system performance is set to Administrators NT SERVICEWdiServiceHost" {
            Force = $true
            Identity = @('*S-1-5-32-544','*S-1-5-80-3139157870-2983391045-3678747466-658725712-1809340420')
            Policy = 'Profile_system_performance'
        }
    }
    if($ExcludeList -notcontains '2.2.44' -and $LevelOne){
        UserRightsAssignment "2.2.44 - (L1) Ensure Replace a process level token is set to LOCAL SERVICE NETWORK SERVICE" {
            Force = $true
            Identity = @('*S-1-5-19','*S-1-5-20')
            Policy = 'Replace_a_process_level_token'
        }
    }
    if($ExcludeList -notcontains '2.2.45' -and $LevelOne){
        UserRightsAssignment "2.2.45 - (L1) Ensure Restore files and directories is set to Administrators" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Restore_files_and_directories'
        }
    }
    if($ExcludeList -notcontains '2.2.46' -and $LevelOne){
        UserRightsAssignment "2.2.46 - (L1) Ensure Shut down the system is set to Administrators" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Shut_down_the_system'
        }
    }
    if($ExcludeList -notcontains '2.2.48' -and $LevelOne){
        UserRightsAssignment "2.2.48 - (L1) Ensure Take ownership of files or other objects is set to Administrators" {
            Force = $true
            Identity = @('*S-1-5-32-544')
            Policy = 'Take_ownership_of_files_or_other_objects'
        }
    }
    if($ExcludeList -notcontains '2.3.1.1' -and $LevelOne){
        SecurityOption "2.3.1.1 - (L1) Ensure Accounts Administrator account status is set to Disabled (MS only)" {
            Accounts_Administrator_account_status = 'Disabled'
            Name = 'Accounts_Administrator_account_status'
        }
    }
    if($ExcludeList -notcontains '2.3.1.2' -and $LevelOne){
        Registry "2.3.1.2 - (L1) Ensure Accounts Block Microsoft accounts is set to Users cant add or log on with Microsoft accounts" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 3
            ValueName = 'NoConnectedUser'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.1.3' -and $LevelOne){
        SecurityOption "2.3.1.3 - (L1) Ensure Accounts Guest account status is set to Disabled (MS only)" {
            Accounts_Guest_account_status = 'Disabled'
            Name = 'Accounts_Guest_account_status'
        }
    }
    if($ExcludeList -notcontains '2.3.1.4' -and $LevelOne){
        Registry "2.3.1.4 - (L1) Ensure Accounts Limit local account use of blank passwords to console logon only is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa'
            ValueData = 1
            ValueName = 'LimitBlankPasswordUse'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.1.5' -and $LevelOne){
        SecurityOption "2.3.1.5 - (L1) Configure Accounts Rename administrator account" {
            Accounts_Rename_administrator_account = $cis2315AccountsRenameadministratoraccount
            Name = 'Accounts_Rename_administrator_account'
        }
    }
    if($ExcludeList -notcontains '2.3.1.6' -and $LevelOne){
        SecurityOption "2.3.1.6 - (L1) Configure Accounts Rename guest account" {
            Accounts_Rename_guest_account = $cis2316AccountsRenameguestaccount
            Name = 'Accounts_Rename_guest_account'
        }
    }
    if($ExcludeList -notcontains '2.3.2.1' -and $LevelOne){
        Registry "2.3.2.1 - (L1) Ensure Audit Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa'
            ValueData = 1
            ValueName = 'SCENoApplyLegacyAuditPolicy'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.2.2' -and $LevelOne){
        Registry "2.3.2.2 - (L1) Ensure Audit Shut down system immediately if unable to log security audits is set to Disabled" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa'
            ValueData = 0
            ValueName = 'CrashOnAuditFail'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.4.1' -and $LevelOne){
        Registry "2.3.4.1 - (L1) Ensure Devices Allowed to format and eject removable media is set to Administrators" {
            Key = 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon'
            ValueData = "0"
            ValueName = 'AllocateDASD'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '2.3.4.2' -and $LevelOne){
        Registry "2.3.4.2 - (L1) Ensure Devices Prevent users from installing printer drivers is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Print\Providers\LanMan Print Services\Servers'
            ValueData = 1
            ValueName = 'AddPrinterDrivers'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.6.1' -and $LevelOne){
        Registry "2.3.6.1 - (L1) Ensure Domain member Digitally encrypt or sign secure channel data (always) is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Services\Netlogon\Parameters'
            ValueData = 1
            ValueName = 'RequireSignOrSeal'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.6.2' -and $LevelOne){
        Registry "2.3.6.2 - (L1) Ensure Domain member Digitally encrypt secure channel data (when possible) is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Services\Netlogon\Parameters'
            ValueData = 1
            ValueName = 'SealSecureChannel'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.6.3' -and $LevelOne){
        Registry "2.3.6.3 - (L1) Ensure Domain member Digitally sign secure channel data (when possible) is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Services\Netlogon\Parameters'
            ValueData = 1
            ValueName = 'SignSecureChannel'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.6.4' -and $LevelOne){
        Registry "2.3.6.4 - (L1) Ensure Domain member Disable machine account password changes is set to Disabled" {
            Key = 'HKLM:\System\CurrentControlSet\Services\Netlogon\Parameters'
            ValueData = 0
            ValueName = 'DisablePasswordChange'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.6.5' -and $LevelOne){
        Registry "2.3.6.5 - (L1) Ensure Domain member Maximum machine account password age is set to 30 or fewer days but not 0" {
            Key = 'HKLM:\System\CurrentControlSet\Services\Netlogon\Parameters'
            ValueData = $cis2365MaximumPasswordAge
            ValueName = 'MaximumPasswordAge'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.6.6' -and $LevelOne){
        Registry "2.3.6.6 - (L1) Ensure Domain member Require strong (Windows 2000 or later) session key is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Services\Netlogon\Parameters'
            ValueData = 1
            ValueName = 'RequireStrongKey'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.7.1' -and $LevelOne){
        Registry "2.3.7.1 - (L1) Ensure Interactive logon Do not require CTRLALTDEL is set to Disabled" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 0
            ValueName = 'DisableCAD'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.7.2' -and $LevelOne){
        Registry "2.3.7.2 - (L1) Ensure Interactive logon Dont display last signed-in is set to Enabled" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 1
            ValueName = 'DontDisplayLastUserName'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.7.3' -and $LevelOne){
        Registry "2.3.7.3 - (L1) Ensure Interactive logon Machine inactivity limit is set to 900 or fewer second(s) but not 0" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = $cis2373InactivityTimeoutSecs
            ValueName = 'InactivityTimeoutSecs'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.7.4' -and $LevelOne){
        Registry "2.3.7.4 - (L1) Configure Interactive logon Message text for users attempting to log on" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = $cis2374LegalNoticeText
            ValueName = 'LegalNoticeText'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '2.3.7.5' -and $LevelOne){
        Registry "2.3.7.5 - (L1) Configure Interactive logon Message title for users attempting to log on" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = $cis2375LegalNoticeCaption
            ValueName = 'LegalNoticeCaption'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '2.3.7.6' -and $LevelTwo){
        Registry "2.3.7.6 - (L2) Ensure Interactive logon Number of previous logons to cache (in case domain controller is not available) is set to 4 or fewer logon(s) (MS only)" {
            Key = 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon'
            ValueData = $cis2376CachedLogonsCount
            ValueName = 'CachedLogonsCount'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '2.3.7.7' -and $LevelOne){
        Registry "2.3.7.7 - (L1) Ensure Interactive logon Prompt user to change password before expiration is set to between 5 and 14 days" {
            Key = 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon'
            ValueData = 14
            ValueName = 'PasswordExpiryWarning'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.7.8' -and $LevelOne){
        Registry "2.3.7.8 - (L1) Ensure Interactive logon Require Domain Controller Authentication to unlock workstation is set to Enabled (MS only)" {
            Key = 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon'
            ValueData = 1
            ValueName = 'ForceUnlockLogon'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.7.9' -and $LevelOne){
        Registry "2.3.7.9 - (L1) Ensure Interactive logon Smart card removal behavior is set to Lock Workstation or higher" {
            Key = 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon'
            ValueData = "1"
            ValueName = 'ScRemoveOption'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '2.3.8.1' -and $LevelOne){
        Registry "2.3.8.1 - (L1) Ensure Microsoft network client Digitally sign communications (always) is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Services\LanmanWorkstation\Parameters'
            ValueData = 1
            ValueName = 'RequireSecuritySignature'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.8.2' -and $LevelOne){
        Registry "2.3.8.2 - (L1) Ensure Microsoft network client Digitally sign communications (if server agrees) is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Services\LanmanWorkstation\Parameters'
            ValueData = 1
            ValueName = 'EnableSecuritySignature'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.8.3' -and $LevelOne){
        Registry "2.3.8.3 - (L1) Ensure Microsoft network client Send unencrypted password to third-party SMB servers is set to Disabled" {
            Key = 'HKLM:\System\CurrentControlSet\Services\LanmanWorkstation\Parameters'
            ValueData = 0
            ValueName = 'EnablePlainTextPassword'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.9.1' -and $LevelOne){
        Registry "2.3.9.1 - (L1) Ensure Microsoft network server Amount of idle time required before suspending session is set to 15 or fewer minute(s)" {
            Key = 'HKLM:\System\CurrentControlSet\Services\LanManServer\Parameters'
            ValueData = $cis2391AutoDisconnect
            ValueName = 'AutoDisconnect'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.9.2' -and $LevelOne){
        Registry "2.3.9.2 - (L1) Ensure Microsoft network server Digitally sign communications (always) is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Services\LanManServer\Parameters'
            ValueData = 1
            ValueName = 'RequireSecuritySignature'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.9.3' -and $LevelOne){
        Registry "2.3.9.3 - (L1) Ensure Microsoft network server Digitally sign communications (if client agrees) is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Services\LanManServer\Parameters'
            ValueData = 1
            ValueName = 'EnableSecuritySignature'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.9.4' -and $LevelOne){
        Registry "2.3.9.4 - (L1) Ensure Microsoft network server Disconnect clients when logon hours expire is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Services\LanManServer\Parameters'
            ValueData = 1
            ValueName = 'EnableForcedLogOff'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.9.5' -and $LevelOne){
        Registry "2.3.9.5 - (L1) Ensure Microsoft network server Server SPN target name validation level is set to Accept if provided by client or higher (MS only)" {
            Key = 'HKLM:\System\CurrentControlSet\Services\LanManServer\Parameters'
            ValueData = 1
            ValueName = 'SmbServerNameHardeningLevel'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.10.1' -and $LevelOne){
        SecurityOption "2.3.10.1 - (L1) Ensure Network access Allow anonymous SIDName translation is set to Disabled" {
            Name = 'Network_access_Allow_anonymous_SID_Name_translation'
            Network_access_Allow_anonymous_SID_Name_translation = 'Disabled'
        }
    }
    if($ExcludeList -notcontains '2.3.10.2' -and $LevelOne){
        Registry "2.3.10.2 - (L1) Ensure Network access Do not allow anonymous enumeration of SAM accounts is set to Enabled (MS only)" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa'
            ValueData = 1
            ValueName = 'RestrictAnonymousSAM'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.10.3' -and $LevelOne){
        Registry "2.3.10.3 - (L1) Ensure Network access Do not allow anonymous enumeration of SAM accounts and shares is set to Enabled (MS only)" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa'
            ValueData = 1
            ValueName = 'RestrictAnonymous'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.10.4' -and $LevelTwo){
        Registry "2.3.10.4 - (L2) Ensure Network access Do not allow storage of passwords and credentials for network authentication is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa'
            ValueData = 1
            ValueName = 'DisableDomainCreds'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.10.5' -and $LevelOne){
        Registry "2.3.10.5 - (L1) Ensure Network access Let Everyone permissions apply to anonymous users is set to Disabled" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa'
            ValueData = 0
            ValueName = 'EveryoneIncludesAnonymous'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.10.7' -and $LevelOne){
        Registry "2.3.10.7 - (L1) Configure Network access Named Pipes that can be accessed anonymously (MS only)" {
            Key = 'HKLM:\System\CurrentControlSet\Services\LanManServer\Parameters'
            ValueData = @('')
            ValueName = 'NullSessionPipes'
            ValueType = 'MultiString'
        }
    }
    if($ExcludeList -notcontains '2.3.10.8' -and $LevelOne){
        Registry "2.3.10.8 - (L1) Configure Network access Remotely accessible registry paths is configured" {
            Key = 'HKLM:\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedExactPaths'
            ValueData = @('System\CurrentControlSet\Control\ProductOptions','System\CurrentControlSet\Control\Server Applications','Software\Microsoft\Windows NT\CurrentVersion')
            ValueName = 'Machine'
            ValueType = 'MultiString'
        }
    }
    if($ExcludeList -notcontains '2.3.10.9' -and $LevelOne){
        Registry "2.3.10.9 - (L1) Configure Network access Remotely accessible registry paths and sub-paths is configured" {
            Key = 'HKLM:\System\CurrentControlSet\Control\SecurePipeServers\Winreg\AllowedPaths'
            ValueData = @('Software\Microsoft\Windows NT\CurrentVersion\Print','Software\Microsoft\Windows NT\CurrentVersion\Windows','System\CurrentControlSet\Control\Print\Printers','System\CurrentControlSet\Services\Eventlog','Software\Microsoft\OLAP Server','System\CurrentControlSet\Control\ContentIndex','System\CurrentControlSet\Control\Terminal Server','System\CurrentControlSet\Control\Terminal Server\UserConfig','System\CurrentControlSet\Control\Terminal Server\DefaultUserConfiguration','Software\Microsoft\Windows NT\CurrentVersion\Perflib','System\CurrentControlSet\Services\SysmonLog')
            ValueName = 'Machine'
            ValueType = 'MultiString'
        }
    }
    if($ExcludeList -notcontains '2.3.10.10' -and $LevelOne){
        Registry "2.3.10.10 - (L1) Ensure Network access Restrict anonymous access to Named Pipes and Shares is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Services\LanManServer\Parameters'
            ValueData = 1
            ValueName = 'RestrictNullSessAccess'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.10.11' -and $LevelOne){
        Registry "2.3.10.11 - (L1) Ensure Network access Restrict clients allowed to make remote calls to SAM is set to Administrators Remote Access Allow (MS only)" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa'
            ValueData = "O:BAG:BAD:(A;;RC;;;BA)"
            ValueName = 'RestrictRemoteSAM'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '2.3.10.12' -and $LevelOne){
        Registry "2.3.10.12 - (L1) Ensure Network access Shares that can be accessed anonymously is set to None" {
            Key = 'HKLM:\System\CurrentControlSet\Services\LanManServer\Parameters'
            ValueData = @('')
            ValueName = 'NullSessionShares'
            ValueType = 'MultiString'
        }
    }
    if($ExcludeList -notcontains '2.3.10.13' -and $LevelOne){
        Registry "2.3.10.13 - (L1) Ensure Network access Sharing and security model for local accounts is set to Classic - local users authenticate as themselves" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa'
            ValueData = 0
            ValueName = 'ForceGuest'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.11.1' -and $LevelOne){
        Registry "2.3.11.1 - (L1) Ensure Network security Allow Local System to use computer identity for NTLM is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa'
            ValueData = 1
            ValueName = 'UseMachineId'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.11.2' -and $LevelOne){
        Registry "2.3.11.2 - (L1) Ensure Network security Allow LocalSystem NULL session fallback is set to Disabled" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa\MSV1_0'
            ValueData = 0
            ValueName = 'allownullsessionfallback'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.11.3' -and $LevelOne){
        Registry "2.3.11.3 - (L1) Ensure Network Security Allow PKU2U authentication requests to this computer to use online identities is set to Disabled" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa\pku2u'
            ValueData = 0
            ValueName = 'AllowOnlineID'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.11.4' -and $LevelOne){
        Registry "2.3.11.4 - (L1) Ensure Network security Configure encryption types allowed for Kerberos is set to AES128HMACSHA1 AES256HMACSHA1 Future encryption types" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters'
            ValueData = 2147483640
            ValueName = 'SupportedEncryptionTypes'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.11.5' -and $LevelOne){
        Registry "2.3.11.5 - (L1) Ensure Network security Do not store LAN Manager hash value on next password change is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa'
            ValueData = 1
            ValueName = 'NoLMHash'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.11.6' -and $LevelOne){
        SecurityOption "2.3.11.6 - (L1) Ensure Network security Force logoff when logon hours expire is set to Enabled" {
            Name = 'Network_security_Force_logoff_when_logon_hours_expire'
            Network_security_Force_logoff_when_logon_hours_expire = 'Enabled'
        }
    }
    if($ExcludeList -notcontains '2.3.11.7' -and $LevelOne){
        Registry "2.3.11.7 - (L1) Ensure Network security LAN Manager authentication level is set to Send NTLMv2 response only. Refuse LM NTLM" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa'
            ValueData = 5
            ValueName = 'LmCompatibilityLevel'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.11.8' -and $LevelOne){
        Registry "2.3.11.8 - (L1) Ensure Network security LDAP client signing requirements is set to Negotiate signing or higher" {
            Key = 'HKLM:\System\CurrentControlSet\Services\LDAP'
            ValueData = 1
            ValueName = 'LDAPClientIntegrity'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.11.9' -and $LevelOne){
        Registry "2.3.11.9 - (L1) Ensure Network security Minimum session security for NTLM SSP based (including secure RPC) clients is set to Require NTLMv2 session security Require 128-bit encryption" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa\MSV1_0'
            ValueData = 537395200
            ValueName = 'NTLMMinClientSec'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.11.10' -and $LevelOne){
        Registry "2.3.11.10 - (L1) Ensure Network security Minimum session security for NTLM SSP based (including secure RPC) servers is set to Require NTLMv2 session security Require 128-bit encryption" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Lsa\MSV1_0'
            ValueData = 537395200
            ValueName = 'NTLMMinServerSec'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.13.1' -and $LevelOne){
        Registry "2.3.13.1 - (L1) Ensure Shutdown Allow system to be shut down without having to log on is set to Disabled" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 0
            ValueName = 'ShutdownWithoutLogon'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.15.1' -and $LevelOne){
        Registry "2.3.15.1 - (L1) Ensure System objects Require case insensitivity for non-Windows subsystems is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Session Manager\Kernel'
            ValueData = 1
            ValueName = 'ObCaseInsensitive'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.15.2' -and $LevelOne){
        Registry "2.3.15.2 - (L1) Ensure System objects Strengthen default permissions of internal system objects (e.g. Symbolic Links) is set to Enabled" {
            Key = 'HKLM:\System\CurrentControlSet\Control\Session Manager'
            ValueData = 1
            ValueName = 'ProtectionMode'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.17.1' -and $LevelOne){
        Registry "2.3.17.1 - (L1) Ensure User Account Control Admin Approval Mode for the Built-in Administrator account is set to Enabled" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 1
            ValueName = 'FilterAdministratorToken'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.17.2' -and $LevelOne){
        Registry "2.3.17.2 - (L1) Ensure User Account Control Behavior of the elevation prompt for administrators in Admin Approval Mode is set to Prompt for consent on the secure desktop" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 2
            ValueName = 'ConsentPromptBehaviorAdmin'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.17.3' -and $LevelOne){
        Registry "2.3.17.3 - (L1) Ensure User Account Control Behavior of the elevation prompt for standard users is set to Automatically deny elevation requests" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 0
            ValueName = 'ConsentPromptBehaviorUser'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.17.4' -and $LevelOne){
        Registry "2.3.17.4 - (L1) Ensure User Account Control Detect application installations and prompt for elevation is set to Enabled" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 1
            ValueName = 'EnableInstallerDetection'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.17.5' -and $LevelOne){
        Registry "2.3.17.5 - (L1) Ensure User Account Control Only elevate UIAccess applications that are installed in secure locations is set to Enabled" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 1
            ValueName = 'EnableSecureUIAPaths'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.17.6' -and $LevelOne){
        Registry "2.3.17.6 - (L1) Ensure User Account Control Run all administrators in Admin Approval Mode is set to Enabled" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 1
            ValueName = 'EnableLUA'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.17.7' -and $LevelOne){
        Registry "2.3.17.7 - (L1) Ensure User Account Control Switch to the secure desktop when prompting for elevation is set to Enabled" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 1
            ValueName = 'PromptOnSecureDesktop'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '2.3.17.8' -and $LevelOne){
        Registry "2.3.17.8 - (L1) Ensure User Account Control Virtualize file and registry write failures to per-user locations is set to Enabled" {
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 1
            ValueName = 'EnableVirtualization'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.1.1' -and $LevelOne){
        Registry "9.1.1 - (L1) Ensure Windows Firewall Domain Firewall state is set to On (recommended)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\DomainProfile'
            ValueData = 1
            ValueName = 'EnableFirewall'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.1.2' -and $LevelOne){
        Registry "9.1.2 - (L1) Ensure Windows Firewall Domain Inbound connections is set to Block (default)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\DomainProfile'
            ValueData = 1
            ValueName = 'DefaultInboundAction'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.1.3' -and $LevelOne){
        Registry "9.1.3 - (L1) Ensure Windows Firewall Domain Outbound connections is set to Allow (default)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\DomainProfile'
            ValueData = 0
            ValueName = 'DefaultOutboundAction'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.1.4' -and $LevelOne){
        Registry "9.1.4 - (L1) Ensure Windows Firewall Domain Settings Display a notification is set to No" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\DomainProfile'
            ValueData = 1
            ValueName = 'DisableNotifications'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.1.5' -and $LevelOne){
        Registry "9.1.5 - (L1) Ensure Windows Firewall Domain Logging Name is set to SystemRootSystem32logfilesfirewalldomainfw.log" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging'
            ValueData = '%systemroot%\system32\LogFiles\Firewall\domainfw.log'
            ValueName = 'LogFilePath'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '9.1.6' -and $LevelOne){
        Registry "9.1.6 - (L1) Ensure Windows Firewall Domain Logging Size limit (KB) is set to 16384 KB or greater" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging'
            ValueData = $cis916LogFileSize
            ValueName = 'LogFileSize'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.1.7' -and $LevelOne){
        Registry "9.1.7 - (L1) Ensure Windows Firewall Domain Logging Log dropped packets is set to Yes" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging'
            ValueData = 1
            ValueName = 'LogDroppedPackets'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.1.8' -and $LevelOne){
        Registry "9.1.8 - (L1) Ensure Windows Firewall Domain Logging Log successful connections is set to Yes" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging'
            ValueData = 1
            ValueName = 'LogSuccessfulConnections'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.2.1' -and $LevelOne){
        Registry "9.2.1 - (L1) Ensure Windows Firewall Private Firewall state is set to On (recommended)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PrivateProfile'
            ValueData = 1
            ValueName = 'EnableFirewall'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.2.2' -and $LevelOne){
        Registry "9.2.2 - (L1) Ensure Windows Firewall Private Inbound connections is set to Block (default)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PrivateProfile'
            ValueData = 1
            ValueName = 'DefaultInboundAction'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.2.3' -and $LevelOne){
        Registry "9.2.3 - (L1) Ensure Windows Firewall Private Outbound connections is set to Allow (default)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PrivateProfile'
            ValueData = 0
            ValueName = 'DefaultOutboundAction'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.2.4' -and $LevelOne){
        Registry "9.2.4 - (L1) Ensure Windows Firewall Private Settings Display a notification is set to No" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PrivateProfile'
            ValueData = 1
            ValueName = 'DisableNotifications'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.2.5' -and $LevelOne){
        Registry "9.2.5 - (L1) Ensure Windows Firewall Private Logging Name is set to SystemRootSystem32logfilesfirewallprivatefw.log" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging'
            ValueData = '%systemroot%\system32\logfiles\firewall\privatefw.log'
            ValueName = 'LogFilePath'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '9.2.6' -and $LevelOne){
        Registry "9.2.6 - (L1) Ensure Windows Firewall Private Logging Size limit (KB) is set to 16384 KB or greater" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging'
            ValueData = $cis926LogFileSize
            ValueName = 'LogFileSize'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.2.7' -and $LevelOne){
        Registry "9.2.7 - (L1) Ensure Windows Firewall Private Logging Log dropped packets is set to Yes" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging'
            ValueData = 1
            ValueName = 'LogDroppedPackets'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.2.8' -and $LevelOne){
        Registry "9.2.8 - (L1) Ensure Windows Firewall Private Logging Log successful connections is set to Yes" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PrivateProfile\Logging'
            ValueData = 1
            ValueName = 'LogSuccessfulConnections'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.3.1' -and $LevelOne){
        Registry "9.3.1 - (L1) Ensure Windows Firewall Public Firewall state is set to On (recommended)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PublicProfile'
            ValueData = 1
            ValueName = 'EnableFirewall'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.3.2' -and $LevelOne){
        Registry "9.3.2 - (L1) Ensure Windows Firewall Public Inbound connections is set to Block (default)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PublicProfile'
            ValueData = 1
            ValueName = 'DefaultInboundAction'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.3.3' -and $LevelOne){
        Registry "9.3.3 - (L1) Ensure Windows Firewall Public Outbound connections is set to Allow (default)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PublicProfile'
            ValueData = 0
            ValueName = 'DefaultOutboundAction'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.3.4' -and $LevelOne){
        Registry "9.3.4 - (L1) Ensure Windows Firewall Public Settings Display a notification is set to No" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PublicProfile'
            ValueData = 1
            ValueName = 'DisableNotifications'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.3.5' -and $LevelOne){
        Registry "9.3.5 - (L1) Ensure Windows Firewall Public Settings Apply local firewall rules is set to No" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PublicProfile'
            ValueData = 0
            ValueName = 'AllowLocalPolicyMerge'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.3.6' -and $LevelOne){
        Registry "9.3.6 - (L1) Ensure Windows Firewall Public Settings Apply local connection security rules is set to No" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PublicProfile'
            ValueData = 0
            ValueName = 'AllowLocalIPsecPolicyMerge'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.3.7' -and $LevelOne){
        Registry "9.3.7 - (L1) Ensure Windows Firewall Public Logging Name is set to SystemRootSystem32logfilesfirewallpublicfw.log" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging'
            ValueData = '%systemroot%\system32\logfiles\firewall\publicfw.log'
            ValueName = 'LogFilePath'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '9.3.8' -and $LevelOne){
        Registry "9.3.8 - (L1) Ensure Windows Firewall Public Logging Size limit (KB) is set to 16384 KB or greater" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging'
            ValueData = $cis938LogFileSize
            ValueName = 'LogFileSize'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.3.9' -and $LevelOne){
        Registry "9.3.9 - (L1) Ensure Windows Firewall Public Logging Log dropped packets is set to Yes" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging'
            ValueData = 1
            ValueName = 'LogDroppedPackets'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '9.3.10' -and $LevelOne){
        Registry "9.3.10 - (L1) Ensure Windows Firewall Public Logging Log successful connections is set to Yes" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\WindowsFirewall\PublicProfile\Logging'
            ValueData = 1
            ValueName = 'LogSuccessfulConnections'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '17.1.1' -and $LevelOne){
        AuditPolicySubcategory "17.1.1 - (L1) Ensure Audit Credential Validation is set to Success and Failure (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Credential Validation'
        }
        AuditPolicySubcategory "17.1.1 - (L1) Ensure Audit Credential Validation is set to Success and Failure (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'Credential Validation'
        }
    }
    if($ExcludeList -notcontains '17.2.1' -and $LevelOne){
        AuditPolicySubcategory "17.2.1 - (L1) Ensure Audit Application Group Management is set to Success and Failure (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Application Group Management'
        }
        AuditPolicySubcategory "17.2.1 - (L1) Ensure Audit Application Group Management is set to Success and Failure (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'Application Group Management'
        }
    }
    if($ExcludeList -notcontains '17.2.5' -and $LevelOne){
        AuditPolicySubcategory "17.2.5 - (L1) Ensure Audit Security Group Management is set to include Success (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Security Group Management'
        }
        AuditPolicySubcategory "17.2.5 - (L1) Ensure Audit Security Group Management is set to include Success (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Absent'
            Name = 'Security Group Management'
        }
    }
    if($ExcludeList -notcontains '17.2.6' -and $LevelOne){
        AuditPolicySubcategory "17.2.6 - (L1) Ensure Audit User Account Management is set to Success and Failure (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'User Account Management'
        }
        AuditPolicySubcategory "17.2.6 - (L1) Ensure Audit User Account Management is set to Success and Failure (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'User Account Management'
        }
    }
    if($ExcludeList -notcontains '17.3.1' -and $LevelOne){
        AuditPolicySubcategory "17.3.1 - (L1) Ensure Audit PNP Activity is set to include Success (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Plug and Play Events'
        }
        AuditPolicySubcategory "17.3.1 - (L1) Ensure Audit PNP Activity is set to include Success (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Absent'
            Name = 'Plug and Play Events'
        }
    }
    if($ExcludeList -notcontains '17.3.2' -and $LevelOne){
        AuditPolicySubcategory "17.3.2 - (L1) Ensure Audit Process Creation is set to include Success (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Process Creation'
        }
        AuditPolicySubcategory "17.3.2 - (L1) Ensure Audit Process Creation is set to include Success (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Absent'
            Name = 'Process Creation'
        }
    }
    if($ExcludeList -notcontains '17.5.1' -and $LevelOne){
        AuditPolicySubcategory "17.5.1 - (L1) Ensure Audit Account Lockout is set to include Failure (1)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'Account Lockout'
        }
        AuditPolicySubcategory "17.5.1 - (L1) Ensure Audit Account Lockout is set to include Failure (2)" {
            AuditFlag = 'Success'
            Ensure = 'Absent'
            Name = 'Account Lockout'
        }
    }
    if($ExcludeList -notcontains '17.5.2' -and $LevelOne){
        AuditPolicySubcategory "17.5.2 - (L1) Ensure Audit Group Membership is set to include Success (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Group Membership'
        }
        AuditPolicySubcategory "17.5.2 - (L1) Ensure Audit Group Membership is set to include Success (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Absent'
            Name = 'Group Membership'
        }
    }
    if($ExcludeList -notcontains '17.5.3' -and $LevelOne){
        AuditPolicySubcategory "17.5.3 - (L1) Ensure Audit Logoff is set to include Success (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Logoff'
        }
        AuditPolicySubcategory "17.5.3 - (L1) Ensure Audit Logoff is set to include Success (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Absent'
            Name = 'Logoff'
        }
    }
    if($ExcludeList -notcontains '17.5.4' -and $LevelOne){
        AuditPolicySubcategory "17.5.4 - (L1) Ensure Audit Logon is set to Success and Failure (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Logon'
        }
        AuditPolicySubcategory "17.5.4 - (L1) Ensure Audit Logon is set to Success and Failure (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'Logon'
        }
    }
    if($ExcludeList -notcontains '17.5.5' -and $LevelOne){
        AuditPolicySubcategory "17.5.5 - (L1) Ensure Audit Other LogonLogoff Events is set to Success and Failure (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Other Logon/Logoff Events'
        }
        AuditPolicySubcategory "17.5.5 - (L1) Ensure Audit Other LogonLogoff Events is set to Success and Failure (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'Other Logon/Logoff Events'
        }
    }
    if($ExcludeList -notcontains '17.5.6' -and $LevelOne){
        AuditPolicySubcategory "17.5.6 - (L1) Ensure Audit Special Logon is set to include Success (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Special Logon'
        }
        AuditPolicySubcategory "17.5.6 - (L1) Ensure Audit Special Logon is set to include Success (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Absent'
            Name = 'Special Logon'
        }
    }
    if($ExcludeList -notcontains '17.6.1' -and $LevelOne){
        AuditPolicySubcategory "17.6.1 - (L1) Ensure Audit Detailed File Share is set to include Failure (1)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'Detailed File Share'
        }
        AuditPolicySubcategory "17.6.1 - (L1) Ensure Audit Detailed File Share is set to include Failure (2)" {
            AuditFlag = 'Success'
            Ensure = 'Absent'
            Name = 'Detailed File Share'
        }
    }
    if($ExcludeList -notcontains '17.6.2' -and $LevelOne){
        AuditPolicySubcategory "17.6.2 - (L1) Ensure Audit File Share is set to Success and Failure (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'File Share'
        }
        AuditPolicySubcategory "17.6.2 - (L1) Ensure Audit File Share is set to Success and Failure (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'File Share'
        }
    }
    if($ExcludeList -notcontains '17.6.3' -and $LevelOne){
        AuditPolicySubcategory "17.6.3 - (L1) Ensure Audit Other Object Access Events is set to Success and Failure (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Other Object Access Events'
        }
        AuditPolicySubcategory "17.6.3 - (L1) Ensure Audit Other Object Access Events is set to Success and Failure (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'Other Object Access Events'
        }
    }
    if($ExcludeList -notcontains '17.6.4' -and $LevelOne){
        AuditPolicySubcategory "17.6.4 - (L1) Ensure Audit Removable Storage is set to Success and Failure (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Removable Storage'
        }
        AuditPolicySubcategory "17.6.4 - (L1) Ensure Audit Removable Storage is set to Success and Failure (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'Removable Storage'
        }
    }
    if($ExcludeList -notcontains '17.7.1' -and $LevelOne){
        AuditPolicySubcategory "17.7.1 - (L1) Ensure Audit Audit Policy Change is set to include Success (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Audit Policy Change'
        }
        AuditPolicySubcategory "17.7.1 - (L1) Ensure Audit Audit Policy Change is set to include Success (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Absent'
            Name = 'Audit Policy Change'
        }
    }
    if($ExcludeList -notcontains '17.7.2' -and $LevelOne){
        AuditPolicySubcategory "17.7.2 - (L1) Ensure Audit Authentication Policy Change is set to include Success (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Authentication Policy Change'
        }
        AuditPolicySubcategory "17.7.2 - (L1) Ensure Audit Authentication Policy Change is set to include Success (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Absent'
            Name = 'Authentication Policy Change'
        }
    }
    if($ExcludeList -notcontains '17.7.3' -and $LevelOne){
        AuditPolicySubcategory "17.7.3 - (L1) Ensure Audit Authorization Policy Change is set to include Success (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Authorization Policy Change'
        }
        AuditPolicySubcategory "17.7.3 - (L1) Ensure Audit Authorization Policy Change is set to include Success (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Absent'
            Name = 'Authorization Policy Change'
        }
    }
    if($ExcludeList -notcontains '17.7.4' -and $LevelOne){
        AuditPolicySubcategory "17.7.4 - (L1) Ensure Audit MPSSVC Rule-Level Policy Change is set to Success and Failure (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'MPSSVC Rule-Level Policy Change'
        }
        AuditPolicySubcategory "17.7.4 - (L1) Ensure Audit MPSSVC Rule-Level Policy Change is set to Success and Failure (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'MPSSVC Rule-Level Policy Change'
        }
    }
    if($ExcludeList -notcontains '17.7.5' -and $LevelOne){
        AuditPolicySubcategory "17.7.5 - (L1) Ensure Audit Other Policy Change Events is set to include Failure (1)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'Other Policy Change Events'
        }
        AuditPolicySubcategory "17.7.5 - (L1) Ensure Audit Other Policy Change Events is set to include Failure (2)" {
            AuditFlag = 'Success'
            Ensure = 'Absent'
            Name = 'Other Policy Change Events'
        }
    }
    if($ExcludeList -notcontains '17.8.1' -and $LevelOne){
        AuditPolicySubcategory "17.8.1 - (L1) Ensure Audit Sensitive Privilege Use is set to Success and Failure (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Sensitive Privilege Use'
        }
        AuditPolicySubcategory "17.8.1 - (L1) Ensure Audit Sensitive Privilege Use is set to Success and Failure (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'Sensitive Privilege Use'
        }
    }
    if($ExcludeList -notcontains '17.9.1' -and $LevelOne){
        AuditPolicySubcategory "17.9.1 - (L1) Ensure Audit IPsec Driver is set to Success and Failure (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'IPsec Driver'
        }
        AuditPolicySubcategory "17.9.1 - (L1) Ensure Audit IPsec Driver is set to Success and Failure (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'IPsec Driver'
        }
    }
    if($ExcludeList -notcontains '17.9.2' -and $LevelOne){
        AuditPolicySubcategory "17.9.2 - (L1) Ensure Audit Other System Events is set to Success and Failure (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Other System Events'
        }
        AuditPolicySubcategory "17.9.2 - (L1) Ensure Audit Other System Events is set to Success and Failure (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'Other System Events'
        }
    }
    if($ExcludeList -notcontains '17.9.3' -and $LevelOne){
        AuditPolicySubcategory "17.9.3 - (L1) Ensure Audit Security State Change is set to include Success (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Security State Change'
        }
        AuditPolicySubcategory "17.9.3 - (L1) Ensure Audit Security State Change is set to include Success (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Absent'
            Name = 'Security State Change'
        }
    }
    if($ExcludeList -notcontains '17.9.4' -and $LevelOne){
        AuditPolicySubcategory "17.9.4 - (L1) Ensure Audit Security System Extension is set to include Success (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'Security System Extension'
        }
        AuditPolicySubcategory "17.9.4 - (L1) Ensure Audit Security System Extension is set to include Success (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Absent'
            Name = 'Security System Extension'
        }
    }
    if($ExcludeList -notcontains '17.9.5' -and $LevelOne){
        AuditPolicySubcategory "17.9.5 - (L1) Ensure Audit System Integrity is set to Success and Failure (1)" {
            AuditFlag = 'Success'
            Ensure = 'Present'
            Name = 'System Integrity'
        }
        AuditPolicySubcategory "17.9.5 - (L1) Ensure Audit System Integrity is set to Success and Failure (2)" {
            AuditFlag = 'Failure'
            Ensure = 'Present'
            Name = 'System Integrity'
        }
    }
    if($ExcludeList -notcontains '18.1.1.1' -and $LevelOne){
        Registry "18.1.1.1 - (L1) Ensure Prevent enabling lock screen camera is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Personalization'
            ValueData = 1
            ValueName = 'NoLockScreenCamera'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.1.1.2' -and $LevelOne){
        Registry "18.1.1.2 - (L1) Ensure Prevent enabling lock screen slide show is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Personalization'
            ValueData = 1
            ValueName = 'NoLockScreenSlideshow'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.1.2.2' -and $LevelOne){
        Registry "18.1.2.2 - (L1) Ensure Allow users to enable online speech recognition services is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\InputPersonalization'
            ValueData = 0
            ValueName = 'AllowInputPersonalization'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.1.3' -and $LevelTwo){
        Registry "18.1.3 - (L2) Ensure Allow Online Tips is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
            ValueData = 0
            ValueName = 'AllowOnlineTips'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.2.2' -and $LevelOne){
        Registry "18.2.2 - (L1) Ensure Do not allow password expiration time longer than required by policy is set to Enabled (MS only)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft Services\AdmPwd'
            ValueData = 1
            ValueName = 'PwdExpirationProtectionEnabled'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.2.3' -and $LevelOne){
        Registry "18.2.3 - (L1) Ensure Enable Local Admin Password Management is set to Enabled (MS only)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft Services\AdmPwd'
            ValueData = 1
            ValueName = 'AdmPwdEnabled'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.2.4' -and $LevelOne){
        Registry "18.2.4 - (L1) Ensure Password Settings Password Complexity is set to Enabled Large letters small letters numbers special characters (MS only)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft Services\AdmPwd'
            ValueData = 4
            ValueName = 'PasswordComplexity'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.2.5' -and $LevelOne){
        Registry "18.2.5 - (L1) Ensure Password Settings Password Length is set to Enabled 15 or more (MS only)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft Services\AdmPwd'
            ValueData = $cis1825PasswordLength
            ValueName = 'PasswordLength'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.2.6' -and $LevelOne){
        Registry "18.2.6 - (L1) Ensure Password Settings Password Age (Days) is set to Enabled 30 or fewer (MS only)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft Services\AdmPwd'
            ValueData = $cis1826PasswordAgeDays
            ValueName = 'PasswordAgeDays'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.3.1' -and $LevelOne){
        Registry "18.3.1 - (L1) Ensure Apply UAC restrictions to local accounts on network logons is set to Enabled (MS only)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 0
            ValueName = 'LocalAccountTokenFilterPolicy'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.3.2' -and $LevelOne){
        Registry "18.3.2 - (L1) Ensure Configure SMB v1 client driver is set to Enabled Disable driver (recommended)" {
            Ensure = 'Present'
            Key = 'HKLM:\SYSTEM\CurrentControlSet\Services\MrxSmb10'
            ValueData = 4
            ValueName = 'Start'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.3.3' -and $LevelOne){
        Registry "18.3.3 - (L1) Ensure Configure SMB v1 server is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters'
            ValueData = 0
            ValueName = 'SMB1'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.3.4' -and $LevelOne){
        Registry "18.3.4 - (L1) Ensure Enable Structured Exception Handling Overwrite Protection (SEHOP) is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\kernel'
            ValueData = 0
            ValueName = 'DisableExceptionChainValidation'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.3.5' -and $LevelOne){
        Registry "18.3.5 - (L1) Ensure NetBT NodeType configuration is set to Enabled P-node (recommended)" {
            Ensure = 'Present'
            Key = 'HKLM:\SYSTEM\CurrentControlSet\Services\NetBT\Parameters'
            ValueData = 2
            ValueName = 'NodeType'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.3.6' -and $LevelOne){
        Registry "18.3.6 - (L1) Ensure WDigest Authentication is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest'
            ValueData = 0
            ValueName = 'UseLogonCredential'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.4.1' -and $LevelOne){
        Registry "18.4.1 - (L1) Ensure MSS (AutoAdminLogon) Enable Automatic Logon (not recommended) is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon'
            ValueData = '0'
            ValueName = 'AutoAdminLogon'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '18.4.2' -and $LevelOne){
        Registry "18.4.2 - (L1) Ensure MSS (DisableIPSourceRouting IPv6) IP source routing protection level (protects against packet spoofing) is set to Enabled Highest protection source routing is completely disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters'
            ValueData = 2
            ValueName = 'DisableIPSourceRouting'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.4.3' -and $LevelOne){
        Registry "18.4.3 - (L1) Ensure MSS (DisableIPSourceRouting) IP source routing protection level (protects against packet spoofing) is set to Enabled Highest protection source routing is completely disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters'
            ValueData = 2
            ValueName = 'DisableIPSourceRouting'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.4.4' -and $LevelOne){
        Registry "18.4.4 - (L1) Ensure MSS (EnableICMPRedirect) Allow ICMP redirects to override OSPF generated routes is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters'
            ValueData = 0
            ValueName = 'EnableICMPRedirect'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.4.5' -and $LevelTwo){
        Registry "18.4.5 - (L2) Ensure MSS (KeepAliveTime) How often keep-alive packets are sent in milliseconds is set to Enabled 300000 or 5 minutes (recommended)" {
            Ensure = 'Present'
            Key = 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters'
            ValueData = 300000
            ValueName = 'KeepAliveTime'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.4.6' -and $LevelOne){
        Registry "18.4.6 - (L1) Ensure MSS (NoNameReleaseOnDemand) Allow the computer to ignore NetBIOS name release requests except from WINS servers is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\SYSTEM\CurrentControlSet\Services\NetBT\Parameters'
            ValueData = 1
            ValueName = 'NoNameReleaseOnDemand'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.4.7' -and $LevelTwo){
        Registry "18.4.7 - (L2) Ensure MSS (PerformRouterDiscovery) Allow IRDP to detect and configure Default Gateway addresses (could lead to DoS) is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters'
            ValueData = 0
            ValueName = 'PerformRouterDiscovery'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.4.8' -and $LevelOne){
        Registry "18.4.8 - (L1) Ensure MSS (SafeDllSearchMode) Enable Safe DLL search mode (recommended) is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager'
            ValueData = 1
            ValueName = 'SafeDllSearchMode'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.4.9' -and $LevelOne){
        Registry "18.4.9 - (L1) Ensure MSS (ScreenSaverGracePeriod) The time in seconds before the screen saver grace period expires (0 recommended) is set to Enabled 5 or fewer seconds" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon'
            ValueData = $cis1849ScreenSaverGracePeriod
            ValueName = 'ScreenSaverGracePeriod'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '18.4.10' -and $LevelTwo){
        Registry "18.4.10 - (L2) Ensure MSS (TcpMaxDataRetransmissions IPv6) How many times unacknowledged data is retransmitted is set to Enabled 3" {
            Ensure = 'Present'
            Key = 'HKLM:\System\CurrentControlSet\Services\Tcpip6\Parameters'
            ValueData = 3
            ValueName = 'TcpMaxDataRetransmissions'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.4.11' -and $LevelTwo){
        Registry "18.4.11 - (L2) Ensure MSS (TcpMaxDataRetransmissions) How many times unacknowledged data is retransmitted is set to Enabled 3" {
            Ensure = 'Present'
            Key = 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters'
            ValueData = 3
            ValueName = 'TcpMaxDataRetransmissions'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.4.12' -and $LevelOne){
        Registry "18.4.12 - (L1) Ensure MSS (WarningLevel) Percentage threshold for the security event log at which the system will generate a warning is set to Enabled 90 or less" {
            Ensure = 'Present'
            Key = 'HKLM:\SYSTEM\CurrentControlSet\Services\Eventlog\Security'
            ValueData = $cis18412WarningLevel
            ValueName = 'WarningLevel'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.5.4.1' -and $LevelOne){
        Registry "18.5.4.1 - (L1) Ensure Turn off multicast name resolution is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient'
            ValueData = 0
            ValueName = 'EnableMulticast'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.5.5.1' -and $LevelTwo){
        Registry "18.5.5.1 - (L2) Ensure Enable Font Providers is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\System'
            ValueData = 0
            ValueName = 'EnableFontProviders'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.5.8.1' -and $LevelOne){
        Registry "18.5.8.1 - (L1) Ensure Enable insecure guest logons is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation'
            ValueData = 0
            ValueName = 'AllowInsecureGuestAuth'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.5.9.1' -and $LevelTwo){
        Registry "18.5.9.1 - (L2) Ensure Turn on Mapper IO (LLTDIO) driver is set to Disabled (1)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\LLTD'
            ValueData = 0
            ValueName = 'EnableLLTDIO'
            ValueType = 'Dword'
        }
        Registry "18.5.9.1 - (L2) Ensure Turn on Mapper IO (LLTDIO) driver is set to Disabled (2)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\LLTD'
            ValueData = 0
            ValueName = 'AllowLLTDIOOnDomain'
            ValueType = 'Dword'
        }
        Registry "18.5.9.1 - (L2) Ensure Turn on Mapper IO (LLTDIO) driver is set to Disabled (3)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\LLTD'
            ValueData = 0
            ValueName = 'AllowLLTDIOOnPublicNet'
            ValueType = 'Dword'
        }
        Registry "18.5.9.1 - (L2) Ensure Turn on Mapper IO (LLTDIO) driver is set to Disabled (4)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\LLTD'
            ValueData = 0
            ValueName = 'ProhibitLLTDIOOnPrivateNet'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.5.9.2' -and $LevelTwo){
        Registry "18.5.9.2 - (L2) Ensure Turn on Responder (RSPNDR) driver is set to Disabled (1)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\LLTD'
            ValueData = 0
            ValueName = 'EnableRspndr'
            ValueType = 'Dword'
        }
        Registry "18.5.9.2 - (L2) Ensure Turn on Responder (RSPNDR) driver is set to Disabled (2)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\LLTD'
            ValueData = 0
            ValueName = 'AllowRspndrOnDomain'
            ValueType = 'Dword'
        }
        Registry "18.5.9.2 - (L2) Ensure Turn on Responder (RSPNDR) driver is set to Disabled (3)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\LLTD'
            ValueData = 0
            ValueName = 'AllowRspndrOnPublicNet'
            ValueType = 'Dword'
        }
        Registry "18.5.9.2 - (L2) Ensure Turn on Responder (RSPNDR) driver is set to Disabled (4)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\LLTD'
            ValueData = 0
            ValueName = 'ProhibitRspndrOnPrivateNet'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.5.10.2' -and $LevelTwo){
        Registry "18.5.10.2 - (L2) Ensure Turn off Microsoft Peer-to-Peer Networking Services is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Peernet'
            ValueData = 1
            ValueName = 'Disabled'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.5.11.2' -and $LevelOne){
        Registry "18.5.11.2 - (L1) Ensure Prohibit installation and configuration of Network Bridge on your DNS domain network is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Network Connections'
            ValueData = 0
            ValueName = 'NC_AllowNetBridge_NLA'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.5.11.3' -and $LevelOne){
        Registry "18.5.11.3 - (L1) Ensure Prohibit use of Internet Connection Sharing on your DNS domain network is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Network Connections'
            ValueData = 0
            ValueName = 'NC_ShowSharedAccessUI'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.5.11.4' -and $LevelOne){
        Registry "18.5.11.4 - (L1) Ensure Require domain users to elevate when setting a networks location is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Network Connections'
            ValueData = 1
            ValueName = 'NC_StdDomainUserSetLocation'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.5.14.1' -and $LevelOne){
        Registry "18.5.14.1 - (L1) Ensure Hardened UNC Paths is set to Enabled with Require Mutual Authentication and Require Integrity set for all NETLOGON and SYSVOL shares (1)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths'
            ValueData = 'RequireMutualAuthentication=1, RequireIntegrity=1'
            ValueName = '\\*\NETLOGON'
            ValueType = 'String'
        }
        Registry "18.5.14.1 - (L1) Ensure Hardened UNC Paths is set to Enabled with Require Mutual Authentication and Require Integrity set for all NETLOGON and SYSVOL shares (2)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths'
            ValueData = 'RequireMutualAuthentication=1, RequireIntegrity=1'
            ValueName = '\\*\SYSVOL'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '18.5.19.2.1' -and $LevelTwo){
        Registry "18.5.19.2.1 - (L2) Disable IPv6 (Ensure TCPIP6 Parameter DisabledComponents is set to 0xff (255))" {
            Ensure = 'Present'
            Key = 'HKLM:\System\CurrentControlSet\Services\Tcpip6\Parameters'
            ValueData = 255
            ValueName = 'DisabledComponents'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.5.20.1' -and $LevelTwo){
        Registry "18.5.20.1 - (L2) Ensure Configuration of wireless settings using Windows Connect Now is set to Disabled (1)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\WCN\Registrars'
            ValueData = 0
            ValueName = 'EnableRegistrars'
            ValueType = 'Dword'
        }
        Registry "18.5.20.1 - (L2) Ensure Configuration of wireless settings using Windows Connect Now is set to Disabled (2)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\WCN\Registrars'
            ValueData = 0
            ValueName = 'DisableUPnPRegistrar'
            ValueType = 'Dword'
        }
        Registry "18.5.20.1 - (L2) Ensure Configuration of wireless settings using Windows Connect Now is set to Disabled (3)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\WCN\Registrars'
            ValueData = 0
            ValueName = 'DisableInBand802DOT11Registrar'
            ValueType = 'Dword'
        }
        Registry "18.5.20.1 - (L2) Ensure Configuration of wireless settings using Windows Connect Now is set to Disabled (4)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\WCN\Registrars'
            ValueData = 0
            ValueName = 'DisableFlashConfigRegistrar'
            ValueType = 'Dword'
        }
        Registry "18.5.20.1 - (L2) Ensure Configuration of wireless settings using Windows Connect Now is set to Disabled (5)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\WCN\Registrars'
            ValueData = 0
            ValueName = 'DisableWPDRegistrar'
            ValueType = 'Dword'
        }
        Registry "18.5.20.1 - (L2) Ensure Configuration of wireless settings using Windows Connect Now is set to Disabled (6)" {
            Ensure = 'Absent'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\WCN\Registrars'
            ValueName = 'MaxWCNDeviceNumber'
        }
        Registry "18.5.20.1 - (L2) Ensure Configuration of wireless settings using Windows Connect Now is set to Disabled (7)" {
            Ensure = 'Absent'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\WCN\Registrars'
            ValueName = 'HigherPrecedenceRegistrar'
        }
    }
    if($ExcludeList -notcontains '18.5.20.2' -and $LevelTwo){
        Registry "18.5.20.2 - (L2) Ensure Prohibit access of the Windows Connect Now wizards is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\WCN\UI'
            ValueData = 1
            ValueName = 'DisableWcnUi'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.5.21.1' -and $LevelOne){
        Registry "18.5.21.1 - (L1) Ensure Minimize the number of simultaneous connections to the Internet or a Windows Domain is set to Enabled 3 Prevent Wi-Fi when on Ethernet" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\WcmSvc\GroupPolicy'
            ValueData = 3
            ValueName = 'fMinimizeConnections'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.5.21.2' -and $LevelTwo){
        Registry "18.5.21.2 - (L2) Ensure Prohibit connection to non-domain networks when connected to domain authenticated network is set to Enabled (MS only)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\WcmSvc\GroupPolicy'
            ValueData = 1
            ValueName = 'fBlockNonDomain'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.7.1.1' -and $LevelTwo){
        Registry "18.7.1.1 - (L2) Ensure Turn off notifications network usage is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\PushNotifications'
            ValueData = 1
            ValueName = 'NoCloudApplicationNotification'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.3.1' -and $LevelOne){
        Registry "18.8.3.1 - (L1) Ensure Include command line in process creation events is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\Audit'
            ValueData = 0
            ValueName = 'ProcessCreationIncludeCmdLine_Enabled'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.4.1' -and $LevelOne){
        Registry "18.8.4.1 - (L1) Ensure Encryption Oracle Remediation is set to Enabled Force Updated Clients" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters'
            ValueData = 0
            ValueName = 'AllowEncryptionOracle'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.4.2' -and $LevelOne){
        Registry "18.8.4.2 - (L1) Ensure Remote host allows delegation of non-exportable credentials is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\CredentialsDelegation'
            ValueData = 1
            ValueName = 'AllowProtectedCreds'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.5.1' -and $NextGenerationWindowsSecurity){
        Registry "18.8.5.1 - (NG) Ensure Turn On Virtualization Based Security is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard'
            ValueData = 1
            ValueName = 'EnableVirtualizationBasedSecurity'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.5.2' -and $NextGenerationWindowsSecurity){
        Registry "18.8.5.2 - (NG) Ensure Turn On Virtualization Based Security Select Platform Security Level is set to Secure Boot and DMA Protection" {
            Ensure = 'Present'
            Key = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard'
            ValueData = 3
            ValueName = 'RequirePlatformSecurityFeatures'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.5.3' -and $NextGenerationWindowsSecurity){
        Registry "18.8.5.3 - (NG) Ensure Turn On Virtualization Based Security Virtualization Based Protection of Code Integrity is set to Enabled with UEFI lock" {
            Ensure = 'Present'
            Key = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard'
            ValueData = 1
            ValueName = 'HypervisorEnforcedCodeIntegrity'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.5.4' -and $NextGenerationWindowsSecurity){
        Registry "18.8.5.4 - (NG) Ensure Turn On Virtualization Based Security Require UEFI Memory Attributes Table is set to True (checked)" {
            Ensure = 'Present'
            Key = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard'
            ValueData = 1
            ValueName = 'HVCIMATRequired'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.5.5' -and $NextGenerationWindowsSecurity){
        Registry "18.8.5.5 - (NG) Ensure Turn On Virtualization Based Security Credential Guard Configuration is set to Enabled with UEFI lock (MS Only)" {
            Ensure = 'Present'
            Key = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard'
            ValueData = 1
            ValueName = 'LsaCfgFlags'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.5.7' -and $NextGenerationWindowsSecurity){
        Registry "18.8.5.7 - (NG) Ensure Turn On Virtualization Based Security Secure Launch Configuration is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard'
            ValueData = 1
            ValueName = 'ConfigureSystemGuardLaunch'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.14.1' -and $LevelOne){
        Registry "18.8.14.1 - (L1) Ensure Boot-Start Driver Initialization Policy is set to Enabled Good unknown and bad but critical" {
            Ensure = 'Present'
            Key = 'HKLM:\SYSTEM\CurrentControlSet\Policies\EarlyLaunch'
            ValueData = 3
            ValueName = 'DriverLoadPolicy'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.21.2' -and $LevelOne){
        Registry "18.8.21.2 - (L1) Ensure Configure registry policy processing Do not apply during periodic background processing is set to Enabled FALSE" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2}'
            ValueData = 0
            ValueName = 'NoBackgroundPolicy'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.21.3' -and $LevelOne){
        Registry "18.8.21.3 - (L1) Ensure Configure registry policy processing Process even if the Group Policy objects have not changed is set to Enabled TRUE" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Group Policy\{35378EAC-683F-11D2-A89A-00C04FBBCFA2}'
            ValueData = 0
            ValueName = 'NoGPOListChanges'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.21.4' -and $LevelOne){
        Registry "18.8.21.4 - (L1) Ensure Continue experiences on this device is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\System'
            ValueData = 0
            ValueName = 'EnableCdp'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.21.5' -and $LevelOne){
        Registry "18.8.21.5 - (L1) Ensure Turn off background refresh of Group Policy is set to Disabled" {
            Ensure = 'Absent'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueName = 'DisableBkGndGroupPolicy'
        }
    }
    if($ExcludeList -notcontains '18.8.22.1.1' -and $LevelOne){
        Registry "18.8.22.1.1 - (L1) Ensure Turn off downloading of print drivers over HTTP is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
            ValueData = 1
            ValueName = 'DisableWebPnPDownload'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.22.1.2' -and $LevelTwo){
        Registry "18.8.22.1.2 - (L2) Ensure Turn off handwriting personalization data sharing is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\TabletPC'
            ValueData = 1
            ValueName = 'PreventHandwritingDataSharing'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.22.1.3' -and $LevelTwo){
        Registry "18.8.22.1.3 - (L2) Ensure Turn off handwriting recognition error reporting is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\HandwritingErrorReports'
            ValueData = 1
            ValueName = 'PreventHandwritingErrorReports'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.22.1.4' -and $LevelTwo){
        Registry "18.8.22.1.4 - (L2) Ensure Turn off Internet Connection Wizard if URL connection is referring to Microsoft.com is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Internet Connection Wizard'
            ValueData = 1
            ValueName = 'ExitOnMSICW'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.22.1.5' -and $LevelOne){
        Registry "18.8.22.1.5 - (L1) Ensure Turn off Internet download for Web publishing and online ordering wizards is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
            ValueData = 1
            ValueName = 'NoWebServices'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.22.1.6' -and $LevelTwo){
        Registry "18.8.22.1.6 - (L2) Ensure Turn off printing over HTTP is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Printers'
            ValueData = 1
            ValueName = 'DisableHTTPPrinting'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.22.1.7' -and $LevelTwo){
        Registry "18.8.22.1.7 - (L2) Ensure Turn off Registration if URL connection is referring to Microsoft.com is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Registration Wizard Control'
            ValueData = 1
            ValueName = 'NoRegistration'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.22.1.8' -and $LevelTwo){
        Registry "18.8.22.1.8 - (L2) Ensure Turn off Search Companion content file updates is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\SearchCompanion'
            ValueData = 1
            ValueName = 'DisableContentFileUpdates'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.22.1.9' -and $LevelTwo){
        Registry "18.8.22.1.9 - (L2) Ensure Turn off the Order Prints picture task is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
            ValueData = 1
            ValueName = 'NoOnlinePrintsWizard'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.22.1.10' -and $LevelTwo){
        Registry "18.8.22.1.10 - (L2) Ensure Turn off the Publish to Web task for files and folders is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
            ValueData = 1
            ValueName = 'NoPublishingWizard'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.22.1.11' -and $LevelTwo){
        Registry "18.8.22.1.11 - (L2) Ensure Turn off the Windows Messenger Customer Experience Improvement Program is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Messenger\Client'
            ValueData = 2
            ValueName = 'CEIP'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.22.1.12' -and $LevelTwo){
        Registry "18.8.22.1.12 - (L2) Ensure Turn off Windows Customer Experience Improvement Program is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\SQMClient\Windows'
            ValueData = 0
            ValueName = 'CEIPEnable'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.22.1.13' -and $LevelTwo){
        Registry "18.8.22.1.13 - (L2) Ensure Turn off Windows Error Reporting is set to Enabled (1)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\PCHealth\ErrorReporting'
            ValueData = 0
            ValueName = 'DoReport'
            ValueType = 'Dword'
        }
        Registry "18.8.22.1.13 - (L2) Ensure Turn off Windows Error Reporting is set to Enabled (2)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Windows Error Reporting'
            ValueData = 1
            ValueName = 'Disabled'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.25.1' -and $LevelTwo){
        Registry "18.8.25.1 - (L2) Ensure Support device authentication using certificate is set to Enabled Automatic (1)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters'
            ValueData = 1
            ValueName = 'DevicePKInitEnabled'
            ValueType = 'Dword'
        }
        Registry "18.8.25.1 - (L2) Ensure Support device authentication using certificate is set to Enabled Automatic (2)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters'
            ValueData = 0
            ValueName = 'DevicePKInitBehavior'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.26.1' -and $LevelOne){
        Registry "18.8.26.1 - (L1) Ensure Enumeration policy for external devices incompatible with Kernel DMA Protection is set to Enabled Block All" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Kernel DMA Protection'
            ValueData = 0
            ValueName = 'DeviceEnumerationPolicy'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.27.1' -and $LevelTwo){
        Registry "18.8.27.1 - (L2) Ensure Disallow copying of user input methods to the system account for sign-in is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Control Panel\International'
            ValueData = 1
            ValueName = 'BlockUserInputMethodsForSignIn'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.28.1' -and $LevelOne){
        Registry "18.8.28.1 - (L1) Ensure Block user from showing account details on sign-in is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\System'
            ValueData = 1
            ValueName = 'BlockUserFromShowingAccountDetailsOnSignin'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.28.2' -and $LevelOne){
        Registry "18.8.28.2 - (L1) Ensure Do not display network selection UI is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\System'
            ValueData = 1
            ValueName = 'DontDisplayNetworkSelectionUI'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.28.3' -and $LevelOne){
        Registry "18.8.28.3 - (L1) Ensure Do not enumerate connected users on domain-joined computers is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\System'
            ValueData = 1
            ValueName = 'DontEnumerateConnectedUsers'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.28.4' -and $LevelOne){
        Registry "18.8.28.4 - (L1) Ensure Enumerate local users on domain-joined computers is set to Disabled (MS only)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\System'
            ValueData = 0
            ValueName = 'EnumerateLocalUsers'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.28.5' -and $LevelOne){
        Registry "18.8.28.5 - (L1) Ensure Turn off app notifications on the lock screen is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\System'
            ValueData = 1
            ValueName = 'DisableLockScreenAppNotifications'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.28.6' -and $LevelOne){
        Registry "18.8.28.6 - (L1) Ensure Turn off picture password sign-in is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\System'
            ValueData = 1
            ValueName = 'BlockDomainPicturePassword'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.28.7' -and $LevelOne){
        Registry "18.8.28.7 - (L1) Ensure Turn on convenience PIN sign-in is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\System'
            ValueData = 0
            ValueName = 'AllowDomainPINLogon'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.31.1' -and $LevelTwo){
        Registry "18.8.31.1 - (L2) Ensure Allow Clipboard synchronization across devices is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\System'
            ValueData = 0
            ValueName = 'AllowCrossDeviceClipboard'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.31.2' -and $LevelTwo){
        Registry "18.8.31.2 - (L2) Ensure Allow upload of User Activities is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\System'
            ValueData = 0
            ValueName = 'UploadUserActivities'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.34.6.1' -and $LevelTwo){
        Registry "18.8.34.6.1 - (L2) Ensure Allow network connectivity during connected-standby (on battery) is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Power\PowerSettings\f15576e8-98b7-4186-b944-eafa664402d9'
            ValueData = 0
            ValueName = 'DCSettingIndex'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.34.6.2' -and $LevelTwo){
        Registry "18.8.34.6.2 - (L2) Ensure Allow network connectivity during connected-standby (plugged in) is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Power\PowerSettings\f15576e8-98b7-4186-b944-eafa664402d9'
            ValueData = 0
            ValueName = 'ACSettingIndex'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.34.6.3' -and $LevelOne){
        Registry "18.8.34.6.3 - (L1) Ensure Require a password when a computer wakes (on battery) is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Power\PowerSettings\0e796bdb-100d-47d6-a2d5-f7d2daa51f51'
            ValueData = 1
            ValueName = 'DCSettingIndex'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.34.6.4' -and $LevelOne){
        Registry "18.8.34.6.4 - (L1) Ensure Require a password when a computer wakes (plugged in) is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Power\PowerSettings\0e796bdb-100d-47d6-a2d5-f7d2daa51f51'
            ValueData = 1
            ValueName = 'ACSettingIndex'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.36.1' -and $LevelOne){
        Registry "18.8.36.1 - (L1) Ensure Configure Offer Remote Assistance is set to Disabled (1)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 0
            ValueName = 'fAllowUnsolicited'
            ValueType = 'Dword'
        }
        Registry "18.8.36.1 - (L1) Ensure Configure Offer Remote Assistance is set to Disabled (2)" {
            Ensure = 'Absent'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueName = 'fAllowUnsolicitedFullControl'
        }
        Registry "18.8.36.1 - (L1) Ensure Configure Offer Remote Assistance is set to Disabled (3)" {
            Ensure = 'Absent'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services\RAUnsolicit'
            ValueName = ''
        }
    }
    if($ExcludeList -notcontains '18.8.36.2' -and $LevelOne){
        Registry "18.8.36.2 - (L1) Ensure Configure Solicited Remote Assistance is set to Disabled (1)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 0
            ValueName = 'fAllowToGetHelp'
            ValueType = 'Dword'
        }
        Registry "18.8.36.2 - (L1) Ensure Configure Solicited Remote Assistance is set to Disabled (2)" {
            Ensure = 'Absent'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueName = 'fAllowFullControl'
        }
        Registry "18.8.36.2 - (L1) Ensure Configure Solicited Remote Assistance is set to Disabled (3)" {
            Ensure = 'Absent'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueName = 'MaxTicketExpiry'
        }
        Registry "18.8.36.2 - (L1) Ensure Configure Solicited Remote Assistance is set to Disabled (4)" {
            Ensure = 'Absent'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueName = 'MaxTicketExpiryUnits'
        }
        Registry "18.8.36.2 - (L1) Ensure Configure Solicited Remote Assistance is set to Disabled (5)" {
            Ensure = 'Absent'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueName = 'fUseMailto'
        }
    }
    if($ExcludeList -notcontains '18.8.37.1' -and $LevelOne){
        Registry "18.8.37.1 - (L1) Ensure Enable RPC Endpoint Mapper Client Authentication is set to Enabled (MS only)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Rpc'
            ValueData = 1
            ValueName = 'EnableAuthEpResolution'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.37.2' -and $LevelTwo){
        Registry "18.8.37.2 - (L2) Ensure Restrict Unauthenticated RPC clients is set to Enabled Authenticated (MS only)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Rpc'
            ValueData = 1
            ValueName = 'RestrictRemoteClients'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.47.5.1' -and $LevelTwo){
        Registry "18.8.47.5.1 - (L2) Ensure Microsoft Support Diagnostic Tool Turn on MSDT interactive communication with support provider is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\ScriptedDiagnosticsProvider\Policy'
            ValueData = 0
            ValueName = 'DisableQueryRemoteServer'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.47.11.1' -and $LevelTwo){
        Registry "18.8.47.11.1 - (L2) Ensure EnableDisable PerfTrack is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\WDI\{9c5a40da-b965-4fc3-8781-88dd50a6299d}'
            ValueData = 0
            ValueName = 'ScenarioExecutionEnabled'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.49.1' -and $LevelTwo){
        Registry "18.8.49.1 - (L2) Ensure Turn off the advertising ID is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\AdvertisingInfo'
            ValueData = 1
            ValueName = 'DisabledByGroupPolicy'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.52.1.1' -and $LevelTwo){
        Registry "18.8.52.1.1 - (L2) Ensure Enable Windows NTP Client is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient'
            ValueData = 1
            ValueName = 'Enabled'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.8.52.1.2' -and $LevelTwo){
        Registry "18.8.52.1.2 - (L2) Ensure Enable Windows NTP Server is set to Disabled (MS only)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\W32time\TimeProviders\NtpServer'
            ValueData = 0
            ValueName = 'Enabled'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.4.1' -and $LevelTwo){
        Registry "18.9.4.1 - (L2) Ensure Allow a Windows app to share application data between users is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\AppModel\StateManager'
            ValueData = 0
            ValueName = 'AllowSharedLocalAppData'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.6.1' -and $LevelOne){
        Registry "18.9.6.1 - (L1) Ensure Allow Microsoft accounts to be optional is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
            ValueData = 1
            ValueName = 'MSAOptional'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.8.1' -and $LevelOne){
        Registry "18.9.8.1 - (L1) Ensure Disallow Autoplay for non-volume devices is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Explorer'
            ValueData = 1
            ValueName = 'NoAutoplayfornonVolume'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.8.2' -and $LevelOne){
        Registry "18.9.8.2 - (L1) Ensure Set the default behavior for AutoRun is set to Enabled Do not execute any autorun commands" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
            ValueData = 1
            ValueName = 'NoAutorun'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.8.3' -and $LevelOne){
        Registry "18.9.8.3 - (L1) Ensure Turn off Autoplay is set to Enabled All drives" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
            ValueData = 255
            ValueName = 'NoDriveTypeAutoRun'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.10.1.1' -and $LevelOne){
        Registry "18.9.10.1.1 - (L1) Ensure Configure enhanced anti-spoofing is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Biometrics\FacialFeatures'
            ValueData = 1
            ValueName = 'EnhancedAntiSpoofing'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.12.1' -and $LevelTwo){
        Registry "18.9.12.1 - (L2) Ensure Allow Use of Camera is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Camera'
            ValueData = 0
            ValueName = 'AllowCamera'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.13.1' -and $LevelTwo){
        Registry "18.9.13.1 - (L2) Ensure Turn off cloud optimized content is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\CloudContent'
            ValueData = 1
            ValueName = 'DisableCloudOptimizedContent'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.13.2' -and $LevelOne){
        Registry "18.9.13.2 - (L1) Ensure Turn off Microsoft consumer experiences is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\CloudContent'
            ValueData = 1
            ValueName = 'DisableWindowsConsumerFeatures'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.14.1' -and $LevelOne){
        Registry "18.9.14.1 - (L1) Ensure Require pin for pairing is set to Enabled First Time OR Enabled Always" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Connect'
            ValueData = 1
            ValueName = 'RequirePinForPairing'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.15.1' -and $LevelOne){
        Registry "18.9.15.1 - (L1) Ensure Do not display the password reveal button is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\CredUI'
            ValueData = 1
            ValueName = 'DisablePasswordReveal'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.15.2' -and $LevelOne){
        Registry "18.9.15.2 - (L1) Ensure Enumerate administrator accounts on elevation is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\CredUI'
            ValueData = 0
            ValueName = 'EnumerateAdministrators'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.16.1' -and $LevelOne){
        Registry "18.9.16.1 - (L1) Ensure Allow Telemetry is set to Enabled 0 - Security Enterprise Only or Enabled 1 - Basic" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\DataCollection'
            ValueData = 0
            ValueName = 'AllowTelemetry'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.16.2' -and $LevelTwo){
        Registry "18.9.16.2 - (L2) Ensure Configure Authenticated Proxy usage for the Connected User Experience and Telemetry service is set to Enabled Disable Authenticated Proxy usage" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\DataCollection'
            ValueData = 1
            ValueName = 'DisableEnterpriseAuthProxy'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.16.3' -and $LevelOne){
        Registry "18.9.16.3 - (L1) Ensure Do not show feedback notifications is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\DataCollection'
            ValueData = 1
            ValueName = 'DoNotShowFeedbackNotifications'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.16.4' -and $LevelOne){
        Registry "18.9.16.4 - (L1) Ensure Toggle user control over Insider builds is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\PreviewBuilds'
            ValueData = 0
            ValueName = 'AllowBuildPreview'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.26.1.1' -and $LevelOne){
        Registry "18.9.26.1.1 - (L1) Ensure Application Control Event Log behavior when the log file reaches its maximum size is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\Application'
            ValueData = '0'
            ValueName = 'Retention'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '18.9.26.1.2' -and $LevelOne){
        Registry "18.9.26.1.2 - (L1) Ensure Application Specify the maximum log file size (KB) is set to Enabled 32768 or greater" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\Application'
            ValueData = $cis1892612MaxSize
            ValueName = 'MaxSize'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.26.2.1' -and $LevelOne){
        Registry "18.9.26.2.1 - (L1) Ensure Security Control Event Log behavior when the log file reaches its maximum size is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\Security'
            ValueData = '0'
            ValueName = 'Retention'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '18.9.26.2.2' -and $LevelOne){
        Registry "18.9.26.2.2 - (L1) Ensure Security Specify the maximum log file size (KB) is set to Enabled 196608 or greater" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\Security'
            ValueData = $cis1892622MaxSize
            ValueName = 'MaxSize'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.26.3.1' -and $LevelOne){
        Registry "18.9.26.3.1 - (L1) Ensure Setup Control Event Log behavior when the log file reaches its maximum size is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\Setup'
            ValueData = '0'
            ValueName = 'Retention'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '18.9.26.3.2' -and $LevelOne){
        Registry "18.9.26.3.2 - (L1) Ensure Setup Specify the maximum log file size (KB) is set to Enabled 32768 or greater" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\Setup'
            ValueData = $cis1892632MaxSize
            ValueName = 'MaxSize'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.26.4.1' -and $LevelOne){
        Registry "18.9.26.4.1 - (L1) Ensure System Control Event Log behavior when the log file reaches its maximum size is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\System'
            ValueData = '0'
            ValueName = 'Retention'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '18.9.26.4.2' -and $LevelOne){
        Registry "18.9.26.4.2 - (L1) Ensure System Specify the maximum log file size (KB) is set to Enabled 32768 or greater" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\System'
            ValueData = $cis1892642MaxSize
            ValueName = 'MaxSize'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.30.2' -and $LevelOne){
        Registry "18.9.30.2 - (L1) Ensure Turn off Data Execution Prevention for Explorer is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Explorer'
            ValueData = 0
            ValueName = 'NoDataExecutionPrevention'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.30.3' -and $LevelOne){
        Registry "18.9.30.3 - (L1) Ensure Turn off heap termination on corruption is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Explorer'
            ValueData = 0
            ValueName = 'NoHeapTerminationOnCorruption'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.30.4' -and $LevelOne){
        Registry "18.9.30.4 - (L1) Ensure Turn off shell protocol protected mode is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
            ValueData = 0
            ValueName = 'PreXPSP2ShellProtocolBehavior'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.39.1' -and $LevelTwo){
        Registry "18.9.39.1 - (L2) Ensure Turn off location is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\LocationAndSensors'
            ValueData = 1
            ValueName = 'DisableLocation'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.43.1' -and $LevelTwo){
        Registry "18.9.43.1 - (L2) Ensure Allow Message Service Cloud Sync is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Messaging'
            ValueData = 0
            ValueName = 'AllowMessageSync'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.44.1' -and $LevelOne){
        Registry "18.9.44.1 - (L1) Ensure Block all consumer Microsoft account user authentication is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\MicrosoftAccount'
            ValueData = 1
            ValueName = 'DisableUserAuth'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.45.14' -and $LevelOne){
        Registry "18.9.45.14 - (L1) Ensure Configure detection for potentially unwanted applications is set to Enabled Block" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender'
            ValueData = 1
            ValueName = 'PUAProtection'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.45.15' -and $LevelOne){
        Registry "18.9.45.15 - (L1) Ensure Turn off Microsoft Defender AntiVirus is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender'
            ValueData = 0
            ValueName = 'DisableAntiSpyware'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.45.3.1' -and $LevelOne){
        Registry "18.9.45.3.1 - (L1) Ensure Configure local setting override for reporting to Microsoft MAPS is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Spynet'
            ValueData = 0
            ValueName = 'LocalSettingOverrideSpynetReporting'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.45.3.2' -and $LevelTwo){
        Registry "18.9.45.3.2 - (L2) Ensure Join Microsoft MAPS is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Spynet'
            ValueData = 0
            ValueName = 'SpynetReporting'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.45.5.1' -and $LevelTwo){
        Registry "18.9.45.5.1 - (L2) Ensure Enable file hash computation feature is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\MpEngine'
            ValueData = 1
            ValueName = 'EnableFileHashComputation'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.45.8.1' -and $LevelOne){
        Registry "18.9.45.8.1 - (L1) Ensure Scan all downloaded files and attachments is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Real-Time Protection'
            ValueData = 0
            ValueName = 'DisableIOAVProtection'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.45.8.2' -and $LevelOne){
        Registry "18.9.45.8.2 - (L1) Ensure Turn off real-time protection is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Real-Time Protection'
            ValueData = 0
            ValueName = 'DisableRealtimeMonitoring'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.45.8.3' -and $LevelOne){
        Registry "18.9.45.8.3 - (L1) Ensure Turn on behavior monitoring is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Real-Time Protection'
            ValueData = 0
            ValueName = 'DisableBehaviorMonitoring'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.45.10.1' -and $LevelTwo){
        Registry "18.9.45.10.1 - (L2) Ensure Configure Watson events is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Reporting'
            ValueData = 1
            ValueName = 'DisableGenericRePorts'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.45.11.1' -and $LevelOne){
        Registry "18.9.45.11.1 - (L1) Ensure Scan removable drives is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Scan'
            ValueData = 0
            ValueName = 'DisableRemovableDriveScanning'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.45.11.2' -and $LevelOne){
        Registry "18.9.45.11.2 - (L1) Ensure Turn on e-mail scanning is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Scan'
            ValueData = 0
            ValueName = 'DisableEmailScanning'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.45.4.1.1' -and $LevelOne){
        Registry "18.9.45.4.1.1 - (L1) Ensure Configure Attack Surface Reduction rules is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR'
            ValueData = 1
            ValueName = 'ExploitGuard_ASR_Rules'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.45.4.1.2' -and $LevelOne){
        Registry "18.9.45.4.1.2 - (L1) Ensure Configure Attack Surface Reduction rules Set the state for each ASR rule is configured (1)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
            ValueData = '1'
            ValueName = '26190899-1602-49e8-8b27-eb1d0a1ce869'
            ValueType = 'String'
        }
        Registry "18.9.45.4.1.2 - (L1) Ensure Configure Attack Surface Reduction rules Set the state for each ASR rule is configured (2)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
            ValueData = '1'
            ValueName = '3b576869-a4ec-4529-8536-b80a7769e899'
            ValueType = 'String'
        }
        Registry "18.9.45.4.1.2 - (L1) Ensure Configure Attack Surface Reduction rules Set the state for each ASR rule is configured (3)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
            ValueData = '1'
            ValueName = '5beb7efe-fd9a-4556-801d-275e5ffc04cc'
            ValueType = 'String'
        }
        Registry "18.9.45.4.1.2 - (L1) Ensure Configure Attack Surface Reduction rules Set the state for each ASR rule is configured (4)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
            ValueData = '1'
            ValueName = '75668c1f-73b5-4cf0-bb93-3ecf5cb7cc84'
            ValueType = 'String'
        }
        Registry "18.9.45.4.1.2 - (L1) Ensure Configure Attack Surface Reduction rules Set the state for each ASR rule is configured (5)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
            ValueData = '1'
            ValueName = '7674ba52-37eb-4a4f-a9a1-f0f9a1619a2c'
            ValueType = 'String'
        }
        Registry "18.9.45.4.1.2 - (L1) Ensure Configure Attack Surface Reduction rules Set the state for each ASR rule is configured (6)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
            ValueData = '1'
            ValueName = '92e97fa1-2edf-4476-bdd6-9dd0b4dddc7b'
            ValueType = 'String'
        }
        Registry "18.9.45.4.1.2 - (L1) Ensure Configure Attack Surface Reduction rules Set the state for each ASR rule is configured (7)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
            ValueData = '1'
            ValueName = '9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2'
            ValueType = 'String'
        }
        Registry "18.9.45.4.1.2 - (L1) Ensure Configure Attack Surface Reduction rules Set the state for each ASR rule is configured (8)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
            ValueData = '1'
            ValueName = 'b2b3f03d-6a65-4f7b-a9c7-1c7ef74a9ba4'
            ValueType = 'String'
        }
        Registry "18.9.45.4.1.2 - (L1) Ensure Configure Attack Surface Reduction rules Set the state for each ASR rule is configured (9)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
            ValueData = '1'
            ValueName = 'be9ba2d9-53ea-4cdc-84e5-9b1eeee46550'
            ValueType = 'String'
        }
        Registry "18.9.45.4.1.2 - (L1) Ensure Configure Attack Surface Reduction rules Set the state for each ASR rule is configured (10)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
            ValueData = '1'
            ValueName = 'd3e037e1-3eb8-44c8-a917-57927947596d'
            ValueType = 'String'
        }
        Registry "18.9.45.4.1.2 - (L1) Ensure Configure Attack Surface Reduction rules Set the state for each ASR rule is configured (11)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
            ValueData = '1'
            ValueName = 'd4f940ab-401b-4efc-aadc-ad5f3c50688a'
            ValueType = 'String'
        }
        Registry "18.9.45.4.1.2 - (L1) Ensure Configure Attack Surface Reduction rules Set the state for each ASR rule is configured (12)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\ASR\Rules'
            ValueData = '1'
            ValueName = 'e6db77e5-3df2-4cf1-b95a-636979351e5b'
            ValueType = 'String'
        }
    }
    if($ExcludeList -notcontains '18.9.45.4.3.1' -and $LevelOne){
        Registry "18.9.45.4.3.1 - (L1) Ensure Prevent users and apps from accessing dangerous websites is set to Enabled Block" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Network Protection'
            ValueData = 1
            ValueName = 'EnableNetworkProtection'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.55.1' -and $LevelOne){
        Registry "18.9.55.1 - (L1) Ensure Prevent the usage of OneDrive for file storage is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\OneDrive'
            ValueData = 1
            ValueName = 'DisableFileSyncNGSC'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.2.2' -and $LevelOne){
        Registry "18.9.62.2.2 - (L1) Ensure Do not allow passwords to be saved is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 1
            ValueName = 'DisablePasswordSaving'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.2.1' -and $LevelTwo){
        Registry "18.9.62.3.2.1 - (L2) Ensure Restrict Remote Desktop Services users to a single Remote Desktop Services session is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 1
            ValueName = 'fSingleSessionPerUser'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.3.1' -and $LevelTwo){
        Registry "18.9.62.3.3.1 - (L2) Ensure Do not allow COM port redirection is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 1
            ValueName = 'fDisableCcm'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.3.2' -and $LevelOne){
        Registry "18.9.62.3.3.2 - (L1) Ensure Do not allow drive redirection is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 1
            ValueName = 'fDisableCdm'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.3.3' -and $LevelTwo){
        Registry "18.9.62.3.3.3 - (L2) Ensure Do not allow LPT port redirection is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 1
            ValueName = 'fDisableLPT'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.3.4' -and $LevelTwo){
        Registry "18.9.62.3.3.4 - (L2) Ensure Do not allow supported Plug and Play device redirection is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 1
            ValueName = 'fDisablePNPRedir'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.9.1' -and $LevelOne){
        Registry "18.9.62.3.9.1 - (L1) Ensure Always prompt for password upon connection is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 1
            ValueName = 'fPromptForPassword'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.9.2' -and $LevelOne){
        Registry "18.9.62.3.9.2 - (L1) Ensure Require secure RPC communication is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 1
            ValueName = 'fEncryptRPCTraffic'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.9.3' -and $LevelOne){
        Registry "18.9.62.3.9.3 - (L1) Ensure Require use of specific security layer for remote (RDP) connections is set to Enabled SSL" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 2
            ValueName = 'SecurityLayer'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.9.4' -and $LevelOne){
        Registry "18.9.62.3.9.4 - (L1) Ensure Require user authentication for remote connections by using Network Level Authentication is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 1
            ValueName = 'UserAuthentication'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.9.5' -and $LevelOne){
        Registry "18.9.62.3.9.5 - (L1) Ensure Set client connection encryption level is set to Enabled High Level" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 3
            ValueName = 'MinEncryptionLevel'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.10.1' -and $LevelTwo){
        Registry "18.9.62.3.10.1 - (L2) Ensure Set time limit for active but idle Remote Desktop Services sessions is set to Enabled 15 minutes or less but not Never (0)" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = $cis189623101MaxIdleTime
            ValueName = 'MaxIdleTime'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.10.2' -and $LevelTwo){
        Registry "18.9.62.3.10.2 - (L2) Ensure Set time limit for disconnected sessions is set to Enabled 1 minute" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 60000
            ValueName = 'MaxDisconnectionTime'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.11.1' -and $LevelOne){
        Registry "18.9.62.3.11.1 - (L1) Ensure Do not delete temp folders upon exit is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 1
            ValueName = 'DeleteTempDirsOnExit'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.62.3.11.2' -and $LevelOne){
        Registry "18.9.62.3.11.2 - (L1) Ensure Do not use temporary folders per session is set to Disabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services'
            ValueData = 1
            ValueName = 'PerSessionTempDir'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.63.1' -and $LevelOne){
        Registry "18.9.63.1 - (L1) Ensure Prevent downloading of enclosures is set to Enabled" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Internet Explorer\Feeds'
            ValueData = 1
            ValueName = 'DisableEnclosureDownload'
            ValueType = 'Dword'
        }
    }
    if($ExcludeList -notcontains '18.9.64.2' -and $LevelTwo){
        Registry "18.9.64.2 - (L2) Ensure Allow Cloud Search is set to Enabled Disable Cloud Search" {
            Ensure = 'Present'
            Key = 'HKLM:\Software\Policies\Microsoft\Windows\Windows Search'
            ValueData = 0
            ValueName = 'AllowCloudSearch'
            ValueType = 'Dword'
        }
    }
    if(