-
Notifications
You must be signed in to change notification settings - Fork 0
/
postsetup.ps1
2619 lines (2478 loc) · 389 KB
/
postsetup.ps1
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
# Credit to https://github.com/ChrisTitusTech/winutil & https://gamer-os.github.io/ as well as TCP Optimizer by https://www.speedguide.net/ for providing a majority of the scripting.
# Create a restore point
Write-Output "Creating a restore point..."
Checkpoint-Computer -Description "Before Postsetup Script" -RestorePointType "MODIFY_SETTINGS"
Write-Output "Done"
# Set Execution Policy to Unrestricted
Write-Output "Setting Execution Policy to Unrestricted..."
Set-ExecutionPolicy Unrestricted -Scope CurrentUser | Out-Null
Write-Output "Done"
# Run OO Shutup
Write-Output "Running OO Shutup..."
curl.exe -s "https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/ooshutup10_winutil_settings.cfg" -o $ENV:temp\ooshutup10.cfg
curl.exe -s "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -o $ENV:temp\OOSU10.exe
Start-Process $ENV:temp\OOSU10.exe -ArgumentList "$ENV:temp\ooshutup10.cfg /quiet" | Out-Null
Write-Output "Done"
# Remove Edge
#:: Standalone script by AveYo Source: https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat
Write-Output "Running Edge Removal..."
curl.exe -s "https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/edgeremoval.bat" -o $ENV:temp\edgeremoval.bat
Start-Process $ENV:temp\edgeremoval.bat | Out-Null
Write-Output "Done"
# Disable Telemetry
Write-Output "Disabling Telemetry..."
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0 | Out-Null
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" -Name "AllowBuildPreview" -Type DWord -Value 0 | Out-Null
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Software Protection Platform" -Name "NoGenTicket" -Type DWord -Value 1 | Out-Null
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\SQMClient\Windows")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\SQMClient\Windows" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\SQMClient\Windows" -Name "CEIPEnable" -Type DWord -Value 0 | Out-Null
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat" -Name "AITEnable" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppCompat" -Name "DisableInventory" -Type DWord -Value 1 | Out-Null
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\AppV\CEIP")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\AppV\CEIP" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\AppV\CEIP" -Name "CEIPEnable" -Type DWord -Value 0 | Out-Null
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\TabletPC")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\TabletPC" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\TabletPC" -Name "PreventHandwritingDataSharing" -Type DWord -Value 1 | Out-Null
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\TextInput")) {
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\TextInput" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\TextInput" -Name "AllowLinguisticDataCollection" -Type DWord -Value 0 | Out-Null
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -Type DWord -Value 1 | Out-Null
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) {
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 1 | Out-Null
If (!(Test-Path "HKLM:\SYSTEM\CurrentControlSet\Control\Remote Assistance")) {
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Remote Assistance" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Remote Assistance" -Name "fAllowToGetHelp" -Type DWord -Value 0 | Out-Null
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching")) {
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" -Name "SearchOrderConfig" -Type DWord -Value 1 | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Windows\Application Experience\ProgramDataUpdater" | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Windows\Autochk\Proxy" | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Windows\Windows Error Reporting\QueueReporting" | Out-Null
# Office 2016 / 2019
Disable-ScheduledTask -TaskName "Microsoft\Office\Office ClickToRun Service Monitor" -ErrorAction SilentlyContinue | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Office\OfficeTelemetryAgentFallBack2016" -ErrorAction SilentlyContinue | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Office\OfficeTelemetryAgentLogOn2016" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Performance Optimizations
Write-Output "Running Performance Optimizations..."
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "SystemResponsiveness" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NetworkThrottlingIndex" -Type DWord -Value 4294967295 | Out-Null
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "AutoEndTasks" -Type DWord -Value 1 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "AutoEndTasks" -Type DWord -Value 1 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "ClearPageFileAtShutdown" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\ControlSet001\Services\Ndu" -Name "Start" -Type DWord -Value 2 | Out-Null
Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name "MouseHoverTime" -Type DWord -Value 200 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name "IRPStackSize" -Type DWord -Value 30 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" -Name "GPU Priority" -Type DWord -Value 8 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" -Name "Priority" -Type DWord -Value 6 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" -Name "Scheduling Category" -Type String -Value "High" | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableCdp" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "AllowClipboardHistory" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "AllowCrossDeviceClipboard" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" -Name "EnableFeeds" -Type DWord -Value 30 | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Feeds" -Name "ShellFeedsTaskbarViewMode" -Type DWord -Value 2 | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "HideSCAMeetNow" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Typing Configuration
Write-Output "Running Typing Configuration..."
If (!(Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Control Panel\International")) {
New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Control Panel\International" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Control Panel\International" -Name "TurnOffAutocorrectMisspelledWords" -Type DWord -Value 1 | Out-Null
If (!(Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Control Panel\International")) {
New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Control Panel\International" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Control Panel\International" -Name "TurnOffHighlightMisspelledWords" -Type DWord -Value 0 | Out-Null
If (!(Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Control Panel\International")) {
New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Control Panel\International" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Control Panel\International" -Name "TurnOffOfferTextPredictions" -Type DWord -Value 1 | Out-Null
If (!(Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Control Panel\International")) {
New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Control Panel\International" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Control Panel\International" -Name "TurnOffInsertSpace" -Type DWord -Value 1 | Out-Null
If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\TabletTip\1.7")) {
New-Item -Path "HKCU:\SOFTWARE\Microsoft\TabletTip\1.7" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\TabletTip\1.7" -Name "EnableDoubleTapSpace" -Type DWord -Value 0 | Out-Null
If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Input\Settings")) {
New-Item -Path "HKCU:\SOFTWARE\Microsoft\Input\Settings" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Input\Settings" -Name "InsightsEnabled" -Type DWord -Value 0 | Out-Null
If (!(Test-Path "HKLM:\SYSTEM\CurrentControlSet\Services\RasMan\Parameters\Config\VpnCostedNetworkSettings")) {
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Services\RasMan\Parameters\Config\VpnCostedNetworkSettings" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\RasMan\Parameters\Config\VpnCostedNetworkSettings" -Name "InsightsEnabled" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Network Optimizations (Credit to TCP Optimizer by https://www.speedguide.net/)
Write-Output "Runnning Network Optimizations..."
Set-NetTCPSetting -SettingName internet -AutoTuningLevelLocal disabled | Out-Null
Set-NetTCPSetting -SettingName internet -ScalingHeuristics disabled | Out-Null
netsh int tcp set supplemental internet congestionprovider=ctcp
Set-NetOffloadGlobalSetting -ReceiveSegmentCoalescing disabled | Out-Null
Set-NetOffloadGlobalSetting -ReceiveSideScaling disabled | Out-Null
Disable-NetAdapterLso -Name * | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_MAXCONNECTIONSPER1_0SERVER" -Name "explorer.exe" -Type DWord -Value 10 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_MAXCONNECTIONSPER1_0SERVER" -Name "iexplore.exe" -Type DWord -Value 10 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_MAXCONNECTIONSPERSERVER" -Name "explorer.exe" -Type DWord -Value 10 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_MAXCONNECTIONSPERSERVER" -Name "iexplore.exe" -Type DWord -Value 10 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider" -Name "LocalPriority" -Type DWord -Value 4 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider" -Name "HostsPriority" -Type DWord -Value 5 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider" -Name "DnsPriority" -Type DWord -Value 6 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider" -Name "NetbtPriority" -Type DWord -Value 7 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Psched" -Name "NonBestEffortLimit" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\QoS" -Name "Do Not use NLA" -Type String -Value 1 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "AlwaysOn" -Type DWord -Value 1 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NetworkThrottlingIndex" -Type DWord -Value 0xffffffff | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NoLazyMode" -Type DWord -Value 1 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "SystemResponsiveness" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name "Size" -Type DWord -Value 3 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "LargeSystemCache" -Type DWord -Value 1 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -Name "MaxUserPort" -Type DWord -Value 65534 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -Name "TcpTimedWaitDelay" -Type DWord -Value 30 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\MSMQ\Parameters" -Name "TCPNoDelay" -Type String -Value "" | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -Name "DefaultTTL" -Type String -Value "" | Out-Null
Set-NetTCPSetting -SettingName internet -EcnCapability disabled | Out-Null
Set-NetOffloadGlobalSetting -Chimney disabled | Out-Null
Set-NetTCPSetting -SettingName internet -Timestamps disabled | Out-Null
Set-NetTCPSetting -SettingName internet -MaxSynRetransmissions 2 | Out-Null
Set-NetTCPSetting -SettingName internet -NonSackRttResiliency disabled | Out-Null
Set-NetTCPSetting -SettingName internet -InitialRtoMs 2000 | Out-Null
Set-NetTCPSetting -SettingName internet -MinRtoMs 300 | Out-Null
netsh interface ipv4 set subinterface "Ethernet 2" mtu=1492 store=persistent
netsh interface ipv6 set subinterface "Ethernet 2" mtu=1492 store=persistent
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{faf0c941-8197-4a30-b959-e93cf2efaf9c}" -Name "TcpAckFrequency" -Type String -Value "" | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{faf0c941-8197-4a30-b959-e93cf2efaf9c}" -Name "TcpDelAckTicks" -Type String -Value "" | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{faf0c941-8197-4a30-b959-e93cf2efaf9c}" -Name "TCPNoDelay" -Type String -Value "" | Out-Null
netsh interface ipv4 set subinterface "Ethernet" mtu=1492 store=persistent
netsh interface ipv6 set subinterface "Ethernet" mtu=1492 store=persistent
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{eca522f4-2df2-4e86-a441-ebcec874e655}" -Name "TcpAckFrequency" -Type String -Value "" | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{eca522f4-2df2-4e86-a441-ebcec874e655}" -Name "TcpDelAckTicks" -Type String -Value "" | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{eca522f4-2df2-4e86-a441-ebcec874e655}" -Name "TCPNoDelay" -Type String -Value "" | Out-Null
Write-Output "Done"
# Disable WiFi-Sense
Write-Output "Disabling WiFi-Sense..."
Set-ItemProperty -Path "HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Name "Value" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" -Name "Value" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Disable Activity History
Write-Output "Disabling Activity History..."
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableActivityFeed" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "PublishUserActivities" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "UploadUserActivities" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Disable Location Tracking
Write-Output "Disabling Location Tracking..."
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Name "Value" -Type String -Value "Deny" | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" -Name "SensorPermissionState" -Type Dword -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" -Name "Status" -Type Dword -Value 0 | Out-Null
Write-Output "Done"
# Disable Storage Sense
Write-Output "Disabling Storage Sense..."
Remove-Item -Path \"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy\" -Recurse -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Disable GameDVR
Write-Output "Disabling GameDVR..."
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_FSEBehavior" -Type Dword -Value 2 | Out-Null
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type Dword -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_DXGIHonorFSEWindowsCompatible" -Type Dword -Value 1 | Out-Null
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_HonorUserFSEBehaviorMode" -Type Dword -Value 1 | Out-Null
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_EFSEFeatureFlags" -Type Dword -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -Type Dword -Value 0 | Out-Null
Write-Output "Done"
# Services Tweaks
Write-Output "Running Service Tweaks..."
Set-Service -Name "AJRouter" -StartupType "Disabled"
Set-Service -Name "ALG" -StartupType "Manual"
Set-Service -Name "AppIDSvc" -StartupType "Manual"
Set-Service -Name "AppMgmt" -StartupType "Manual"
Set-Service -Name "AppReadiness" -StartupType "Manual"
Set-Service -Name "AppVClient" -StartupType "Disabled"
Set-Service -Name "AppXSvc" -StartupType "Manual"
Set-Service -Name "Appinfo" -StartupType "Manual"
Set-Service -Name "AssignedAccessManagerSvc" -StartupType "Disabled"
Set-Service -Name "AudioEndpointBuilder" -StartupType "Automatic"
Set-Service -Name "AudioSrv" -StartupType "Automatic"
Set-Service -Name "AxInstSV" -StartupType "Manual"
Set-Service -Name "BDESVC" -StartupType "Manual"
Set-Service -Name "BFE" -StartupType "Automatic"
Set-Service -Name "BITS" -StartupType "AutomaticDelayedStart"
Set-Service -Name "BTAGService" -StartupType "Manual"
Set-Service -Name "BcastDVRUserService_dc2a4" -StartupType "Manual"
Set-Service -Name "BluetoothUserService_dc2a4" -StartupType "Manual"
Set-Service -Name "BrokerInfrastructure" -StartupType "Automatic"
Set-Service -Name "Browser" -StartupType "Manual"
Set-Service -Name "BthAvctpSvc" -StartupType "Automatic"
Set-Service -Name "BthHFSrv" -StartupType "Automatic"
Set-Service -Name "CDPSvc" -StartupType "Manual"
Set-Service -Name "COMSysApp" -StartupType "Manual"
Set-Service -Name "CaptureService_dc2a4" -StartupType "Manual"
Set-Service -Name "CertPropSvc" -StartupType "Manual"
Set-Service -Name "ClipSVC" -StartupType "Manual"
Set-Service -Name "ConsentUxUserSvc_dc2a4" -StartupType "Manual"
Set-Service -Name "CoreMessagingRegistrar" -StartupType "Automatic"
Set-Service -Name "CredentialEnrollmentManagerUserSvc_dc2a4" -StartupType "Manual"
Set-Service -Name "CryptSvc" -StartupType "Automatic"
Set-Service -Name "CscService" -StartupType "Manual"
Set-Service -Name "DPS" -StartupType "Automatic"
Set-Service -Name "DcomLaunch" -StartupType "Automatic"
Set-Service -Name "CscService" -StartupType "Manual"
Set-Service -Name "DcpSvc" -StartupType "Manual"
Set-Service -Name "DevQueryBroker" -StartupType "Manual"
Set-Service -Name "DeviceAssociationBrokerSvc_dc2a4" -StartupType "Manual"
Set-Service -Name "DeviceAssociationService" -StartupType "Manual"
Set-Service -Name "DeviceInstall" -StartupType "Manual"
Set-Service -Name "DevicePickerUserSvc_dc2a4" -StartupType "Manual"
Set-Service -Name "DevicesFlowUserSvc_dc2a4" -StartupType "Manual"
Set-Service -Name "Dhcp" -StartupType "Automatic"
Set-Service -Name "DiagTrack" -StartupType "Disabled"
Set-Service -Name "DialogBlockingService" -StartupType "Disabled"
Set-Service -Name "DispBrokerDesktopSvc" -StartupType "Automatic"
Set-Service -Name "DisplayEnhancementService" -StartupType "Manual"
Set-Service -Name "DmEnrollmentSvc" -StartupType "Manual"
Set-Service -Name "Dnscache" -StartupType "Automatic"
Set-Service -Name "DoSvc" -StartupType "AutomaticDelayedStart"
Set-Service -Name "DsSvc" -StartupType "Manual"
Set-Service -Name "DsmSvc" -StartupType "Manual"
Set-Service -Name "DusmSvc" -StartupType "Automatic"
Set-Service -Name "EFS" -StartupType "Manual"
Set-Service -Name "EapHost" -StartupType "Manual"
Set-Service -Name "EntAppSvc" -StartupType "Manual"
Set-Service -Name "EventLog" -StartupType "Automatic"
Set-Service -Name "EventSystem" -StartupType "Automatic"
Set-Service -Name "FDResPub" -StartupType "Manual"
Set-Service -Name "Fax" -StartupType "Manual"
Set-Service -Name "FontCache" -StartupType "Automatic"
Set-Service -Name "FrameServer" -StartupType "Manual"
Set-Service -Name "FrameServerMonitor" -StartupType "Manual"
Set-Service -Name "GraphicsPerfSvc" -StartupType "Manual"
Set-Service -Name "HomeGroupListener" -StartupType "Manual"
Set-Service -Name "HomeGroupProvider" -StartupType "Manual"
Set-Service -Name "HvHost" -StartupType "Manual"
Set-Service -Name "IEEtwCollectorService" -StartupType "Manual"
Set-Service -Name "IKEEXT" -StartupType "Manual"
Set-Service -Name "InstallService" -StartupType "Manual"
Set-Service -Name "InventorySvc" -StartupType "Manual"
Set-Service -Name "IpxlatCfgSvc" -StartupType "Manual"
Set-Service -Name "FontCache" -StartupType "Automatic"
Set-Service -Name "KeyIso" -StartupType "Automatic"
Set-Service -Name "KtmRm" -StartupType "Manual"
Set-Service -Name "LSM" -StartupType "Automatic"
Set-Service -Name "LanmanServer" -StartupType "Automatic"
Set-Service -Name "LanmanWorkstation" -StartupType "Automatic"
Set-Service -Name "LicenseManager" -StartupType "Manual"
Set-Service -Name "LxpSvc" -StartupType "Manual"
Set-Service -Name "MSDTC" -StartupType "Manual"
Set-Service -Name "MSiSCSI" -StartupType "Manual"
Set-Service -Name "MapsBroker" -StartupType "AutomaticDelayedStart"
Set-Service -Name "McpManagementService" -StartupType "Manual"
Set-Service -Name "MessagingService_dc2a4" -StartupType "Manual"
Set-Service -Name "MicrosoftEdgeElevationService" -StartupType "Manual"
Set-Service -Name "MixedRealityOpenXRSvc" -StartupType "Manual"
Set-Service -Name "MpsSvc" -StartupType "Automatic"
Set-Service -Name "MsKeyboardFilter" -StartupType "Manual"
Set-Service -Name "NPSMSvc_dc2a4" -StartupType "Manual"
Set-Service -Name "NaturalAuthentication" -StartupType "Manual"
Set-Service -Name "NcaSvc" -StartupType "Manual"
Set-Service -Name "NcbService" -StartupType "Manual"
Set-Service -Name "NcdAutoSetup" -StartupType "Manual"
Set-Service -Name "NetTcpPortSharing" -StartupType "Disabled"
Set-Service -Name "Netlogon" -StartupType "Manual"
Set-Service -Name "Netman" -StartupType "Manual"
Set-Service -Name "NgcCtnrSvc" -StartupType "Manual"
Set-Service -Name "NgcSvc" -StartupType "Manual"
Set-Service -Name "NlaSvc" -StartupType "Manual"
Set-Service -Name "OneSyncSvc_dc2a4" -StartupType "Automatic"
Set-Service -Name "P9RdrService_dc2a4" -StartupType "Manual"
Set-Service -Name "PNRPAutoReg" -StartupType "Manual"
Set-Service -Name "PNRPsvc" -StartupType "Manual"
Set-Service -Name "PcaSvc" -StartupType "Manual"
Set-Service -Name "PeerDistSvc" -StartupType "Manual"
Set-Service -Name "PenService_dc2a4" -StartupType "Manual"
Set-Service -Name "PerfHost" -StartupType "Manual"
Set-Service -Name "PhoneSvc" -StartupType "Manual"
Set-Service -Name "PimIndexMaintenanceSvc_dc2a4" -StartupType "Manual"
Set-Service -Name "PlugPlay" -StartupType "Manual"
Set-Service -Name "PolicyAgent" -StartupType "Manual"
Set-Service -Name "Power" -StartupType "Automatic"
Set-Service -Name "PrintNotify" -StartupType "Manual"
Set-Service -Name "PrintWorkflowUserSvc_dc2a4" -StartupType "Manual"
Set-Service -Name "ProfSvc" -StartupType "Automatic"
Set-Service -Name "PushToInstall" -StartupType "Manual"
Set-Service -Name "QWAVE" -StartupType "Manual"
Set-Service -Name "RasAuto" -StartupType "Manual"
Set-Service -Name "RasMan" -StartupType "Manual"
Set-Service -Name "RemoteAccess" -StartupType "Disabled"
Set-Service -Name "RemoteRegistry" -StartupType "Disabled"
Set-Service -Name "RetailDemo" -StartupType "Manual"
Set-Service -Name "RmSvc" -StartupType "Manual"
Set-Service -Name "RpcEptMapper" -StartupType "Automatic"
Set-Service -Name "RpcLocator" -StartupType "Manual"
Set-Service -Name "RpcSs" -StartupType "Automatic"
Set-Service -Name "SCPolicySvc" -StartupType "Manual"
Set-Service -Name "SCardSvr" -StartupType "Manual"
Set-Service -Name "SDRSVC" -StartupType "Manual"
Set-Service -Name "SEMgrSvc" -StartupType "Manual"
Set-Service -Name "SENS" -StartupType "Automatic"
Set-Service -Name "SNMPTRAP" -StartupType "Manual"
Set-Service -Name "SNMPTrap" -StartupType "Manual"
Set-Service -Name "SSDPSRV" -StartupType "Manual"
Set-Service -Name "SENS" -StartupType "Automatic"
Set-Service -Name "SamSs" -StartupType "Automatic"
Set-Service -Name "ScDeviceEnum" -StartupType "Manual"
Set-Service -Name "Schedule" -StartupType "Automatic"
Set-Service -Name "SecurityHealthService" -StartupType "Manual"
Set-Service -Name "Sense" -StartupType "Manual"
Set-Service -Name "SensorDataService" -StartupType "Manual"
Set-Service -Name "SensorService" -StartupType "Manual"
Set-Service -Name "SensrSvc" -StartupType "Manual"
Set-Service -Name "SessionEnv" -StartupType "Manual"
Set-Service -Name "SgrmBroker" -StartupType "Automatic"
Set-Service -Name "SharedAccess" -StartupType "Manual"
Set-Service -Name "SharedRealitySvc" -StartupType "Manual"
Set-Service -Name "ShellHWDetection" -StartupType "Automatic"
Set-Service -Name "SmsRouter" -StartupType "Manual"
Set-Service -Name "Spooler" -StartupType "Automatic"
Set-Service -Name "SstpSvc" -StartupType "Manual"
Set-Service -Name "StateRepository" -StartupType "Manual"
Set-Service -Name "StorSvc" -StartupType "Manual"
Set-Service -Name "SysMain" -StartupType "Automatic"
Set-Service -Name "SystemEventsBroker" -StartupType "Automatic"
Set-Service -Name "TabletInputService" -StartupType "Manual"
Set-Service -Name "TapiSrv" -StartupType "Manual"
Set-Service -Name "TermService" -StartupType "Automatic"
Set-Service -Name "TextInputManagementService" -StartupType "Manual"
Set-Service -Name "Themes" -StartupType "Automatic"
Set-Service -Name "TieringEngineService" -StartupType "Manual"
Set-Service -Name "TimeBroker" -StartupType "Manual"
Set-Service -Name "TimeBrokerSvc" -StartupType "Manual"
Set-Service -Name "TokenBroker" -StartupType "Manual"
Set-Service -Name "TrkWks" -StartupType "Automatic"
Set-Service -Name "TroubleshootingSvc" -StartupType "Manual"
Set-Service -Name "TrustedInstaller" -StartupType "Manual"
Set-Service -Name "UI0Detect" -StartupType "Manual"
Set-Service -Name "UdkUserSvc_dc2a4" -StartupType "Manual"
Set-Service -Name "UevAgentService" -StartupType "Disabled"
Set-Service -Name "UmRdpService" -StartupType "Manual"
Set-Service -Name "UnistoreSvc_dc2a4" -StartupType "Manual"
Set-Service -Name "UserDataSvc_dc2a4" -StartupType "Manual"
Set-Service -Name "UserManager" -StartupType "Automatic"
Set-Service -Name "UsoSvc" -StartupType "Manual"
Set-Service -Name "VGAuthService" -StartupType "Automatic"
Set-Service -Name "VMTools" -StartupType "Automatic"
Set-Service -Name "VSS" -StartupType "Automatic"
Set-Service -Name "VacSvc" -StartupType "Manual"
Set-Service -Name "VaultSvc" -StartupType "Automatic"
Set-Service -Name "VacSvc" -StartupType "Manual"
Set-Service -Name "W32Time" -StartupType "Manual"
Set-Service -Name "WEPHOSTSVC" -StartupType "Manual"
Set-Service -Name "WFDSConMgrSvc" -StartupType "Manual"
Set-Service -Name "WMPNetworkSvc" -StartupType "Manual"
Set-Service -Name "WManSvcWManSvc" -StartupType "Manual"
Set-Service -Name "WManSvc" -StartupType "Manual"
Set-Service -Name "WPDBusEnum" -StartupType "Manual"
Set-Service -Name "WSService" -StartupType "Manual"
Set-Service -Name "WSearch" -StartupType "AutomaticDelayedStart"
Set-Service -Name "WaaSMedicSvc" -StartupType "Manual"
Set-Service -Name "WalletService" -StartupType "Manual"
Set-Service -Name "WarpJITSvc" -StartupType "Manual"
Set-Service -Name "WbioSrvc" -StartupType "Manual"
Set-Service -Name "Wcmsvc" -StartupType "Automatic"
Set-Service -Name "WdNisSvc" -StartupType "Manual"
Set-Service -Name "WdiServiceHost" -StartupType "Manual"
Set-Service -Name "WdiSystemHost" -StartupType "Manual"
Set-Service -Name "WebClient" -StartupType "Manual"
Set-Service -Name "Wecsvc" -StartupType "Manual"
Set-Service -Name "WerSvc" -StartupType "Manual"
Set-Service -Name "WiaRpc" -StartupType "Manual"
Set-Service -Name "WinDefend" -StartupType "Automatic"
Set-Service -Name "WcsPlugInService" -StartupType "Manual"
Set-Service -Name "WinHttpAutoProxySvc" -StartupType "Manual"
Set-Service -Name "WinRM" -StartupType "Manual"
Set-Service -Name "Winmgmt" -StartupType "Automatic"
Set-Service -Name "WlanSvc" -StartupType "Automatic"
Set-Service -Name "WpcMonSvc" -StartupType "Manual"
Set-Service -Name "WpnService" -StartupType "Manual"
Set-Service -Name "WpnUserService_dc2a4" -StartupType "Automatic"
Set-Service -Name "WwanSvc" -StartupType "Manual"
Set-Service -Name "XblAuthManager" -StartupType "Manual"
Set-Service -Name "XblGameSave" -StartupType "Manual"
Set-Service -Name "XboxGipSvc" -StartupType "Manual"
Set-Service -Name "XboxNetApiSvc" -StartupType "Manual"
Set-Service -Name "autotimesvc" -StartupType "Manual"
Set-Service -Name "bthserv" -StartupType "Manual"
Set-Service -Name "camsvc" -StartupType "Manual"
Set-Service -Name "cbdhsvc_dc2a4" -StartupType "Manual"
Set-Service -Name "cloudidsvc" -StartupType "Manual"
Set-Service -Name "dcsvc" -StartupType "Manual"
Set-Service -Name "defragsvc" -StartupType "Manual"
Set-Service -Name "diagnosticshub.standardcollector.service" -StartupType "Manual"
Set-Service -Name "diagsvc" -StartupType "Manual"
Set-Service -Name "dmwappushservice" -StartupType "Manual"
Set-Service -Name "dot3svc" -StartupType "Manual"
Set-Service -Name "edgeupdate" -StartupType "Manual"
Set-Service -Name "edgeupdatem" -StartupType "Manual"
Set-Service -Name "embeddedmode" -StartupType "Manual"
Set-Service -Name "fdPHost" -StartupType "Manual"
Set-Service -Name "fhsvc" -StartupType "Manual"
Set-Service -Name "gpsvc" -StartupType "Automatic"
Set-Service -Name "hidserv" -StartupType "Manual"
Set-Service -Name "icssvc" -StartupType "Manual"
Set-Service -Name "iphlpsvc" -StartupType "Automatic"
Set-Service -Name "lfsvc" -StartupType "Manual"
Set-Service -Name "lltdsvc" -StartupType "Manual"
Set-Service -Name "lmhosts" -StartupType "Manual"
Set-Service -Name "iphlpsvc" -StartupType "Automatic"
Set-Service -Name "mpssvc" -StartupType "Automatic"
Set-Service -Name "msiserver" -StartupType "Manual"
Set-Service -Name "netprofm" -StartupType "Manual"
Set-Service -Name "nsi" -StartupType "Automatic"
Set-Service -Name "p2pimsvc" -StartupType "Manual"
Set-Service -Name "p2psvc" -StartupType "Manual"
Set-Service -Name "perceptionsimulation" -StartupType "Manual"
Set-Service -Name "pla" -StartupType "Manual"
Set-Service -Name "seclogon" -StartupType "Manual"
Set-Service -Name "shpamsvc" -StartupType "Disabled"
Set-Service -Name "smphost" -StartupType "Manual"
Set-Service -Name "spectrum" -StartupType "Manual"
Set-Service -Name "sppsvc" -StartupType "AutomaticDelayedStart"
Set-Service -Name "ssh-agent" -StartupType "Disabled"
Set-Service -Name "svsvc" -StartupType "Manual"
Set-Service -Name "swprv" -StartupType "Manual"
Set-Service -Name "tiledatamodelsvc" -StartupType "Automatic"
Set-Service -Name "tzautoupdate" -StartupType "Disabled"
Set-Service -Name "uhssvc" -StartupType "Disabled"
Set-Service -Name "upnphost" -StartupType "Manual"
Set-Service -Name "vds" -StartupType "Manual"
Set-Service -Name "vm3dservice" -StartupType "Manual"
Set-Service -Name "vmicguestinterface" -StartupType "Manual"
Set-Service -Name "vmicheartbeat" -StartupType "Manual"
Set-Service -Name "vmickvpexchange" -StartupType "Manual"
Set-Service -Name "vmicrdv" -StartupType "Manual"
Set-Service -Name "vmicshutdown" -StartupType "Manual"
Set-Service -Name "vmictimesync" -StartupType "Manual"
Set-Service -Name "vmicvmsession" -StartupType "Manual"
Set-Service -Name "vmicvss" -StartupType "Manual"
Set-Service -Name "vmvss" -StartupType "Manual"
Set-Service -Name "wbengine" -StartupType "Manual"
Set-Service -Name "wcncsvc" -StartupType "Manual"
Set-Service -Name "webthreatdefsvc" -StartupType "Manual"
Set-Service -Name "webthreatdefusersvc_dc2a4" -StartupType "Automatic"
Set-Service -Name "wercplsupport" -StartupType "Manual"
Set-Service -Name "wisvc" -StartupType "Manual"
Set-Service -Name "wlidsvc" -StartupType "Manual"
Set-Service -Name "wlpasvc" -StartupType "Manual"
Set-Service -Name "wmiApSrv" -StartupType "Manual"
Set-Service -Name "workfolderssvc" -StartupType "Manual"
Set-Service -Name "wscsvc" -StartupType "AutomaticDelayedStart"
Set-Service -Name "wuauserv" -StartupType "Manual"
Set-Service -Name "wudfsvc" -StartupType "Manual"
Write-Output "Done"
# Disable Search Bloat
Write-Output "Disabling Search Bloat..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "BingSearchEnabled" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "CortanaConsent" -Type DWord -Value 0 | Out-Null
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "DisableWebSearch" -Type DWord -Value | Out-Null
Write-Output "Done"
# Disable Location Services
Write-Output "Disabling Location Services..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableLocation" -Type DWord -Value 1 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableLocationScripting" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Disable Automatic Maps Updates
Write-Output "Disabling Automatic Maps Updates..."
Set-ItemProperty -Path "HKLM:\SYSTEM\Maps" -Name "AutoUpdateEnabled" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Disable Feedback
Write-Output "Disabling Feedback..."
If (!(Test-Path "HKCU:\Software\Microsoft\Siuf\Rules")) {
New-Item -Path "HKCU:\Software\Microsoft\Siuf\Rules" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Siuf\Rules" -Name "NumberOfSIUFInPeriod" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "DoNotShowFeedbackNotifications" -Type DWord -Value 1 | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Windows\Feedback\Siuf\DmClient" -ErrorAction SilentlyContinue | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Disable Tailored Experiences
Write-Output "Disabling Tailored Experiences..."
If (!(Test-Path "HKCU:\Software\Policies\Microsoft\Windows\CloudContent")) {
New-Item -Path "HKCU:\Software\Policies\Microsoft\Windows\CloudContent" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Policies\Microsoft\Windows\CloudContent" -Name "DisableTailoredExperiencesWithDiagnosticData" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Disable Advertising ID
Write-Output "Disabling Advertising ID..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" -Name "DisabledByGroupPolicy" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Disable Error Reporting
Write-Output "Disabling Error Reporting..."
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "Disabled" -Type DWord -Value 1 | Out-Null
Disable-ScheduledTask -TaskName "Microsoft\Windows\Windows Error Reporting\QueueReporting" | Out-Null
Write-Output "Done"
# Enable System Restore for system drive
Write-Output "Enabling System Restore for system drive..."
Enable-ComputerRestore -Drive "$env:SYSTEMDRIVE"
vssadmin Resize ShadowStorage /On=$env:SYSTEMDRIVE /For=$env:SYSTEMDRIVE /MaxSize=10GB
Write-Output "Done"
# Disable Recycle Bin - Files will be permanently deleted without placing into Recycle Bin
Write-Output "Disabling Recycle Bin..."
If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer")) {
New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" | Out-Null
}
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoRecycleFiles" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Enable Action Center (Notification Center)
Write-Output "Enabling Action Center..."
Remove-ItemProperty -Path "HKCU:\Software\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter" -ErrorAction SilentlyContinue | Out-Null
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Disable Lock Screen
Write-Output "Disabling Lock Screen..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" -Name "NoLockScreen" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Disable Lock screen Blur - Applicable since 1903
Write-Output "Disabling Lock Screen Blur..."
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "DisableAcrylicBackgroundOnLogon" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Disable Aero Shake (minimizing other windows when one is dragged by mouse and shaken)
Write-Output "Disabling Aero Shake..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DisallowShaking" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Disable Accessibility Keys prompts (Sticky keys, Toggle keys, Filter keys)
Write-Output "Disabling Accessibility Keys Prompts..."
Set-ItemProperty -Path "HKCU:\Control Panel\Accessibility\StickyKeys" -Name "Flags" -Type String -Value "506" | Out-Null
Set-ItemProperty -Path "HKCU:\Control Panel\Accessibility\ToggleKeys" -Name "Flags" -Type String -Value "58" | Out-Null
Set-ItemProperty -Path "HKCU:\Control Panel\Accessibility\Keyboard Response" -Name "Flags" -Type String -Value "122" | Out-Null
Write-Output "Done"
# Hide Taskbar Search icon / box
Write-Output "Hiding Taskbar Search icon / box..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Hide Task View Button
Write-Output "Hiding Task View Button..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowTaskViewButton" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Set Taskbar Buttons to Always Combine and Hide Labels
Write-Output "Setting Taskbar Buttons to Always Combine and Hide Labels..."
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarGlomLevel" -ErrorAction SilentlyContinue | Out-Null
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "MMTaskbarGlomLevel" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Hide Taskbar People Icon
Write-Output "Hiding Taskbar People Icon..."
If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People")) {
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name "PeopleBand" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Showing All Tray Icons
Write-Output "Showing All Tray Icons..."
If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer")) {
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoAutoTrayNotify" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Hide Seconds from Taskbar
Write-Output "Hiding Seconds from Taskbar..."
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowSecondsInSystemClock" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Disable "Search for App in Store" for Unknown Extensions
Write-Output 'Disabling "Search for App in Store" for Unknown Extensions...'
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "NoUseStoreOpenWith" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Hide 'Recently added' list from Start Menu
Write-Output "Hiding 'Recently added' list from Start Menu..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "HideRecentlyAddedApps" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Hide "Most used" Apps List from Start Menu - Applicable until 1703 (hidden by default since then)
Write-Output 'Hiding "Most used" Apps List from Start Menu...'
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer")) {
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoStartMenuMFUprogramsList" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Set Control Panel View to Categories
Write-Output "Setting Control Panel View to Categories..."
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" -Name "StartupPage" -ErrorAction SilentlyContinue | Out-Null
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" -Name "AllItemsIconView" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Keyboard & Mouse Data Queue Size Reduction
Write-Output "Lowering Keyboard & Mouse Data Queue Size..."
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\mouclass\Parameters" -Name "InitialKeyboardIndicators" -Value 16 | Out-Null
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\kbdclass\Parameters" -Name "KeyboardDataQueueSize" -Value 10 | Out-Null
Write-Output "Done"
# Long Quantum Priority Seperation (https://forums.blurbusters.com/viewtopic.php?t=8535)
Write-Output "Increasing Quantum Priority Seperation..."
Set-ItemProperty -Path "HKLM:\SYSTEM\ControlSet001\Control\PriorityControl" -Name "Win32PrioritySeparation" -Value 16 | Out-Null
Write-Output "Done"
# Enable Dark Mode
Write-Output "Enabling Dark Mode..."
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name AppsUseLightTheme -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name SystemUsesLightTheme -Value 0 | Out-Null
Write-Output "Done"
# Enable NumLock on Startup
Write-Output "Enabling NumLock on Startup..."
If (!(Test-Path "HKU:")) {
New-PSDrive -Name "HKU" -PSProvider "Registry" -Root "HKEY_USERS" | Out-Null
}
Set-ItemProperty -Path "HKU:\.DEFAULT\Control Panel\Keyboard" -Name "InitialKeyboardIndicators" -Type DWord -Value 2147483650 | Out-Null
Add-Type -AssemblyName System.Windows.Forms
If (!([System.Windows.Forms.Control]::IsKeyLocked('NumLock'))) {
$wsh = New-Object -ComObject WScript.Shell
$wsh.SendKeys('{NUMLOCK}')
}
Write-Output "Done"
# Show File Extensions
Write-Output "Showing File Extensions..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideFileExt" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Disable Windows 11 Right Click Menu
Write-Output "Disabling Windows 11 Right Click Menu..."
New-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" -Name "InprocServer32" -force -value ""
Write-Output "Done"
# Set Windows Performance Optimizations
Write-Output "Setting Windows Performance Optimizations..."
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "DragFullWindows" -Type String -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type String -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Type Binary -Value ([byte[]](90,12,3,80,11,0,0,0)) | Out-Null
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Type String -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\Control Panel\Keyboard" -Name "KeyboardDelay" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewAlphaSelect" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewShadow" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAnimations" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" -Name "VisualFXSetting" -Type DWord -Value 3 | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "EnableAeroPeek" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "Wallpaper" -Type String -Value "" | Out-Null
Set-ItemProperty -Path "HKCU:\Control Panel\Colors" -Name "Background" -Type String -Value "0 120 215" | Out-Null
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "EnablePerProcessSystemDPI" -Type DWord -Value "0 120 215" | Out-Null
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Multimedia\Audio" -Name "UserDuckingPreference" -Type DWord -Value 3 | Out-Null
Write-Output "Done"
# Set Sound Scheme to No Sounds
Write-Output "Setting Sound Scheme to No Sounds..."
$SoundScheme = ".None"
Get-ChildItem -Path "HKCU:\AppEvents\Schemes\Apps\*\*" | ForEach-Object {
# If scheme keys do not exist in an event, create empty ones (similar behavior to Sound control panel).
If (!(Test-Path "$($_.PsPath)\$($SoundScheme)")) {
New-Item -Path "$($_.PsPath)\$($SoundScheme)" | Out-Null
}
If (!(Test-Path "$($_.PsPath)\.Current")) {
New-Item -Path "$($_.PsPath)\.Current" | Out-Null
}
# Get a regular string from any possible kind of value, i.e. resolve REG_EXPAND_SZ, copy REG_SZ or empty from non-existing.
$Data = (Get-ItemProperty -Path "$($_.PsPath)\$($SoundScheme)" -Name "(Default)" -ErrorAction SilentlyContinue)."(Default)"
# Replace any kind of value with a regular string (similar behavior to Sound control panel).
Set-ItemProperty -Path "$($_.PsPath)\$($SoundScheme)" -Name "(Default)" -Type String -Value $Data | Out-Null
# Copy data from source scheme to current.
Set-ItemProperty -Path "$($_.PsPath)\.Current" -Name "(Default)" -Type String -Value $Data | Out-Null
}
Set-ItemProperty -Path "HKCU:\AppEvents\Schemes" -Name "(Default)" -Type String -Value $SoundScheme | Out-Null
Write-Output "Done"
# Disable Windows Startup Sound
Write-Output "Disabling Windows Startup Sound..."
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation" -Name "DisableStartupSound" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Show File Operations Details
Write-Output "Showing File Operations Details..."
If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager")) {
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" -Name "EnthusiastMode" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Show Network Options on Lock Screen
Write-Output "Showing Network Options on Lock Screen..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "DontDisplayNetworkSelectionUI" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Enable File Delete Confirmation Dialog
Write-Output "Enabling File Delete Confirmation Dialog..."
If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer")) {
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "ConfirmFileDelete" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Enable Verbose Startup/Shutdown Status Messages
Write-Output "Enabling Verbose Startup/Shutdown Status Messages..."
If ((Get-CimInstance -Class "Win32_OperatingSystem").ProductType -eq 1) {
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "VerboseStatus" -Type DWord -Value 1 | Out-Null
} Else {
Remove-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "VerboseStatus" -ErrorAction SilentlyContinue | Out-Null
}
Write-Output "Done"
# Disable Adding "- shortcut" to Shortcut Name
Write-Output 'Disabling Adding "- shortcut" to Shortcut Name...'
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer" -Name "link" -Type Binary -Value ([byte[]](0,0,0,0)) | Out-Null
Write-Output "Done"
# Show Shortcut Icon Arrow
Write-Output "Showing Shortcut Icon Arrow..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" -Name "29" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Disable F1 Help Key in Explorer and on Desktop
Write-Output "Disabling F1 Help Key..."
If (!(Test-Path "HKCU:\Software\Classes\TypeLib\{8cec5860-07a1-11d9-b15e-000d56bfe6ee}\1.0\0\win32")) {
New-Item -Path "HKCU:\Software\Classes\TypeLib\{8cec5860-07a1-11d9-b15e-000d56bfe6ee}\1.0\0\win32" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Classes\TypeLib\{8cec5860-07a1-11d9-b15e-000d56bfe6ee}\1.0\0\win32" -Name "(Default)" -Type "String" -Value "" | Out-Null
If (!(Test-Path "HKCU:\Software\Classes\TypeLib\{8cec5860-07a1-11d9-b15e-000d56bfe6ee}\1.0\0\win64")) {
New-Item -Path "HKCU:\Software\Classes\TypeLib\{8cec5860-07a1-11d9-b15e-000d56bfe6ee}\1.0\0\win64" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Classes\TypeLib\{8cec5860-07a1-11d9-b15e-000d56bfe6ee}\1.0\0\win64" -Name "(Default)" -Type "String" -Value "" | Out-Null
Write-Output "Done"
# Show Full Directory Path in Explorer Title Bar
Write-Output "Showing Full Directory Path in Explorer Title Bar..."
If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState")) {
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState" -Force | Out-Null
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState" -Name "FullPath" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Enable NTFS Paths with Length Over 260 Characters
Write-Output "Enabling NTFS Paths with Length Over 260 Characters..."
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Hide Hidden Files
Write-Output "Hiding Hidden Files..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "Hidden" -Type DWord -Value 2 | Out-Null
Write-Output "Done"
# Hide Protected Operating System Files
Write-Output "Hiding Protected Operating System Files..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowSuperHidden" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Show Empty Drives (With No Media)
Write-Output "Showing Empty Drives (With No Media)..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideDrivesWithNoMedia" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Show Folder Merge Conflicts
Write-Output "Showing Folder Merge Conflicts..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideMergeConflicts" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Disable Explorer Navigation Pane Expanding to Current Folder
Write-Output "Disabling Navigation Pane Expanding to Current Folder..."
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "NavPaneExpandToCurrentFolder" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Hide all folders from Explorer navigation pane except the basic ones (Quick access, OneDrive, This PC, Network)
Write-Output "Hiding All Folders in Explorer Navigation Pane (Except the Basic Ones)..."
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "NavPaneShowAllFolders" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Hide Libraries from Explorer Navigation Pane
Write-Output "Hiding Libraries from Explorer Navigation Pane..."
Remove-ItemProperty -Path "HKCU:\Software\Classes\CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}" -Name "System.IsPinnedToNameSpaceTree" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Disable Launching Folder Windows in a Separate Process
Write-Output "Disabling Launching Folder Windows in a Separate Process..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "SeparateProcess" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Disable Restoring Previous Folder Windows at Logon
Write-Output "Disabling Restoring Previous Folder Windows at Logon..."
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "PersistBrowsers" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Hide Coloring of Encrypted or Compressed NTFS Files
Write-Output "Hiding Coloring of Encrypted or Compressed NTFS Files..."
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowEncryptCompressedColor" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Disable Sharing Wizard
Write-Output "Disabling Sharing Wizard..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "SharingWizardOn" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Show Item Selection Checkboxes
Write-Output "Showing Item Selection Checkboxes..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "AutoCheckSelect" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Hide Sync Provider Notifications
Write-Output "Hiding Sync Provider Notifications..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowSyncProviderNotifications" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Disable Recent Files Lists
Write-Output "Disabling Recent Files Lists..."
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer")) {
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoRecentDocsHistory" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Hide Recent and Frequently Used Item Shortcuts in Explorer
Write-Output "Hiding Recent and Frequently Used Item Shortcuts in Explorer..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer" -Name "ShowRecent" -Type DWord -Value 0 | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer" -Name "ShowFrequent" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Change Default Explorer View to This PC
Write-Output "Changing Default Explorer View to This PC..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Show Quick Access in Explorer Navigation Pane
Write-Output "Showing Quick Access in Explorer Navigation Pane..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "HubMode" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Hide All Icons from Desktop
Write-Output "Hiding All Icons from Desktop..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideIcons" -Value 1 | Out-Null
Write-Output "Done"
# Remove Windows Build Number and Windows Edition (Home/Pro/Enterprise) from Bottom Right of Desktop
Write-Output "Hiding Windows Build Number from Desktop..."
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "PaintDesktopVersion" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Hide "Include in Library" Context Menu Item
Write-Output 'Hiding "Include in Library" Context Menu Item...'
If (!(Test-Path "HKCR:")) {
New-PSDrive -Name "HKCR" -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" | Out-Null
}
Remove-Item -Path "HKCR:\Folder\ShellEx\ContextMenuHandlers\Library Location" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Hide "Give Access To" (until 1703 'Share With') Context Menu Item.
Write-Output 'Hiding "Give Access To" Context Menu Item...'
If (!(Test-Path "HKCR:")) {
New-PSDrive -Name "HKCR" -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" | Out-Null
}
Remove-Item -LiteralPath "HKCR:\*\shellex\ContextMenuHandlers\Sharing" -ErrorAction SilentlyContinue | Out-Null
Remove-Item -Path "HKCR:\Directory\Background\shellex\ContextMenuHandlers\Sharing" -ErrorAction SilentlyContinue | Out-Null
Remove-Item -Path "HKCR:\Directory\shellex\ContextMenuHandlers\Sharing" -ErrorAction SilentlyContinue | Out-Null
Remove-Item -Path "HKCR:\Drive\shellex\ContextMenuHandlers\Sharing" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Hide 'Share' Context Menu Item. Applicable since 1709
Write-Output 'Hiding "Share" Context Menu Item...'
If (!(Test-Path "HKCR:")) {
New-PSDrive -Name "HKCR" -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" | Out-Null
}
Remove-Item -LiteralPath "HKCR:\*\shellex\ContextMenuHandlers\ModernSharing" -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Enable Thumbnails
Write-Output "Enabling Thumbnails..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "IconsOnly" -Type DWord -Value 0 | Out-Null
Write-Output "Done"
# Disable Creation of Thumbnail Cache Files
Write-Output "Disabling Creation of Thumbnail Cache Files..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DisableThumbnailCache" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Disable creation of Thumbs.db Thumbnail Cache Files on Network Folders
Write-Output "Disabling Creation of Thumbs.db on Network Folders..."
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DisableThumbsDBOnNetworkFolders" -Type DWord -Value 1 | Out-Null
Write-Output "Done"
# Unset Photo Viewer Association for bmp, gif, jpg, png and tif
Write-Output "Unsetting Photo Viewer Association for bmp, gif, jpg, png and tif..."
If (!(Test-Path "HKCR:")) {
New-PSDrive -Name "HKCR" -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" | Out-Null
}
Remove-Item -Path "HKCR:\Paint.Picture\shell\open" -Recurse -ErrorAction SilentlyContinue | Out-Null
Remove-ItemProperty -Path "HKCR:\giffile\shell\open" -Name "MuiVerb" -ErrorAction SilentlyContinue | Out-Null
Set-ItemProperty -Path "HKCR:\giffile\shell\open" -Name "CommandId" -Type String -Value "IE.File" | Out-Null
Set-ItemProperty -Path "HKCR:\giffile\shell\open\command" -Name "(Default)" -Type String -Value "`"$env:SystemDrive\Program Files\Internet Explorer\iexplore.exe`" %1" | Out-Null
Set-ItemProperty -Path "HKCR:\giffile\shell\open\command" -Name "DelegateExecute" -Type String -Value "{17FE9752-0B5A-4665-84CD-569794602F5C}" | Out-Null
Remove-Item -Path "HKCR:\jpegfile\shell\open" -Recurse -ErrorAction SilentlyContinue | Out-Null
Remove-Item -Path "HKCR:\pngfile\shell\open" -Recurse -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Remove Photo Viewer from 'Open with...'
Write-Output 'Removing Photo Viewer from "Open with..."'
If (!(Test-Path "HKCR:")) {
New-PSDrive -Name "HKCR" -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" | Out-Null
}
Remove-Item -Path "HKCR:\Applications\photoviewer.dll\shell\open" -Recurse -ErrorAction SilentlyContinue | Out-Null
Write-Output "Done"
# Disable Built-in Adobe Flash in IE and Edge
Write-Output "Disabling Built-in Adobe Flash in IE and Edge..."
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Internet Explorer")) {