mirror of
https://github.com/Disassembler0/Win10-Initial-Setup-Script.git
synced 2026-01-11 23:18:19 -05:00
Compare commits
96 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91a6afba1f | ||
|
|
b6caea6a56 | ||
|
|
a73dc396f7 | ||
|
|
94d9046fd4 | ||
|
|
f61ef1a899 | ||
|
|
965d033fd7 | ||
|
|
a74666786c | ||
|
|
e75bfe9842 | ||
|
|
58881c87f4 | ||
|
|
3f09ce7b9e | ||
|
|
bf69210346 | ||
|
|
7e52af6d42 | ||
|
|
004dd6d752 | ||
|
|
30382f9b30 | ||
|
|
d8f790e6f3 | ||
|
|
81b660974c | ||
|
|
1f9e9c48ff | ||
|
|
fb04190dfd | ||
|
|
8dbe0c49fc | ||
|
|
6d1b6b725d | ||
|
|
f489347b17 | ||
|
|
26d5762d97 | ||
|
|
3472bde78c | ||
|
|
b67cde21cc | ||
|
|
a79832ca0d | ||
|
|
e488251c16 | ||
|
|
3155383689 | ||
|
|
f4c9bbab69 | ||
|
|
05d4790009 | ||
|
|
95a977a90c | ||
|
|
241c2b336d | ||
|
|
cd845fa123 | ||
|
|
5335241c97 | ||
|
|
1070655187 | ||
|
|
7f304634d3 | ||
|
|
a9fa1d241b | ||
|
|
3ded96eeaa | ||
|
|
5db2e9edda | ||
|
|
c37015a0ad | ||
|
|
5c29297005 | ||
|
|
2339aa6691 | ||
|
|
1e8a668271 | ||
|
|
5bd2f62c4e | ||
|
|
30f93c340f | ||
|
|
130db064bd | ||
|
|
bd02d4322c | ||
|
|
47f8b9dede | ||
|
|
30af458827 | ||
|
|
ed35417025 | ||
|
|
14f2f2caee | ||
|
|
0138d07863 | ||
|
|
6df419cf3f | ||
|
|
ac7a141a75 | ||
|
|
7017a38e4e | ||
|
|
e536019794 | ||
|
|
abc2aefb5e | ||
|
|
1006b2648d | ||
|
|
b3b12239ec | ||
|
|
0129698032 | ||
|
|
f49b932407 | ||
|
|
159626f45b | ||
|
|
3b582a1f59 | ||
|
|
53058b1322 | ||
|
|
031848fcb9 | ||
|
|
e9d329f3d2 | ||
|
|
7062510cc1 | ||
|
|
0f26a47e0d | ||
|
|
95c66ecf21 | ||
|
|
6ce0765a03 | ||
|
|
12c2c533d5 | ||
|
|
8c9053cabc | ||
|
|
9365a3a013 | ||
|
|
24a1c79d58 | ||
|
|
9b765a694d | ||
|
|
c67227992a | ||
|
|
8069d87266 | ||
|
|
abe812ace0 | ||
|
|
aef24a75a8 | ||
|
|
2ab1f27eeb | ||
|
|
daa5da122e | ||
|
|
9d4a14c55a | ||
|
|
494409c3cb | ||
|
|
50e9804974 | ||
|
|
1b38a82c88 | ||
|
|
dc30f4b8c2 | ||
|
|
5b2333ba35 | ||
|
|
6786ed78b5 | ||
|
|
f830a46fa9 | ||
|
|
544e15aefc | ||
|
|
436e708a1f | ||
|
|
e4a24bf83d | ||
|
|
771a32db0d | ||
|
|
5ccc376764 | ||
|
|
ef8b490da8 | ||
|
|
08ce664a37 | ||
|
|
c511b60739 |
@@ -1,7 +1,7 @@
|
||||
##########
|
||||
# Win 10 / Server 2016 / Server 2019 Initial Setup Script - Default preset
|
||||
# Author: Disassembler <disassembler@dasm.cz>
|
||||
# Version: v3.2, 2018-10-08
|
||||
# Version: v3.8, 2019-09-11
|
||||
# Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
|
||||
##########
|
||||
|
||||
@@ -12,34 +12,32 @@ RequireAdmin
|
||||
DisableTelemetry # EnableTelemetry
|
||||
DisableWiFiSense # EnableWiFiSense
|
||||
# DisableSmartScreen # EnableSmartScreen
|
||||
DisableWebSearch # EnableWebSearch
|
||||
# DisableWebSearch # EnableWebSearch
|
||||
DisableAppSuggestions # EnableAppSuggestions
|
||||
DisableActivityHistory # EnableActivityHistory
|
||||
DisableBackgroundApps # EnableBackgroundApps
|
||||
DisableLocationTracking # EnableLocationTracking
|
||||
# DisableSensors # EnableSensors
|
||||
DisableLocation # EnableLocation
|
||||
DisableMapUpdates # EnableMapUpdates
|
||||
DisableFeedback # EnableFeedback
|
||||
DisableTailoredExperiences # EnableTailoredExperiences
|
||||
DisableAdvertisingID # EnableAdvertisingID
|
||||
DisableWebLangList # EnableWebLangList
|
||||
DisableCortana # EnableCortana
|
||||
# DisableBiometrics # EnableBiometrics
|
||||
# DisableCamera # EnableCamera
|
||||
# DisableMicrophone # EnableMicrophone
|
||||
DisableErrorReporting # EnableErrorReporting
|
||||
# SetP2PUpdateLocal # SetP2PUpdateInternet # SetP2PUpdateDisable
|
||||
DisableDiagTrack # EnableDiagTrack
|
||||
DisableWAPPush # EnableWAPPush
|
||||
# HideRecentJumplists # ShowRecentJumplists
|
||||
# EnableClearRecentFiles # DisableClearRecentFiles
|
||||
# DisableRecentFiles # EnableRecentFiles
|
||||
|
||||
### Security Tweaks ###
|
||||
# SetUACLow # SetUACHigh
|
||||
# EnableSharingMappedDrives # DisableSharingMappedDrives
|
||||
DisableAdminShares # EnableAdminShares
|
||||
# DisableSMB1 # EnableSMB1
|
||||
# DisableSMBServer # EnableSMBServer
|
||||
# DisableLLMNR # EnableLLMNR
|
||||
# DisableNCSIProbe # EnableNCSIProbe
|
||||
SetCurrentNetworkPrivate # SetCurrentNetworkPublic
|
||||
# SetUnknownNetworksPrivate # SetUnknownNetworksPublic
|
||||
# DisableNetDevicesAutoInst # EnableNetDevicesAutoInst
|
||||
# DisableFirewall # EnableFirewall
|
||||
# HideDefenderTrayIcon # ShowDefenderTrayIcon
|
||||
# DisableDefender # EnableDefender
|
||||
@@ -57,14 +55,35 @@ EnableF8BootMenu # DisableF8BootMenu
|
||||
# DisableRecoveryAndReset # EnableRecoveryAndReset
|
||||
SetDEPOptOut # SetDEPOptIn
|
||||
|
||||
### Network Tweaks ###
|
||||
SetCurrentNetworkPrivate # SetCurrentNetworkPublic
|
||||
# SetUnknownNetworksPrivate # SetUnknownNetworksPublic
|
||||
# DisableNetDevicesAutoInst # EnableNetDevicesAutoInst
|
||||
# DisableHomeGroups # EnableHomeGroups
|
||||
# DisableSMB1 # EnableSMB1
|
||||
# DisableSMBServer # EnableSMBServer
|
||||
# DisableNetBIOS # EnableNetBIOS
|
||||
# DisableLLMNR # EnableLLMNR
|
||||
# DisableLLDP # EnableLLDP
|
||||
# DisableLLTD # EnableLLTD
|
||||
# DisableMSNetClient # EnableMSNetClient
|
||||
# DisableQoS # EnableQoS
|
||||
# DisableIPv4 # EnableIPv4
|
||||
# DisableIPv6 # EnableIPv6
|
||||
# DisableNCSIProbe # EnableNCSIProbe
|
||||
# DisableConnectionSharing # EnableConnectionSharing
|
||||
DisableRemoteAssistance # EnableRemoteAssistance
|
||||
# EnableRemoteDesktop # DisableRemoteDesktop
|
||||
|
||||
### Service Tweaks ###
|
||||
# DisableUpdateMSRT # EnableUpdateMSRT
|
||||
# DisableUpdateDriver # EnableUpdateDriver
|
||||
EnableUpdateMSProducts # DisableUpdateMSProducts
|
||||
# DisableUpdateAutoDownload # EnableUpdateAutoDownload
|
||||
DisableUpdateRestart # EnableUpdateRestart
|
||||
# DisableHomeGroups # EnableHomeGroups
|
||||
DisableMaintenanceWakeUp # EnableMaintenanceWakeUp
|
||||
DisableSharedExperiences # EnableSharedExperiences
|
||||
DisableRemoteAssistance # EnableRemoteAssistance
|
||||
EnableRemoteDesktop # DisableRemoteDesktop
|
||||
# EnableClipboardHistory # DisableClipboardHistory
|
||||
DisableAutoplay # EnableAutoplay
|
||||
DisableAutorun # EnableAutorun
|
||||
# DisableRestorePoints # EnableRestorePoints
|
||||
@@ -72,6 +91,9 @@ DisableAutorun # EnableAutorun
|
||||
# DisableDefragmentation # EnableDefragmentation
|
||||
# DisableSuperfetch # EnableSuperfetch
|
||||
# DisableIndexing # EnableIndexing
|
||||
# DisableSwapFile # EnableSwapFile
|
||||
# DisableRecycleBin # EnableRecycleBin
|
||||
EnableNTFSLongPaths # DisableNTFSLongPaths
|
||||
# DisableNTFSLastAccess # EnableNTFSLastAccess
|
||||
# SetBIOSTimeUTC # SetBIOSTimeLocal
|
||||
# EnableHibernation # DisableHibernation
|
||||
@@ -86,8 +108,9 @@ DisableLockScreen # EnableLockScreen
|
||||
# DisableLockScreenRS1 # EnableLockScreenRS1
|
||||
HideNetworkFromLockScreen # ShowNetworkOnLockScreen
|
||||
HideShutdownFromLockScreen # ShowShutdownOnLockScreen
|
||||
DisableLockScreenBlur # EnableLockScreenBlur
|
||||
# DisableAeroShake # EnableAeroShake
|
||||
DisableStickyKeys # EnableStickyKeys
|
||||
DisableAccessibilityKeys # EnableAccessibilityKeys
|
||||
ShowTaskManagerDetails # HideTaskManagerDetails
|
||||
ShowFileOperationsDetails # HideFileOperationsDetails
|
||||
# EnableFileDeleteConfirm # DisableFileDeleteConfirm
|
||||
@@ -97,32 +120,50 @@ ShowSmallTaskbarIcons # ShowLargeTaskbarIcons
|
||||
SetTaskbarCombineWhenFull # SetTaskbarCombineNever # SetTaskbarCombineAlways
|
||||
HideTaskbarPeopleIcon # ShowTaskbarPeopleIcon
|
||||
ShowTrayIcons # HideTrayIcons
|
||||
# ShowSecondsInTaskbar # HideSecondsFromTaskbar
|
||||
DisableSearchAppInStore # EnableSearchAppInStore
|
||||
DisableNewAppPrompt # EnableNewAppPrompt
|
||||
# HideRecentlyAddedApps # ShowRecentlyAddedApps
|
||||
# HideMostUsedApps # ShowMostUsedApps
|
||||
# SetControlPanelSmallIcons # SetControlPanelLargeIcons # SetControlPanelCategories
|
||||
DisableShortcutInName # EnableShortcutInName
|
||||
# HideShortcutArrow # ShowShortcutArrow
|
||||
SetVisualFXPerformance # SetVisualFXAppearance
|
||||
# EnableTitleBarColor # DisableTitleBarColor
|
||||
# EnableDarkTheme # DisableDarkTheme
|
||||
# AddENKeyboard # RemoveENKeyboard
|
||||
# EnableNumlock # DisableNumlock
|
||||
# DisableEnhPointerPrecision # EnableEnhPointerPrecision
|
||||
# SetSoundSchemeNone # SetSoundSchemeDefault
|
||||
# DisableStartupSound # EnableStartupSound
|
||||
# DisableChangingSoundScheme # EnableChangingSoundScheme
|
||||
# EnableVerboseStatus # DisableVerboseStatus
|
||||
DisableF1HelpKey # EnableF1HelpKey
|
||||
|
||||
### Explorer UI Tweaks ###
|
||||
# ShowExplorerTitleFullPath # HideExplorerTitleFullPath
|
||||
ShowKnownExtensions # HideKnownExtensions
|
||||
ShowHiddenFiles # HideHiddenFiles
|
||||
# ShowSuperHiddenFiles # HideSuperHiddenFiles
|
||||
# ShowEmptyDrives # HideEmptyDrives
|
||||
# ShowFolderMergeConflicts # HideFolderMergeConflicts
|
||||
EnableNavPaneExpand # DisableNavPaneExpand
|
||||
# ShowNavPaneAllFolders # HideNavPaneAllFolders
|
||||
# EnableFldrSeparateProcess # DisableFldrSeparateProcess
|
||||
# EnableRestoreFldrWindows # DisableRestoreFldrWindows
|
||||
# ShowEncCompFilesColor # HideEncCompFilesColor
|
||||
# DisableSharingWizard # EnableSharingWizard
|
||||
# HideSelectCheckboxes # ShowSelectCheckboxes
|
||||
HideSyncNotifications # ShowSyncNotifications
|
||||
HideRecentShortcuts # ShowRecentShortcuts
|
||||
SetExplorerThisPC # SetExplorerQuickAccess
|
||||
HideQuickAccess # ShowQuickAccess
|
||||
# HideRecycleBinFromDesktop # ShowRecycleBinOnDesktop
|
||||
ShowThisPCOnDesktop # HideThisPCFromDesktop
|
||||
# ShowUserFolderOnDesktop # HideUserFolderFromDesktop
|
||||
# ShowControlPanelOnDesktop # HideControlPanelFromDesktop
|
||||
# ShowNetworkOnDesktop # HideNetworkFromDesktop
|
||||
# ShowBuildNumberOnDesktop # HideBuildNumberFromDesktop
|
||||
HideDesktopFromThisPC # ShowDesktopInThisPC
|
||||
# HideDesktopFromExplorer # ShowDesktopInExplorer
|
||||
HideDocumentsFromThisPC # ShowDocumentsInThisPC
|
||||
@@ -151,8 +192,13 @@ UninstallMsftBloat # InstallMsftBloat
|
||||
UninstallThirdPartyBloat # InstallThirdPartyBloat
|
||||
# UninstallWindowsStore # InstallWindowsStore
|
||||
DisableXboxFeatures # EnableXboxFeatures
|
||||
# DisableFullscreenOptims # EnableFullscreenOptims
|
||||
DisableAdobeFlash # EnableAdobeFlash
|
||||
DisableEdgePreload # EnableEdgePreload
|
||||
DisableEdgeShortcutCreation # EnableEdgeShortcutCreation
|
||||
DisableIEFirstRun # EnableIEFirstRun
|
||||
DisableFirstLogonAnimation # EnableFirstLogonAnimation
|
||||
DisableMediaSharing # EnableMediaSharing
|
||||
# UninstallMediaPlayer # InstallMediaPlayer
|
||||
# UninstallInternetExplorer # InstallInternetExplorer
|
||||
# UninstallWorkFolders # InstallWorkFolders
|
||||
|
||||
23
README.md
23
README.md
@@ -66,8 +66,8 @@ The script supports command line options and parameters which can help you custo
|
||||
**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 a 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.
|
||||
**Q:** I really like the script. Can I send a donation?
|
||||
**A:** Feel free to send donations via [PayPal](https://www.paypal.me/Disassembler). Any amount is appreciated, but keep in mind that donations are completely voluntary and I'm not obliged to make any script adjustments in your favor regardless of the donated amount. You can also drop me a mail to discuss an alternative way.
|
||||
|
||||
|
||||
|
||||
@@ -82,21 +82,26 @@ The script supports command line options and parameters which can help you custo
|
||||
| 1709 | Redstone 3 (RS3) | Fall Creators Update | 16299 |
|
||||
| 1803 | Redstone 4 (RS4) | April 2018 Update | 17134 |
|
||||
| 1809 | Redstone 5 (RS5) | October 2018 Update | 17763 |
|
||||
| 1903 | 19H1 | May 2019 Update | 18362 |
|
||||
|
||||
|
||||
|
||||
## Advanced usage
|
||||
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File Win10.ps1 [-include filename] [-preset filename] [tweakname]
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File Win10.ps1 [-include filename] [-preset filename] [-log logname] [[!]tweakname]
|
||||
|
||||
-include filename load module with user-defined tweaks
|
||||
-preset filename load preset with tweak names to apply
|
||||
-log logname save script output to a file
|
||||
tweakname apply tweak with this particular name
|
||||
!tweakname remove tweak with this particular name from selection
|
||||
|
||||
### Presets
|
||||
|
||||
The tweak library consists of separate idempotent functions, containing one tweak each. The functions can be grouped to *presets*. Preset is simply a list of function names which should be called. Any function which is not present or is commented in a preset will not be called, thus the corresponding tweak will not be applied. In order for the script to do something, you need to supply at least one tweak library via `-include` and at least one tweak name, either via `-preset` or directly as command line argument.
|
||||
|
||||
The tweak names can be prefixed with exclamation mark (`!`) which will instead cause the tweak to be removed from selection. This is useful in cases when you want to apply the whole preset, but omit a few specific tweaks in the current run. Alternatively, you can have a preset which "patches" another preset by adding and removing a small amount of tweaks.
|
||||
|
||||
To supply a customized preset, you can either pass the function names directly as arguments.
|
||||
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File Win10.ps1 -include Win10.psm1 EnableFirewall EnableDefender
|
||||
@@ -110,7 +115,7 @@ Example of a preset file `mypreset.txt`:
|
||||
|
||||
# UI tweaks
|
||||
ShowKnownExtensions
|
||||
ShowHiddenFiles # Only hidden, not system
|
||||
ShowHiddenFiles # Only hidden, not system
|
||||
|
||||
Command using the preset file above:
|
||||
|
||||
@@ -142,9 +147,9 @@ Command using the script above:
|
||||
All features described above can be combined. You can have a preset which includes both tweaks from the original script and your personal ones. Both `-include` and `-preset` options can be used more than once, so you can split your tweaks into groups and then combine them based on your current needs. The `-include` modules are always imported before the first tweak is applied, so the order of the command line parameters doesn't matter and neither does the order of the tweaks (except for `RequireAdmin`, which should always be called first and `Restart`, which should be always called last). It can happen that some tweaks are applied more than once during a singe run because you have them in multiple presets. That shouldn't cause any problems as the tweaks are idempotent.
|
||||
Example of a preset file `otherpreset.txt`:
|
||||
|
||||
InstallLinuxSubsystem
|
||||
MyTweak1
|
||||
MyTweak2
|
||||
!ShowHiddenFiles # Will remove the tweak from selection
|
||||
WaitForKey
|
||||
|
||||
Command using all three examples combined:
|
||||
@@ -153,6 +158,14 @@ Command using all three examples combined:
|
||||
|
||||
|
||||
|
||||
### Logging
|
||||
|
||||
If you'd like to store output from the script execution, you can do so using `-log` parameter followed by a filename of the log file you want to create. For example:
|
||||
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File Win10.ps1 -include Win10.psm1 -preset mypreset.txt -log myoutput.log
|
||||
|
||||
The logging is done using PowerShell `Start-Transcript` cmdlet, which writes extra information about current environment (date, machine and user name, command used for execution etc.) to the beginning of the file and logs both standard output and standard error streams.
|
||||
|
||||
## Maintaining own forks
|
||||
|
||||
The easiest way to customize the script settings it is to create your own preset and, if needed, your own tweak scripts as described above. For easy start, you can base the modifications on the *Default.cmd* and *Default.preset* and maintain just that. If you choose to fork the script anyway, you don't need to comment or remove the actual functions in *Win10.psm1*, because if they are not called, they are not used.
|
||||
|
||||
28
Win10.ps1
28
Win10.ps1
@@ -1,7 +1,7 @@
|
||||
##########
|
||||
# Win 10 / Server 2016 / Server 2019 Initial Setup Script - Main execution loop
|
||||
# Author: Disassembler <disassembler@dasm.cz>
|
||||
# Version: v3.2, 2018-10-08
|
||||
# Version: v3.8, 2019-09-11
|
||||
# Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
|
||||
##########
|
||||
|
||||
@@ -16,25 +16,41 @@ Function RequireAdmin {
|
||||
$tweaks = @()
|
||||
$PSCommandArgs = @()
|
||||
|
||||
Function AddOrRemoveTweak($tweak) {
|
||||
If ($tweak[0] -eq "!") {
|
||||
# If the name starts with exclamation mark (!), exclude the tweak from selection
|
||||
$script:tweaks = $script:tweaks | Where-Object { $_ -ne $tweak.Substring(1) }
|
||||
} ElseIf ($tweak -ne "") {
|
||||
# Otherwise add the tweak
|
||||
$script:tweaks += $tweak
|
||||
}
|
||||
}
|
||||
|
||||
# Parse and resolve paths in passed arguments
|
||||
$i = 0
|
||||
While ($i -lt $args.Length) {
|
||||
If ($args[$i].ToLower() -eq "-include") {
|
||||
# Resolve full path to the included file
|
||||
$include = Resolve-Path $args[++$i]
|
||||
$include = Resolve-Path $args[++$i] -ErrorAction Stop
|
||||
$PSCommandArgs += "-include `"$include`""
|
||||
# Import the included file as a module
|
||||
Import-Module -Name $include
|
||||
Import-Module -Name $include -ErrorAction Stop
|
||||
} ElseIf ($args[$i].ToLower() -eq "-preset") {
|
||||
# Resolve full path to the preset file
|
||||
$preset = Resolve-Path $args[++$i]
|
||||
$preset = Resolve-Path $args[++$i] -ErrorAction Stop
|
||||
$PSCommandArgs += "-preset `"$preset`""
|
||||
# Load tweak names from the preset file
|
||||
$tweaks += Get-Content $preset -ErrorAction Stop | ForEach-Object { $_.Split("#")[0].Trim() } | Where-Object { $_ -ne "" }
|
||||
Get-Content $preset -ErrorAction Stop | ForEach-Object { AddOrRemoveTweak($_.Split("#")[0].Trim()) }
|
||||
} ElseIf ($args[$i].ToLower() -eq "-log") {
|
||||
# Resolve full path to the output file
|
||||
$log = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($args[++$i])
|
||||
$PSCommandArgs += "-log `"$log`""
|
||||
# Record session to the output file
|
||||
Start-Transcript $log
|
||||
} Else {
|
||||
$PSCommandArgs += $args[$i]
|
||||
# Load tweak names from command line
|
||||
$tweaks += $args[$i]
|
||||
AddOrRemoveTweak($args[$i])
|
||||
}
|
||||
$i++
|
||||
}
|
||||
|
||||
1568
Win10.psm1
1568
Win10.psm1
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user