mirror of
https://github.com/Disassembler0/Win10-Initial-Setup-Script.git
synced 2026-01-12 07:28:29 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0a3de5938 | ||
|
|
f89ba71646 | ||
|
|
e1b8c5ca8b | ||
|
|
ca84acf781 |
60
Win10.ps1
60
Win10.ps1
@@ -1,7 +1,7 @@
|
||||
##########
|
||||
# Win10 Initial Setup Script
|
||||
# Author: Disassembler <disassembler@dasm.cz>
|
||||
# Version: 2.3, 2017-05-08
|
||||
# Version: 2.4, 2017-06-08
|
||||
##########
|
||||
|
||||
# Ask for elevated permissions if required
|
||||
@@ -58,10 +58,12 @@ $preset = @(
|
||||
"HideTaskView", # "ShowTaskView",
|
||||
"ShowSmallTaskbarIcons", # "ShowLargeTaskbarIcons",
|
||||
"ShowTaskbarTitles", # "HideTaskbarTitles",
|
||||
"HideTaskbarPeopleIcon", # "ShowTaskbarPeopleIcon",
|
||||
"ShowTrayIcons", # "HideTrayIcons",
|
||||
"ShowKnownExtensions", # "HideKnownExtensions",
|
||||
"ShowHiddenFiles", # "HideHiddenFiles",
|
||||
"HideSyncNotifications" # "ShowSyncNotifications"
|
||||
"HideSyncNotifications" # "ShowSyncNotifications",
|
||||
"HideRecentShortcuts", # "ShowRecentShortcuts",
|
||||
"ExplorerThisPC", # "ExplorerQuickAccess",
|
||||
"ShowThisPCOnDesktop", # "HideThisPCFromDesktop",
|
||||
"HideDesktopFromThisPC", # "ShowDesktopInThisPC",
|
||||
@@ -82,6 +84,7 @@ $preset = @(
|
||||
"DisableXboxFeatures", # "EnableXboxFeatures",
|
||||
# "UninstallMediaPlayer", # "InstallMediaPlayer",
|
||||
# "UninstallWorkFolders", # "InstallWorkFolders",
|
||||
# "InstallHyperV", # "UninstallHyperV",
|
||||
# "InstallLinuxSubsystem", # "UninstallLinuxSubsystem",
|
||||
"SetPhotoViewerAssociation", # "UnsetPhotoViewerAssociation",
|
||||
"AddPhotoViewerOpenWith", # "RemovePhotoViewerOpenWith",
|
||||
@@ -754,6 +757,21 @@ Function HideTaskbarTitles {
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarGlomLevel" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Hide Taskbar People icon
|
||||
Function HideTaskbarPeopleIcon {
|
||||
Write-Host "Hiding 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
|
||||
}
|
||||
|
||||
# Show Taskbar People icon
|
||||
Function ShowTaskbarPeopleIcon {
|
||||
Write-Host "Showing People icon..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name "PeopleBand" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Show all tray icons
|
||||
Function ShowTrayIcons {
|
||||
Write-Host "Showing all tray icons..."
|
||||
@@ -802,6 +820,20 @@ Function ShowSyncNotifications {
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowSyncProviderNotifications" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Hide recently and frequently used item shortcuts in Explorer
|
||||
Function HideRecentShortcuts {
|
||||
Write-Host "Hiding recent shortcuts..."
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "ShowRecent" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "ShowFrequent" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Show recently and frequently used item shortcuts in Explorer
|
||||
Function ShowRecentShortcuts {
|
||||
Write-Host "Showing recent shortcuts..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "ShowRecent" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "ShowFrequent" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Change default Explorer view to This PC
|
||||
Function ExplorerThisPC {
|
||||
Write-Host "Changing default Explorer view to This PC..."
|
||||
@@ -1180,25 +1212,37 @@ Function EnableXboxFeatures {
|
||||
# Uninstall Windows Media Player
|
||||
Function UninstallMediaPlayer {
|
||||
Write-Host "Uninstalling Windows Media Player..."
|
||||
dism /online /Disable-Feature /FeatureName:MediaPlayback /Quiet /NoRestart
|
||||
Disable-WindowsOptionalFeature -Online -FeatureName "WindowsMediaPlayer" -NoRestart -WarningAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
# Install Windows Media Player
|
||||
Function InstallMediaPlayer {
|
||||
Write-Host "Installing Windows Media Player..."
|
||||
dism /online /Enable-Feature /FeatureName:MediaPlayback /Quiet /NoRestart
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName "WindowsMediaPlayer" -NoRestart -WarningAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
# Uninstall Work Folders Client
|
||||
Function UninstallWorkFolders {
|
||||
Write-Host "Uninstalling Work Folders Client..."
|
||||
dism /online /Disable-Feature /FeatureName:WorkFolders-Client /Quiet /NoRestart
|
||||
Disable-WindowsOptionalFeature -Online -FeatureName "WorkFolders-Client" -NoRestart -WarningAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
# Install Work Folders Client
|
||||
Function InstallWorkFolders {
|
||||
Write-Host "Installing Work Folders Client..."
|
||||
dism /online /Enable-Feature /FeatureName:WorkFolders-Client /Quiet /NoRestart
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName "WorkFolders-Client" -NoRestart -WarningAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
# Install Hyper-V - Applicable to Pro, Ent, Edu editions
|
||||
Function InstallHyperV {
|
||||
Write-Host "Installing Hyper-V..."
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Hyper-V" -All -NoRestart -WarningAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
# Uninstall Hyper-V
|
||||
Function UninstallHyperV {
|
||||
Write-Host "Uninstalling Hyper-V..."
|
||||
Disable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Hyper-V-All" -NoRestart -WarningAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
# Install Linux Subsystem - Applicable to RS1 or newer
|
||||
@@ -1206,7 +1250,7 @@ Function InstallLinuxSubsystem {
|
||||
Write-Host "Installing Linux Subsystem..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowDevelopmentWithoutDevLicense" -Type DWord -Value 1
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowAllTrustedApps" -Type DWord -Value 1
|
||||
dism /online /Enable-Feature /FeatureName:Microsoft-Windows-Subsystem-Linux /Quiet /NoRestart
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux" -NoRestart -WarningAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
# Uninstall Linux Subsystem - Applicable to RS1 or newer
|
||||
@@ -1214,7 +1258,7 @@ Function UninstallLinuxSubsystem {
|
||||
Write-Host "Uninstalling Linux Subsystem..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowDevelopmentWithoutDevLicense" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowAllTrustedApps" -Type DWord -Value 0
|
||||
dism /online /Disable-Feature /FeatureName:Microsoft-Windows-Subsystem-Linux /Quiet /NoRestart
|
||||
Disable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux" -NoRestart -WarningAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
# Set Photo Viewer association for bmp, gif, jpg, png and tif
|
||||
|
||||
3
test/applyall.bat
Normal file
3
test/applyall.bat
Normal file
@@ -0,0 +1,3 @@
|
||||
@ECHO OFF
|
||||
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File %~dp0..\Win10.ps1 -preset "%~dp0applyall.preset"
|
||||
82
test/applyall.preset
Normal file
82
test/applyall.preset
Normal file
@@ -0,0 +1,82 @@
|
||||
|
||||
# Apply all
|
||||
|
||||
DisableTelemetry
|
||||
DisableWiFiSense
|
||||
DisableSmartScreen
|
||||
DisableWebSearch
|
||||
DisableStartSuggestions
|
||||
DisableLocationTracking
|
||||
DisableFeedback
|
||||
DisableAdvertisingID
|
||||
DisableCortana
|
||||
DisableErrorReporting
|
||||
RestrictUpdateP2P
|
||||
DisableAutoLogger
|
||||
DisableDiagTrack
|
||||
DisableWAPPush
|
||||
|
||||
LowerUAC
|
||||
EnableSharingMappedDrives
|
||||
DisableAdminShares
|
||||
SetCurrentNetworkPrivate
|
||||
SetUnknownNetworksPrivate
|
||||
DisableFirewall
|
||||
DisableDefender
|
||||
DisableUpdateMSRT
|
||||
DisableUpdateDriver
|
||||
DisableUpdateRestart
|
||||
DisableHomeGroups
|
||||
DisableRemoteAssistance
|
||||
EnableRemoteDesktop
|
||||
DisableAutoplay
|
||||
DisableAutorun
|
||||
DisableDefragmentation
|
||||
SetBIOSTimeUTC
|
||||
|
||||
DisableActionCenter
|
||||
DisableLockScreen
|
||||
DisableLockScreenRS1
|
||||
DisableStickyKeys
|
||||
ShowTaskManagerDetails
|
||||
ShowFileOperationsDetails
|
||||
HideTaskbarSearchBox
|
||||
HideTaskView
|
||||
ShowSmallTaskbarIcons
|
||||
ShowTaskbarTitles
|
||||
HideTaskbarPeopleIcon
|
||||
ShowTrayIcons
|
||||
ShowKnownExtensions
|
||||
ShowHiddenFiles
|
||||
HideSyncNotifications
|
||||
HideRecentShortcuts
|
||||
ExplorerThisPC
|
||||
ShowThisPCOnDesktop
|
||||
HideDesktopFromThisPC
|
||||
HideDocumentsFromThisPC
|
||||
HideDownloadsFromThisPC
|
||||
HideMusicFromThisPC
|
||||
HidePicturesFromThisPC
|
||||
HideVideosFromThisPC
|
||||
AddENKeyboard
|
||||
EnableNumlock
|
||||
|
||||
DisableOneDrive
|
||||
UninstallOneDrive
|
||||
UninstallBloatware
|
||||
UninstallWindowsStore
|
||||
DisableConsumerApps
|
||||
DisableXboxFeatures
|
||||
UninstallMediaPlayer
|
||||
UninstallWorkFolders
|
||||
InstallHyperV
|
||||
InstallLinuxSubsystem
|
||||
SetPhotoViewerAssociation
|
||||
AddPhotoViewerOpenWith
|
||||
DisableSearchAppInStore
|
||||
DisableNewAppPrompt
|
||||
EnableF8BootMenu
|
||||
SetDEPOptOut
|
||||
|
||||
WaitForKey
|
||||
Restart
|
||||
3
test/restoreall.bat
Normal file
3
test/restoreall.bat
Normal file
@@ -0,0 +1,3 @@
|
||||
@ECHO OFF
|
||||
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File %~dp0..\Win10.ps1 -preset "%~dp0restoreall.preset"
|
||||
82
test/restoreall.preset
Normal file
82
test/restoreall.preset
Normal file
@@ -0,0 +1,82 @@
|
||||
|
||||
# Restore all
|
||||
|
||||
EnableTelemetry
|
||||
EnableWiFiSense
|
||||
EnableSmartScreen
|
||||
EnableWebSearch
|
||||
EnableStartSuggestions
|
||||
EnableLocationTracking
|
||||
EnableFeedback
|
||||
EnableAdvertisingID
|
||||
EnableCortana
|
||||
EnableErrorReporting
|
||||
UnrestrictUpdateP2P
|
||||
EnableAutoLogger
|
||||
EnableDiagTrack
|
||||
EnableWAPPush
|
||||
|
||||
RaiseUAC
|
||||
DisableSharingMappedDrives
|
||||
EnableAdminShares
|
||||
SetCurrentNetworkPublic
|
||||
SetUnknownNetworksPublic
|
||||
EnableFirewall
|
||||
EnableDefender
|
||||
EnableUpdateMSRT
|
||||
EnableUpdateDriver
|
||||
EnableUpdateRestart
|
||||
EnableHomeGroups
|
||||
EnableRemoteAssistance
|
||||
DisableRemoteDesktop
|
||||
EnableAutoplay
|
||||
EnableAutorun
|
||||
EnableDefragmentation
|
||||
SetBIOSTimeLocal
|
||||
|
||||
EnableActionCenter
|
||||
EnableLockScreen
|
||||
EnableLockScreenRS1
|
||||
EnableStickyKeys
|
||||
HideTaskManagerDetails
|
||||
HideFileOperationsDetails
|
||||
ShowTaskbarSearchBox
|
||||
ShowTaskView
|
||||
ShowLargeTaskbarIcons
|
||||
HideTaskbarTitles
|
||||
ShowTaskbarPeopleIcon
|
||||
HideTrayIcons
|
||||
HideKnownExtensions
|
||||
HideHiddenFiles
|
||||
ShowSyncNotifications
|
||||
ShowRecentShortcuts
|
||||
ExplorerQuickAccess
|
||||
HideThisPCFromDesktop
|
||||
ShowDesktopInThisPC
|
||||
ShowDocumentsInThisPC
|
||||
ShowDownloadsInThisPC
|
||||
ShowMusicInThisPC
|
||||
ShowPicturesInThisPC
|
||||
ShowVideosInThisPC
|
||||
RemoveENKeyboard
|
||||
DisableNumlock
|
||||
|
||||
EnableOneDrive
|
||||
InstallOneDrive
|
||||
InstallBloatware
|
||||
InstallWindowsStore
|
||||
EnableConsumerApps
|
||||
EnableXboxFeatures
|
||||
InstallMediaPlayer
|
||||
InstallWorkFolders
|
||||
UninstallHyperV
|
||||
UninstallLinuxSubsystem
|
||||
UnsetPhotoViewerAssociation
|
||||
RemovePhotoViewerOpenWith
|
||||
EnableSearchAppInStore
|
||||
EnableNewAppPrompt
|
||||
DisableF8BootMenu
|
||||
SetDEPOptIn
|
||||
|
||||
WaitForKey
|
||||
Restart
|
||||
Reference in New Issue
Block a user