91 Commits
2.6 ... 2.14

Author SHA1 Message Date
Disassembler
dc0a121435 v2.14, 2018-04-06
- Fix and reorganize Telemetry tweaks
 - Update "Enable Remote Desktop" to enable firewall rules (thx @timmytandian)
 - Add "Uninstall Internet Explorer" (thx @mhujer)
 - Add "Enable strong cryptography for .NET Framework" (thx @Sta2s)
 - Add "Enable Audio" for Server
 - Add default preset for making custom presets easier (thx @Conder000)
2018-04-06 16:18:42 +02:00
Disassembler
1ab60c363e Add "Enable Audio" (for Server) 2018-04-06 15:54:35 +02:00
Disassembler
575b7ef26a Add "Enable strong cryptography for .NET Framework", closes #64 (thx @Sta2s) 2018-04-06 14:41:03 +02:00
Disassembler
7be6666d1d Cleanup after #66 2018-04-06 14:37:55 +02:00
Martin Hujer
4df2b8cc44 Add "Uninstall Internet Explorer" (#62) 2018-04-06 14:20:50 +02:00
Disassembler
9dcbd908f4 Add firewall rules modification to Remote Desktop tweaks, closes #63 2018-04-06 14:17:02 +02:00
Disassembler
cf870330c8 Fix and reorganize Telemetry tweaks, closes #67 2018-04-06 13:57:55 +02:00
Conder000
3bdb745e0f Added default preset to the /test folder (#66) 2018-04-06 13:19:28 +02:00
Disassembler
5fe7d91b79 v2.13, 2018-03-18
- Add "Disable Windows Script Host"
 - Add "Uninstall Microsoft Print to PDF"
 - Add "Uninstall Microsoft XPS Document Writer"
 - Add "Remove Default Fax Printer" (thx @MisterDuval)
 - Add more 3rd party bloatware for removal (thx @iamteerawut)
 - Add more Microsoft bloatware for removal
 - Replace Write-Host cmdlet with Write-Output
 - Reorganize and regroup the tweaks a bit
2018-03-18 20:22:44 +01:00
Disassembler
615ff8cacc Add tweaks for default printers uninstallation, reimplements and closes #58 (thx @MisterDuval) 2018-03-18 20:12:03 +01:00
Disassembler
42fde5e945 Remove additional Microsoft bloatware 2018-03-18 12:15:14 +01:00
Disassembler
e3570d5f28 Add "Disable Windows Script Host" 2018-03-18 11:41:57 +01:00
Disassembler
7de3e81c79 Reorganize and regroup tweaks - no functional changes 2018-03-18 11:19:28 +01:00
Disassembler
a41c0eea7b Replace Write-Host cmdlet with Write-Output, closes #44 once and for all 2018-03-18 09:58:24 +01:00
Disassembler
ccc65c4ad3 Remove additonal 3rd party bloatware, closes #60 (thx @iamteerawut) 2018-03-18 09:50:01 +01:00
Disassembler
17a5c51e66 Add a warning for DisableTelemetry, kinda sorta resolves #57 2018-03-18 09:46:31 +01:00
Disassembler
1eaa9d58bd Unify coding style 2018-01-10 08:45:22 +01:00
Disassembler
e24132e074 v2.12, 2018-01-09
- Add "Enable Meltdown (CVE-2017-5754) compatibility flag"
 - Add "Unpin Start Menu tiles" + "Unpin Taskbar icons" (kinda experimental)
 - Fix "Enable Storage Sense" by setting more registries (thx @zerolagaux)
 - Add more 3rd bloatware for removal (thx @zerolagaux)
 - Comment "Enable Controlled Folder Access" from default preset as it conflicts with some installers
 - Disable scheduled tasks related to Telemetry, Feedback and error reporting (thx @xomx)
2018-01-09 16:49:57 +01:00
Disassembler
04b85dac57 Disable tasks related to Telemetry, Feedback and error reporting, closes #37 for now (thx @xomx) 2018-01-09 16:49:08 +01:00
Disassembler
18e75afef6 Add "Unpin Start Menu tiles" + "Unpin Taskbar icons", closes #8 2018-01-09 14:05:59 +01:00
Disassembler
46f3881d2b Unify coding style for Remove-Item, Get-ChildItem and ForEach 2018-01-09 14:02:38 +01:00
Disassembler
b67276058b Remove even more 3rd bloatware, closes #54 (thx @zerolagaux) 2018-01-09 10:13:18 +01:00
Disassembler
8d468e7df1 Set more EnableStorageSense registries, fixes #53 (thx @zerolagaux) 2018-01-09 10:13:00 +01:00
Disassembler
ebaa3d0ba7 Add "Enable Meltdown (CVE-2017-5754) compatibility flag" (commented by default) 2018-01-08 20:54:01 +01:00
Disassembler
e9b915a2da Comment EnableCtrldFolderAccess from default preset as it conflicts with some installers + Fix typo. 2017-12-30 13:24:43 +01:00
Disassembler
3e1c7feeb6 v2.11, 2017-12-27
- Add "Disable Windows Defender Cloud" (thx @bajasoft)
 - Add "Set Control Panel view to icons (Classic)" (thx @DavidBrockmeier)
 - Add "Disable automatic installation of network devices"
 - Add "Disable Sleep start menu and keyboard button" (thx @thecek)
 - Add "Disable display and sleep mode timeouts" (thx @thecek)
 - Add more registry keys for "Disable Wi-Fi Sense" (thx @kukubau)
 - Remove even more bloatware (thx @thecek)
 - Update "Disable Background apps" to not break start menu search
 - Add both ways of hiding Library icons in This PC (either only in This PC or also in other Explorer windows like Personal Folders and open/save dialog)
2017-12-27 19:49:14 +01:00
Disassembler
491be4acc2 Suppress few more warnings when adding/removing nonexistant keys 2017-12-27 19:42:33 +01:00
Disassembler
538a1fdd39 Reintroduce post-1.5 way of hiding icons in Explorer once again
(Previously reverted in 157bf35, related to #36. Sorry for the bloat, I really hate these icons)
2017-12-27 17:58:28 +01:00
Disassembler
50362f37e1 Update DisableBackgroundApps to not break start menu search, again closes #42 2017-12-27 15:52:52 +01:00
Disassembler
871cad8660 Add "Disable display and sleep mode timeouts", closes #50, thx @thecek 2017-12-27 14:19:12 +01:00
Disassembler
5eb8a84dce Add "Disable Sleep start menu and keyboard button" as suggested in #50 2017-12-27 13:56:50 +01:00
Disassembler
d93d5ac4df Add more registry keys for "Disable Wi-Fi Sense", closes #48, thx @kukubau 2017-12-27 10:54:36 +01:00
Disassembler
b6840e2ba2 Add "Disable automatic installation of network devices", closes #47 2017-12-27 10:46:41 +01:00
Disassembler
6830298064 Add "Set Control Panel view to icons (Classic)", reimplements #45, thx @DavidBrockmeier 2017-12-27 09:56:20 +01:00
Disassembler
39a1d9022d Remove more bloatware, closes #43 (thx @thecek) 2017-12-01 16:59:12 +01:00
Disassembler
3f9e7e84a1 Another take on "Disable Background apps" related to #40 and #42 2017-11-13 19:10:19 +01:00
Disassembler
59b2000f6c Fix typo in default preset 2017-11-11 20:27:24 +01:00
Disassembler
b1447c0fc9 Don't apply "DisableBackgroundApps" in default preset, closes #40
+ Add tests for "EnableDefenderCloud"
2017-11-10 16:24:54 +01:00
Jan Bajer
c79ed38b66 Add "Disable Windows Defender Cloud" (#41) 2017-11-10 14:06:35 +01:00
Disassembler
c935abafa3 v2.10, 2017-11-09
- Add "Enable Controlled Folder Access"
- Add "Disable Lock screen Spotlight"
- Add "Enable Storage Sense"
- Add "Show User Folder on desktop"
- Add "Disable Background application access"
- Update "Disable Start Menu suggestions" (thx @Dvorak-Stepan)
- Update bloatware removal list with Print3D and Xbox.TCUI
- Update "Disable Advertising ID" to disable also advertisement telemetry
- Merge "DisableConsumerApps" and "DisableStartSuggestions" into "DisableAppSuggestions"
- Update the way of hiding icons in This PC, so they're not hidden also in personal folders
2017-11-10 00:06:10 +01:00
Disassembler
14bf1e8477 Add additional check in "Disable Advertising ID", remove unnecessary -Force 2017-11-10 00:03:59 +01:00
Disassembler
2f8e43cc03 Add "Enable Storage Sense", closes #39 2017-11-09 23:34:39 +01:00
Disassembler
e0c9dd1df7 Add "Disable Background application access", related to #39 2017-11-09 22:33:04 +01:00
Disassembler
157bf356dc Revert to pre-1.5 way of hiding icons from This PC, kinda fixes #36.
Less reliable, but doesn't hide them in Personal folders.
2017-11-09 22:07:54 +01:00
Disassembler
d1089630c5 Add "Show User Folder on desktop", related to #39 2017-11-09 21:40:33 +01:00
Disassembler
936e0da7ec Merge DisableConsumerApps into DisableAppSuggestions, closes #35 2017-11-09 21:27:55 +01:00
Disassembler
71b8166b9e Rename DisableStartSuggestions to DisableAppSuggestions and add few more Content Delivery Manager values, related to #35 2017-11-09 21:24:02 +01:00
Disassembler
23f19fd851 Add "Disable Lock screen Spotlight", related to #35 2017-11-09 21:08:39 +01:00
Disassembler
9c957d217c Fix typo in "Show network options on lock screen" registry hive 2017-11-09 21:08:14 +01:00
Disassembler
90deb26b55 Update "Disable Advertising ID" to disable also advertisement telemetry 2017-11-09 19:35:52 +01:00
Disassembler
dac835801a Add some more bloatware for removal, closes #38 2017-11-09 19:17:09 +01:00
Disassembler
ad09c6ec67 Update "Disable Start Menu suggestions" for 1709, closes #35 (thx @Dvorak-Stepan) 2017-10-31 14:04:32 +01:00
Disassembler
11dd5c64e5 Add "Enable Controlled Folder Access", closes #33 2017-10-27 14:50:44 +02:00
Disassembler0
1f67aedeab Clarify defaults and fix typo in README 2017-10-22 17:08:02 +02:00
Disassembler
94216899a5 v2.9, 2017-10-22
- Added "DisableSharedExperiences" (thx @DaNy3LL)
- Added "Hide3DObjectsFromThisPC"
- Added "DisableAdobeFlash"
- Commented out "DisableSMB1" as 1709 (RS3) disables it implicitly
2017-10-22 14:35:03 +02:00
Disassembler
d427ae7354 Normalize preset path while passing to elevated script, resolves #27 2017-10-22 14:33:47 +02:00
Disassembler0
8b88e2deeb Add a note about multi-user envs in README 2017-09-29 08:30:29 +02:00
Disassembler
3fa306ac8f Pass command line args into elevation call instead of function args, fixes #26 2017-09-10 23:35:06 +02:00
Disassembler
61763b3c63 v2.8, 2017-09-09
- Added "EnableFileDeleteConfirm" (thx @Conder000)
- Added "HideNetworkFromLockScreen"  (thx @Conder000)
- Added "HideShutdownFromLockScreen"
- Added "DisableThumbnails"
- Added "DisableThumbsDB" (thx @johnburnett)
- Added "DisableMapUpdates" (thx @DaNy3LL)
- Added more speedup tweaks for "SetVisualFXPerformance" (thx @johnburnett)
BREAKING CHANGES - update your presets:
- Added "RequireAdmin" for on-demand elevation (allows creation of non-elevated customizations)
- Renamed "RestrictUpdateP2P" to "SetP2PUpdateLocal"
- Renamed "LowerUAC" to "SetUACLow"
- Renamed "ExplorerThisPC" to "SetExplorerThisPC"
2017-09-09 13:35:40 +02:00
Disassembler
58ff7a00d1 Improve support for spaces in paths and preset file name 2017-09-09 12:27:13 +02:00
Disassembler
727bf0d09b Merge branch 'elevate-on-demand' 2017-09-09 10:31:39 +02:00
Disassembler
70033c0a11 Rename and adjust tweak names in accordance with guidelines 2017-09-09 10:20:53 +02:00
Disassembler
ef8e0074c4 Add contribution guidelines to README 2017-09-09 10:18:00 +02:00
Disassembler
2e93e01aa1 Add "DisableMapUpdates" 2017-09-09 09:38:36 +02:00
Disassembler
9da73e107a Add "DisableNoLoginShutdown" 2017-09-09 09:37:12 +02:00
Disassembler
db90cefd5b Add "DisableThumbnails" 2017-09-09 08:12:47 +02:00
Disassembler
303eaf737f Add more speedup tweaks for "SetVisualFXPerformance" based on #24 2017-09-09 08:11:31 +02:00
Disassembler
f5d849a32d Rearrange functions after merging 2017-09-09 08:10:51 +02:00
Disassembler0
8169e550ea Merge pull request #25 from johnburnett/disable-thumbs-db
Added Thumbs.db toggles
2017-09-09 08:06:37 +02:00
Disassembler0
fcae96daa4 Merge pull request #22 from Conder000/hidenetwork
Added HideNetworkFromLockScreen function
2017-09-09 08:06:30 +02:00
Disassembler0
2f20cacfdf Merge pull request #21 from Conder000/confirmfiledelete
Added EnableFileDeleteConfirmation function
2017-09-09 08:06:21 +02:00
John Burnett
4d419b722b Added Thumbs.db toggles 2017-09-07 22:34:20 -07:00
Conder000
4085887741 Grammar fix 2017-09-01 03:20:12 +02:00
Conder000
2fd170080e Added HideNetworkFromLockScreen function
* Added HideNetworkFromLockScreen function
* GPO equivalent: Do not display network selection UI
2017-09-01 02:48:32 +02:00
Conder000
f870886df7 Added EnableFileDeleteConfirmation function
* Added EnableFileDeleteConfirmation function
* GPO equivalent: Display confirmation dialog when deleting files
2017-09-01 02:36:40 +02:00
Disassembler
4167b3b6be v2.7, 2017-08-19
- Added more bloatware for removal (thx @Conder000)
- Added "Disable fast startup" (thx @Conder000)
- Added "Enable hibernation"
- Added "Set visual effects for performance"
- Modified "Disable Update Restart" to disable automatic wake-up from sleep (thx @Conder000)
- Modified "Disable Update Restart" to remove obsolete UxOption tweak used on pre-RS1 builds
- Fix errors while applying revert functions on untweaked systems
2017-08-19 20:50:54 +02:00
Disassembler
a2e9fede9f Fix errors while applying revert functions on untweaked systems (although it's not recommended) 2017-08-19 20:50:00 +02:00
Disassembler
ed1524589b Update FAQ based on #19 2017-08-19 20:02:13 +02:00
Disassembler
8f599210e3 Add "Set visual effects for performance/appearance" 2017-08-19 19:58:34 +02:00
Disassembler
1fe7cad283 Add "Enable hibernation" 2017-08-19 19:57:34 +02:00
Disassembler
90399bdd07 Modify "Disable Update Restart" to remove obsolete UxOption tweak used on pre-RS1 builds 2017-08-19 19:55:08 +02:00
Disassembler
3bc4e67d00 Add removal of "CAF9E577.Plex" 3rd party bloatware 2017-08-19 19:53:11 +02:00
Disassembler0
b31bfe5ee8 Merge pull request #18 from Conder000/winupdate
Added AUPowerManagement
2017-08-19 15:47:31 +02:00
Disassembler0
5cfec604ef Merge pull request #17 from Conder000/faststartup
Added DisableFastStartup function
2017-08-19 15:47:20 +02:00
Disassembler0
56845c817b Merge pull request #16 from Conder000/bloat
Added third party bloatware
2017-08-19 15:47:08 +02:00
Conder000
7934a1ad75 Added AUPowerManagement
* Added registry value AUPowerManagement=0 to DisableUpdateRestart function
* GPO equivalent: Enabling Windows Update Power Management to automatically wake up the system to install scheduled updates
2017-08-16 00:27:56 +02:00
Conder000
770059d362 Added DisableFastStartup function 2017-08-14 20:44:39 +02:00
Conder000
7fa9d1a1e5 Added third party bloatware
* Added some third party bloatware (Win10 v1703)
2017-08-13 01:08:54 +02:00
Disassembler0
4332b46084 Merge pull request #13 from alirobe/patch-1
add write-hosts for third party bloat functions
2017-08-02 07:26:55 +02:00
Ali Robertson
320590c2d5 add write-hosts for third party bloat install 2017-08-02 11:33:45 +10:00
Disassembler
e62abd0cfc Move implicit privilege elevation to function. See #11 for details. 2017-07-29 19:12:31 +02:00
12 changed files with 1576 additions and 445 deletions

View File

@@ -2,7 +2,7 @@
This is a PowerShell script for automation of routine tasks done after fresh installations of Windows 10 and Windows Server 2016. This is by no means any complete set of all existing Windows tweaks and neither is it another "antispying" type of script. It's simply a setting which I like to use and which in my opinion make the system less obtrusive.
This repository has been originally created as complementary to article https://www.dasm.cz/clanek/jak-z-windows-10-udelat-desktopovy-system (written in Czech) which explains the respective snippets a bit more in detail. The article was last updated on 2016-08-15 and will not be updated further. All development and discussion has been moved here.
This repository has been originally created as complementary to article <https://www.dasm.cz/clanek/jak-z-windows-10-udelat-desktopovy-system> (written in Czech) which explains the respective snippets a bit more in detail. The article was last updated on 2016-08-15 and will not be updated further. All development and discussion has been moved here.
## Usage
If you just want to run the script with default preset, simply right click on the *Win10.ps1* file, choose *Run with PowerShell*, and confirm execution policy change. Make sure your account is a member of *Administrators* group as the script attempts to run with elevated privileges.
@@ -38,7 +38,7 @@ Command using the preset file above:
**A:** Yes! In fact the script has been written to support exactly this as it's not uncommon that big Windows Updates reset some of the settings.
**Q:** Can I run the script in multi-user environment?
**A:** Yes, to certain extent. Some tweaks (most notably UI tweaks) are set only for the user currently executing the script. As stated above, the script can be run repeatedly; therefore it's possible to run it multiple times, each time as different user. Due to the nature of authentication and privilege escalation mechanisms in Windows, the script can be successfully applied only for users belonging to *Administrators* group. Standard users will get an UAC prompt asking for admin credentials which then causes the tweaks to be applied to the given admin account instead of the original non-privileged one. To circumvent this, add the standard user to the *Administrators* group, run the script, and then remove the user from *Administrators* group again. There are a few ways how the same functionality can be achieved programmatically, but I'm not planning to include any of them as it would negatively impact code complexity and readability.
**A:** Yes, to certain extent. Some tweaks (most notably UI tweaks) are set only for the user currently executing the script. As stated above, the script can be run repeatedly; therefore it's possible to run it multiple times, each time as different user. Due to the nature of authentication and privilege escalation mechanisms in Windows, the script can be successfully applied only for users belonging to *Administrators* group. Standard users will get an UAC prompt asking for admin credentials which then causes the tweaks to be applied to the given admin account instead of the original non-privileged one. To circumvent this, add the standard user to the *Administrators* group, run the script, and then remove the user from *Administrators* group again. There are a few ways how the same functionality can be achieved programmatically, but I'm not planning to include any of them as it would negatively impact code complexity and readability. If you still wish to try to use the script in multi-user environment, check [this answer in issue #29](https://github.com/Disassembler0/Win10-Initial-Setup-Script/issues/29#issuecomment-333040591) for some pointers.
**Q:** Can I run the script on Windows Server 2016?
**A:** Yes. Starting from version 2.5, Windows Server 2016 is supported. There are even few tweaks specific to Server environment. Keep in mind though, that the script is still primarily designed for Windows 10, so you have to create your own preset for Windows Server 2016.
@@ -50,7 +50,7 @@ Command using the preset file above:
**A:** Yes. I'm testing new additions on up-to-date Home and Enterprise editions in VMs. I'm also regularly using it for all my home installations after all bigger updates.
**Q**: I've run the script and it did xxx, how can I undo it?
**A:** For every tweak, there is also a corresponding function which restores the default settings. Use them to create and run new preset. Alternatively, since most functions are just automation for actions which can be done using GUI, find appropriate control and modify it manually.
**A:** For every tweak, there is also a corresponding function which restores the default settings. The default is considered freshly installed Windows 10 or Windows Server 2016 with no adjustments made during or after the installation. Use the tweaks to create and run new preset. Alternatively, since most functions are just automation for actions which can be done using GUI, find appropriate control and modify it manually.
**Q:** I've run the script and it broke my computer / killed neighbor's dog / caused world war 3.
**A:** I don't care. Also, that's not a question.
@@ -66,3 +66,72 @@ Command using the preset file above:
**Q:** For how long are you going to maintain the script?
**A:** As long as I use Windows 10.
**Q:** I really like the script. Is there any way to express gratitude and send donation?
**A:** Feel free to send donations via [PayPal donation link](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=disassembler%40dasm%2ecz&item_name=Disassembler&no_shipping=1). Any amount is appreciated, just be aware that PayPal charges [mediation fees](https://www.paypal.com/selfhelp/article/FAQ690). Also be aware that donations are completely voluntary and I'm not obliged to make any script adjustments in your favor regardless of the donated amount.
## Contribution guidelines
Following is a list of rules which I'm trying to apply in this project. The rules are not binding and I accept pull requests even if they don't adhere to them, as long as their purpose and content are clear. In rare cases, when there are too many rule violations, I might simply redo the whole functionality and reject the PR (while still crediting you). If you'd like to make my work easier, please consider adhering to the following rules too.
### Function naming
Try to give a function a meaningful name up to 25 characters long, which gives away the purpose of the function. Use verbs like `Enable`/`Disable`, `Show`/`Hide`, `Install`/`Uninstall`, `Add`/`Remove` in the beginning of the function name. In case the function doesn't fit any of these verbs, come up with another name, beginning with the verb `Set`, which indicates what the function does, eg. `SetCurrentNetworkPrivate` and `SetCurrentNetworkPublic`.
### Revert functions
Always add a function with opposite name (or equivalent) which reverts the behaviour to default. The default is considered freshly installed Windows 10 or Windows Server 2016 with no adjustments made during or after the installation. If you don't have access to either of these, create the revert function to the best of your knowledge and I will fill in the rest if necessary.
### Function similarities
Check if there isn't already a function with similar purpose as the one you are trying to add. As long as the name and objective of the existing function is unchanged, feel free to add your tweak to that function rather than creating a new one.
### Function grouping
Try to group functions thematically. There are already five major groups (privacy, services, user interface, applications and server-specific), but even within these, some tweaks may be related to each other. In such case, add a new tweak below the existing one and not to the end of the whole group.
### Default preset
Always add a reference to the tweak and its revert function in the `$tweaks` array containing the default set of tweaks. Add references to both functions on the same line (mind the quotes and commas) and always comment out the revert function. Whether to comment out also the tweak in the default preset is a matter of personal preference. The rule of thumb is that if the tweak makes the system faster, smoother, more secure and less obtrusive, it should be enabled by default. Usability has preference over performance (that's why e.g. indexing is kept enabled). Also don't forget to add the function references to all test files.
### Repeatability
Unless applied on unsupported system, all functions have to be applicable repeatedly without any errors. When you're creating a registry key, always check first if the key doesn't happen to already exist. When you're deleting registry value, always append `-ErrorAction SilentlyContinue` to prevent errors while deleting already deleted values.
### Input / output hiding
Suppress all output generated by commands and cmdlets using `| Out-Null` or `-ErrorAction SilentlyContinue` where applicable. Whenever an input is needed, use appropriate parameters to suppress the prompt and programmatically provide values for the command to run (eg. using `-Confirm:$false`). The only acceptable output is from the `Write-Host` cmdlets in the beginning of each function and from non-suppressible cmdlets like `Remove-AppxPackage`.
### Registry
Create the registry keys only if they don't exist on fresh installation if Windows 10 or Windows Server 2016. When deleting registry, delete only registry values, not the whole keys. When you're setting registry values, always use `Set-ItemProperty` instead of `New-ItemProperty`. When you're removing registry values, choose either `Set-ItemProperty` or `Remove-ItemProperty` to reinstate the same situation as it was on the clean installation. Again, if you don't know what the original state was, let me know in PR description and I will fill in the gaps. When you need to use `HKEY_USERS` registry hive, always add following snippet before the registry modification to ensure portability.
```powershell
If (!(Test-Path "HKU:")) {
New-PSDrive -Name HKU -PSProvider Registry -Root HKEY_USERS | Out-Null
}
```
### Force usage
Star Wars jokes aside, don't use `-Force` parameter unless absolutely necessary. The only permitted case is when you're creating a new registry key (not a value) and you need to ensure that all parent keys will be created as well. In such case always check first if the key doesn't already exist, otherwise you will delete all its existing values.
### Comments
Always add a simple comment above the function briefly describing what the function does, especially if it has an ambiguous name or if there is some logic hidden under the hood. If you know that the tweak doesn't work on some editions of Windows 10 or on Windows Server, state it in the comment too. Add a `Write-Host` cmdlet with the short description of action also to the first line of the function body, so the user can see what is being executed and which function is the problematic one whenever an error occurs. The comment is written in present simple tense, the `Write-Host` in present continuous with ellipsis (resp. three dots) at the end.
### Coding style
Indent using tabs, enclose all string values in double quotes (`"`) and strictly use `PascalCase` wherever possible. Put opening curly bracket on the same line as the function name or condition, but leave the closing bracket on a separate line for readability.
### Examples
**Naming example**: Consider function `EnableFastMenu`. What does it do? Which menu? How fast is *fast*? A better name might be `EnableFastMenuFlyout`, so it's a bit clearer that we're talking about the menu flyouts delays. But the counterpart function would be `DisableFastMenuFlyouts` which is not entirely true. We're not *disabling* anything, we're just making it slow again. So even better might be to name them `SetFastMenuFlyouts` and `SetSlowMenuFlyouts`. Or better yet, just add the functionality to already existing `SetVisualFXPerformance`/`SetVisualFXAppearance`. Even though the names are not 100% match, they aim to tweak similar aspects and operate within the same registry keys.
**Coding example:** The following code applies most of the rules mentioned above (naming, output hiding, repeatability, force usage, comments and coding style).
```powershell
# Enable some feature
Function EnableSomeFeature {
Write-Host "Enabling some feature..."
If (!(Test-Path "HKLM:\Some\Registry\Key")) {
New-Item -Path "HKLM:\Some\Registry\Key" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\Some\Registry\Key" -Name "SomeValueName" -Type String -Value "SomeValue"
}
# Disable some feature
Function DisableSomeFeature {
Write-Host "Disabling some feature..."
Remove-ItemProperty -Path "HKLM:\Some\Registry\Key" -Name "SomeValueName" -ErrorAction SilentlyContinue
}
```

1543
Win10.ps1

File diff suppressed because it is too large Load Diff

3
test/Default.bat Normal file
View File

@@ -0,0 +1,3 @@
@ECHO OFF
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "..\Win10.ps1" -preset "Default.preset"

134
test/Default.preset Normal file
View File

@@ -0,0 +1,134 @@
# Default preset
RequireAdmin
DisableTelemetry
DisableWiFiSense
# DisableSmartScreen
DisableWebSearch
DisableAppSuggestions
DisableBackgroundApps
DisableLockScreenSpotlight
DisableLocationTracking
DisableMapUpdates
DisableFeedback
DisableAdvertisingID
DisableCortana
DisableErrorReporting
SetP2PUpdateLocal
DisableAutoLogger
DisableDiagTrack
DisableWAPPush
# SetUACLow
# EnableSharingMappedDrives
DisableAdminShares
# DisableSMB1
SetCurrentNetworkPrivate
# SetUnknownNetworksPrivate
# DisableNetDevicesAutoInst
# EnableCtrldFolderAccess
# DisableFirewall
# DisableDefender
# DisableDefenderCloud
EnableF8BootMenu
SetDEPOptOut
DisableScriptHost
EnableDotNetStrongCrypto
# EnableMeltdownCompatFlag
# DisableUpdateMSRT
# DisableUpdateDriver
DisableUpdateRestart
DisableHomeGroups
DisableSharedExperiences
DisableRemoteAssistance
EnableRemoteDesktop
DisableAutoplay
DisableAutorun
# EnableStorageSense
# DisableDefragmentation
# DisableSuperfetch
# DisableIndexing
# SetBIOSTimeUTC
# EnableHibernation
# DisableSleepButton
# DisableSleepTimeout
# DisableFastStartup
DisableActionCenter
DisableLockScreen
# DisableLockScreenRS1
HideNetworkFromLockScreen
HideShutdownFromLockScreen
DisableStickyKeys
ShowTaskManagerDetails"
ShowFileOperationsDetails
# EnableFileDeleteConfirm
HideTaskbarSearchBox
HideTaskView
ShowSmallTaskbarIcons
ShowTaskbarTitles
HideTaskbarPeopleIcon
ShowTrayIcons
DisableSearchAppInStore
DisableNewAppPrompt
# SetControlPanelViewIcons
SetVisualFXPerformance
# AddENKeyboard
# EnableNumlock
ShowKnownExtensions
ShowHiddenFiles
HideSyncNotifications
HideRecentShortcuts
SetExplorerThisPC
ShowThisPCOnDesktop
# ShowUserFolderOnDesktop
HideDesktopFromThisPC
# HideDesktopFromExplorer
HideDocumentsFromThisPC
# HideDocumentsFromExplorer
HideDownloadsFromThisPC
# HideDownloadsFromExplorer
HideMusicFromThisPC
# HideMusicFromExplorer
HidePicturesFromThisPC
# HidePicturesFromExplorer
HideVideosFromThisPC
# HideVideosFromExplorer
Hide3DObjectsFromThisPC
# Hide3DObjectsFromExplorer
# DisableThumbnails
DisableThumbsDB
DisableOneDrive
UninstallOneDrive
UninstallMsftBloat
UninstallThirdPartyBloat
# UninstallWindowsStore
DisableXboxFeatures
DisableAdobeFlash
# UninstallMediaPlayer
# UninstallInternetExplorer
# UninstallWorkFolders
# InstallLinuxSubsystem
# InstallHyperV
SetPhotoViewerAssociation
AddPhotoViewerOpenWith
# UninstallPDFPrinter
UninstallXPSPrinter
RemoveFaxPrinter
# HideServerManagerOnLogin
# DisableShutdownTracker
# DisablePasswordPolicy
# DisableCtrlAltDelLogin
# DisableIEEnhancedSecurity
# EnableAudio
# UnpinStartMenuTiles
# UnpinTaskbarIcons
WaitForKey
Restart

View File

@@ -1,3 +1,3 @@
@ECHO OFF
powershell.exe -NoProfile -ExecutionPolicy Bypass -File %~dp0..\Win10.ps1 -preset "%~dp0Win10-ApplyAll.preset"
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "..\Win10.ps1" -preset "Win10-ApplyAll.preset"

View File

@@ -1,91 +1,134 @@
# Windows 10 - Apply all
RequireAdmin
DisableTelemetry
DisableWiFiSense
DisableSmartScreen
DisableWebSearch
DisableStartSuggestions
DisableAppSuggestions
DisableBackgroundApps
DisableLockScreenSpotlight
DisableLocationTracking
DisableMapUpdates
DisableFeedback
DisableAdvertisingID
DisableCortana
DisableErrorReporting
RestrictUpdateP2P
SetP2PUpdateLocal
DisableAutoLogger
DisableDiagTrack
DisableWAPPush
LowerUAC
SetUACLow
EnableSharingMappedDrives
DisableAdminShares
DisableSMB1
# DisableSMB1
SetCurrentNetworkPrivate
SetUnknownNetworksPrivate
DisableNetDevicesAutoInst
EnableCtrldFolderAccess
DisableFirewall
DisableDefender
DisableDefenderCloud
EnableF8BootMenu
SetDEPOptOut
DisableScriptHost
EnableDotNetStrongCrypto
EnableMeltdownCompatFlag
DisableUpdateMSRT
DisableUpdateDriver
DisableUpdateRestart
DisableHomeGroups
DisableSharedExperiences
DisableRemoteAssistance
EnableRemoteDesktop
DisableAutoplay
DisableAutorun
EnableStorageSense
DisableDefragmentation
DisableSuperfetch
DisableIndexing
SetBIOSTimeUTC
EnableHibernation
DisableSleepButton
DisableSleepTimeout
DisableFastStartup
DisableActionCenter
DisableLockScreen
DisableLockScreenRS1
HideNetworkFromLockScreen
HideShutdownFromLockScreen
DisableStickyKeys
ShowTaskManagerDetails
ShowFileOperationsDetails
EnableFileDeleteConfirm
HideTaskbarSearchBox
HideTaskView
ShowSmallTaskbarIcons
ShowTaskbarTitles
HideTaskbarPeopleIcon
ShowTrayIcons
DisableSearchAppInStore
DisableNewAppPrompt
SetControlPanelViewIcons
SetVisualFXPerformance
AddENKeyboard
EnableNumlock
ShowKnownExtensions
ShowHiddenFiles
HideSyncNotifications
HideRecentShortcuts
ExplorerThisPC
SetExplorerThisPC
ShowThisPCOnDesktop
ShowUserFolderOnDesktop
HideDesktopFromThisPC
HideDesktopFromExplorer
HideDocumentsFromThisPC
HideDocumentsFromExplorer
HideDownloadsFromThisPC
HideDownloadsFromExplorer
HideMusicFromThisPC
HideMusicFromExplorer
HidePicturesFromThisPC
HidePicturesFromExplorer
HideVideosFromThisPC
AddENKeyboard
EnableNumlock
HideVideosFromExplorer
Hide3DObjectsFromThisPC
Hide3DObjectsFromExplorer
DisableThumbnails
DisableThumbsDB
DisableOneDrive
UninstallOneDrive
UninstallMsftBloat
UninstallThirdPartyBloat
UninstallWindowsStore
DisableConsumerApps
DisableXboxFeatures
DisableAdobeFlash
UninstallMediaPlayer
UninstallInternetExplorer
UninstallWorkFolders
InstallLinuxSubsystem
InstallHyperV
SetPhotoViewerAssociation
AddPhotoViewerOpenWith
DisableSearchAppInStore
DisableNewAppPrompt
EnableF8BootMenu
SetDEPOptOut
UninstallPDFPrinter
UninstallXPSPrinter
RemoveFaxPrinter
# HideServerManagerOnLogin
# DisableShutdownTracker
# DisablePasswordPolicy
# DisableCtrlAltDelLogin
# DisableIEEnhancedSecurity
# EnableAudio
UnpinStartMenuTiles
UnpinTaskbarIcons
WaitForKey
Restart

View File

@@ -1,3 +1,3 @@
@ECHO OFF
powershell.exe -NoProfile -ExecutionPolicy Bypass -File %~dp0..\Win10.ps1 -preset "%~dp0Win10-RestoreAll.preset"
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "..\Win10.ps1" -preset "Win10-RestoreAll.preset"

View File

@@ -1,91 +1,131 @@
# Windows 10 - Restore all
RequireAdmin
EnableTelemetry
EnableWiFiSense
EnableSmartScreen
EnableWebSearch
EnableStartSuggestions
EnableAppSuggestions
EnableBackgroundApps
EnableLockScreenSpotlight
EnableLocationTracking
EnableMapUpdates
EnableFeedback
EnableAdvertisingID
EnableCortana
EnableErrorReporting
UnrestrictUpdateP2P
SetP2PUpdateInternet
EnableAutoLogger
EnableDiagTrack
EnableWAPPush
RaiseUAC
SetUACHigh
DisableSharingMappedDrives
EnableAdminShares
EnableSMB1
# EnableSMB1
SetCurrentNetworkPublic
SetUnknownNetworksPublic
EnableNetDevicesAutoInst
DisableCtrldFolderAccess
EnableFirewall
EnableDefender
EnableDefenderCloud
DisableF8BootMenu
SetDEPOptIn
EnableScriptHost
DisableDotNetStrongCrypto
DisableMeltdownCompatFlag
EnableUpdateMSRT
EnableUpdateDriver
EnableUpdateRestart
EnableHomeGroups
EnableSharedExperiences
EnableRemoteAssistance
DisableRemoteDesktop
EnableAutoplay
EnableAutorun
DisableStorageSense
EnableDefragmentation
EnableSuperfetch
EnableIndexing
SetBIOSTimeLocal
DisableHibernation
EnableSleepButton
EnableSleepTimeout
EnableFastStartup
EnableActionCenter
EnableLockScreen
EnableLockScreenRS1
ShowNetworkOnLockScreen
ShowShutdownOnLockScreen
EnableStickyKeys
HideTaskManagerDetails
HideFileOperationsDetails
DisableFileDeleteConfirm
ShowTaskbarSearchBox
ShowTaskView
ShowLargeTaskbarIcons
HideTaskbarTitles
ShowTaskbarPeopleIcon
HideTrayIcons
EnableSearchAppInStore
EnableNewAppPrompt
SetControlPanelViewCategories
SetVisualFXAppearance
RemoveENKeyboard
DisableNumlock
HideKnownExtensions
HideHiddenFiles
ShowSyncNotifications
ShowRecentShortcuts
ExplorerQuickAccess
SetExplorerQuickAccess
HideThisPCFromDesktop
HideUserFolderFromDesktop
ShowDesktopInThisPC
ShowDesktopInExplorer
ShowDocumentsInThisPC
ShowDocumentsInExplorer
ShowDownloadsInThisPC
ShowDownloadsInExplorer
ShowMusicInThisPC
ShowMusicInExplorer
ShowPicturesInThisPC
ShowPicturesInExplorer
ShowVideosInThisPC
RemoveENKeyboard
DisableNumlock
ShowVideosInExplorer
Show3DObjectsInThisPC
Show3DObjectsInExplorer
EnableThumbnails
EnableThumbsDB
EnableOneDrive
InstallOneDrive
InstallMsftBloat
InstallThirdPartyBloat
InstallWindowsStore
EnableConsumerApps
EnableXboxFeatures
EnableAdobeFlash
InstallMediaPlayer
InstallInternetExplorer
InstallWorkFolders
UninstallLinuxSubsystem
UninstallHyperV
UnsetPhotoViewerAssociation
RemovePhotoViewerOpenWith
EnableSearchAppInStore
EnableNewAppPrompt
DisableF8BootMenu
SetDEPOptIn
InstallPDFPrinter
InstallXPSPrinter
AddFaxPrinter
# ShowServerManagerOnLogin
# EnableShutdownTracker
# EnablePasswordPolicy
# EnableCtrlAltDelLogin
# EnableIEEnhancedSecurity
# DisableAudio
WaitForKey
Restart

View File

@@ -1,3 +1,3 @@
@ECHO OFF
powershell.exe -NoProfile -ExecutionPolicy Bypass -File %~dp0..\Win10.ps1 -preset "%~dp0WinServer2016-ApplyAll.preset"
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "..\Win10.ps1" -preset "WinServer2016-ApplyAll.preset"

View File

@@ -1,91 +1,134 @@
# Windows Server 2016 - Apply all
RequireAdmin
DisableTelemetry
DisableWiFiSense
DisableSmartScreen
DisableWebSearch
DisableStartSuggestions
DisableAppSuggestions
DisableBackgroundApps
DisableLockScreenSpotlight
DisableLocationTracking
DisableMapUpdates
DisableFeedback
DisableAdvertisingID
DisableCortana
DisableErrorReporting
RestrictUpdateP2P
SetP2PUpdateLocal
DisableAutoLogger
DisableDiagTrack
DisableWAPPush
LowerUAC
SetUACLow
EnableSharingMappedDrives
DisableAdminShares
DisableSMB1
SetCurrentNetworkPrivate
SetUnknownNetworksPrivate
DisableNetDevicesAutoInst
# EnableCtrldFolderAccess
DisableFirewall
DisableDefender
DisableDefenderCloud
EnableF8BootMenu
SetDEPOptOut
DisableScriptHost
EnableDotNetStrongCrypto
EnableMeltdownCompatFlag
DisableUpdateMSRT
DisableUpdateDriver
DisableUpdateRestart
# DisableHomeGroups
# DisableSharedExperiences
# DisableRemoteAssistance
EnableRemoteDesktop
DisableAutoplay
DisableAutorun
# EnableStorageSense
DisableDefragmentation
# DisableSuperfetch
DisableIndexing
SetBIOSTimeUTC
EnableHibernation
DisableSleepButton
DisableSleepTimeout
DisableFastStartup
DisableActionCenter
DisableLockScreen
DisableLockScreenRS1
HideNetworkFromLockScreen
HideShutdownFromLockScreen
DisableStickyKeys
ShowTaskManagerDetails
ShowFileOperationsDetails
EnableFileDeleteConfirm
HideTaskbarSearchBox
HideTaskView
ShowSmallTaskbarIcons
ShowTaskbarTitles
HideTaskbarPeopleIcon
ShowTrayIcons
DisableSearchAppInStore
DisableNewAppPrompt
SetControlPanelViewIcons
SetVisualFXPerformance
AddENKeyboard
EnableNumlock
ShowKnownExtensions
ShowHiddenFiles
HideSyncNotifications
HideRecentShortcuts
ExplorerThisPC
SetExplorerThisPC
ShowThisPCOnDesktop
ShowUserFolderOnDesktop
HideDesktopFromThisPC
HideDesktopFromExplorer
HideDocumentsFromThisPC
HideDocumentsFromExplorer
HideDownloadsFromThisPC
HideDownloadsFromExplorer
HideMusicFromThisPC
HideMusicFromExplorer
HidePicturesFromThisPC
HidePicturesFromExplorer
HideVideosFromThisPC
AddENKeyboard
EnableNumlock
HideVideosFromExplorer
Hide3DObjectsFromThisPC
Hide3DObjectsFromExplorer
DisableThumbnails
DisableThumbsDB
DisableOneDrive
# UninstallOneDrive
UninstallMsftBloat
UninstallThirdPartyBloat
UninstallWindowsStore
DisableConsumerApps
DisableXboxFeatures
DisableAdobeFlash
UninstallMediaPlayer
UninstallInternetExplorer
# UninstallWorkFolders
# InstallLinuxSubsystem
InstallHyperV
SetPhotoViewerAssociation
AddPhotoViewerOpenWith
DisableSearchAppInStore
DisableNewAppPrompt
EnableF8BootMenu
SetDEPOptOut
UninstallPDFPrinter
UninstallXPSPrinter
RemoveFaxPrinter
HideServerManagerOnLogin
DisableShutdownTracker
DisablePasswordPolicy
DisableCtrlAltDelLogin
DisableIEEnhancedSecurity
EnableAudio
# UnpinStartMenuTiles
UnpinTaskbarIcons
WaitForKey
Restart

View File

@@ -1,3 +1,3 @@
@ECHO OFF
powershell.exe -NoProfile -ExecutionPolicy Bypass -File %~dp0..\Win10.ps1 -preset "%~dp0WinServer2016-RestoreAll.preset"
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "..\Win10.ps1" -preset "WinServer2016-RestoreAll.preset"

View File

@@ -1,91 +1,131 @@
# Windows Server 2016 - Restore all
RequireAdmin
EnableTelemetry
EnableWiFiSense
EnableSmartScreen
EnableWebSearch
EnableStartSuggestions
EnableAppSuggestions
EnableBackgroundApps
EnableLockScreenSpotlight
EnableLocationTracking
EnableMapUpdates
EnableFeedback
EnableAdvertisingID
EnableCortana
EnableErrorReporting
UnrestrictUpdateP2P
SetP2PUpdateInternet
EnableAutoLogger
EnableDiagTrack
EnableWAPPush
RaiseUAC
SetUACHigh
DisableSharingMappedDrives
EnableAdminShares
EnableSMB1
SetCurrentNetworkPublic
SetUnknownNetworksPublic
EnableNetDevicesAutoInst
# DisableCtrldFolderAccess
EnableFirewall
EnableDefender
EnableDefenderCloud
DisableF8BootMenu
SetDEPOptIn
EnableScriptHost
DisableDotNetStrongCrypto
DisableMeltdownCompatFlag
EnableUpdateMSRT
EnableUpdateDriver
EnableUpdateRestart
# EnableHomeGroups
# EnableSharedExperiences
# EnableRemoteAssistance
DisableRemoteDesktop
EnableAutoplay
EnableAutorun
# DisableStorageSense
EnableDefragmentation
# EnableSuperfetch
EnableIndexing
SetBIOSTimeLocal
DisableHibernation
EnableSleepButton
EnableSleepTimeout
EnableFastStartup
EnableActionCenter
EnableLockScreen
EnableLockScreenRS1
ShowNetworkOnLockScreen
ShowShutdownOnLockScreen
EnableStickyKeys
HideTaskManagerDetails
HideFileOperationsDetails
DisableFileDeleteConfirm
ShowTaskbarSearchBox
ShowTaskView
ShowLargeTaskbarIcons
HideTaskbarTitles
ShowTaskbarPeopleIcon
HideTrayIcons
EnableSearchAppInStore
EnableNewAppPrompt
SetControlPanelViewCategories
SetVisualFXAppearance
RemoveENKeyboard
DisableNumlock
HideKnownExtensions
HideHiddenFiles
ShowSyncNotifications
ShowRecentShortcuts
ExplorerQuickAccess
SetExplorerQuickAccess
HideThisPCFromDesktop
HideUserFolderFromDesktop
ShowDesktopInThisPC
ShowDesktopInExplorer
ShowDocumentsInThisPC
ShowDocumentsInExplorer
ShowDownloadsInThisPC
ShowDownloadsInExplorer
ShowMusicInThisPC
ShowMusicInExplorer
ShowPicturesInThisPC
ShowPicturesInExplorer
ShowVideosInThisPC
RemoveENKeyboard
DisableNumlock
ShowVideosInExplorer
Show3DObjectsInThisPC
Show3DObjectsInExplorer
EnableThumbnails
EnableThumbsDB
EnableOneDrive
# InstallOneDrive
InstallMsftBloat
InstallThirdPartyBloat
InstallWindowsStore
EnableConsumerApps
EnableXboxFeatures
EnableAdobeFlash
InstallMediaPlayer
InstallInternetExplorer
# InstallWorkFolders
# UninstallLinuxSubsystem
UninstallHyperV
UnsetPhotoViewerAssociation
RemovePhotoViewerOpenWith
EnableSearchAppInStore
EnableNewAppPrompt
DisableF8BootMenu
SetDEPOptIn
InstallPDFPrinter
InstallXPSPrinter
AddFaxPrinter
ShowServerManagerOnLogin
EnableShutdownTracker
EnablePasswordPolicy
EnableCtrlAltDelLogin
EnableIEEnhancedSecurity
DisableAudio
WaitForKey
Restart