mirror of
https://github.com/Disassembler0/Win10-Initial-Setup-Script.git
synced 2026-01-12 07:28:29 -05:00
Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b8fc957c1 | ||
|
|
d19e243a05 | ||
|
|
c540b0e7ed | ||
|
|
191e820100 | ||
|
|
66953faeb6 | ||
|
|
70aee80559 | ||
|
|
8dfe56cf2e | ||
|
|
4c81d1cff2 | ||
|
|
9e6c3d6ed4 | ||
|
|
33d4a18633 | ||
|
|
fb91d9df66 | ||
|
|
80e9c04861 | ||
|
|
22fb376831 | ||
|
|
3c9d6ea092 | ||
|
|
ab4e763fc1 | ||
|
|
ae9998fd4a | ||
|
|
7c869b377c | ||
|
|
7313970f86 | ||
|
|
c5cb2556a8 | ||
|
|
d354c414b6 | ||
|
|
44bb2b92dd | ||
|
|
ca8c6c6859 | ||
|
|
1f1412f68d | ||
|
|
e3af426cb5 | ||
|
|
fee2f345e9 | ||
|
|
f8727c682c | ||
|
|
29a22a253c | ||
|
|
7e39e3966f | ||
|
|
f3b74a6504 | ||
|
|
b6205f65fc |
@@ -1,3 +0,0 @@
|
||||
@ECHO OFF
|
||||
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "Win10.ps1" -preset "Default.preset"
|
||||
3
Default.cmd
Normal file
3
Default.cmd
Normal file
@@ -0,0 +1,3 @@
|
||||
@ECHO OFF
|
||||
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Win10.ps1" -preset "%~dpn0.preset"
|
||||
285
Default.preset
285
Default.preset
@@ -1,137 +1,148 @@
|
||||
# Default preset
|
||||
|
||||
RequireAdmin
|
||||
|
||||
DisableTelemetry
|
||||
DisableWiFiSense
|
||||
# DisableSmartScreen
|
||||
DisableWebSearch
|
||||
DisableAppSuggestions
|
||||
DisableActivityHistory
|
||||
DisableBackgroundApps
|
||||
DisableLocationTracking
|
||||
DisableMapUpdates
|
||||
DisableFeedback
|
||||
DisableTailoredExperiences
|
||||
DisableAdvertisingID
|
||||
DisableCortana
|
||||
DisableErrorReporting
|
||||
# SetP2PUpdateLocal
|
||||
DisableDiagTrack
|
||||
DisableWAPPush
|
||||
|
||||
# SetUACLow
|
||||
# EnableSharingMappedDrives
|
||||
DisableAdminShares
|
||||
# DisableSMB1
|
||||
# DisableSMBServer
|
||||
# DisableLLMNR
|
||||
SetCurrentNetworkPrivate
|
||||
# SetUnknownNetworksPrivate
|
||||
# DisableNetDevicesAutoInst
|
||||
# EnableCtrldFolderAccess
|
||||
# DisableFirewall
|
||||
# DisableDefender
|
||||
# DisableDefenderCloud
|
||||
EnableF8BootMenu
|
||||
SetDEPOptOut
|
||||
# EnableCIMemoryIntegrity
|
||||
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
|
||||
HideTaskbarSearch
|
||||
HideTaskView
|
||||
ShowSmallTaskbarIcons
|
||||
SetTaskbarCombineWhenFull
|
||||
HideTaskbarPeopleIcon
|
||||
ShowTrayIcons
|
||||
DisableSearchAppInStore
|
||||
DisableNewAppPrompt
|
||||
# SetControlPanelSmallIcons
|
||||
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
|
||||
# Default preset
|
||||
|
||||
RequireAdmin
|
||||
|
||||
DisableTelemetry
|
||||
DisableWiFiSense
|
||||
# DisableSmartScreen
|
||||
DisableWebSearch
|
||||
DisableAppSuggestions
|
||||
DisableActivityHistory
|
||||
DisableBackgroundApps
|
||||
DisableLocationTracking
|
||||
DisableMapUpdates
|
||||
DisableFeedback
|
||||
DisableTailoredExperiences
|
||||
DisableAdvertisingID
|
||||
DisableWebLangList
|
||||
DisableCortana
|
||||
DisableErrorReporting
|
||||
# SetP2PUpdateLocal
|
||||
DisableDiagTrack
|
||||
DisableWAPPush
|
||||
|
||||
# SetUACLow
|
||||
# EnableSharingMappedDrives
|
||||
DisableAdminShares
|
||||
# DisableSMB1
|
||||
# DisableSMBServer
|
||||
# DisableLLMNR
|
||||
# DisableNCSIProbe
|
||||
SetCurrentNetworkPrivate
|
||||
# SetUnknownNetworksPrivate
|
||||
# DisableNetDevicesAutoInst
|
||||
# EnableCtrldFolderAccess
|
||||
# DisableFirewall
|
||||
# DisableDefender
|
||||
# DisableDefenderCloud
|
||||
EnableF8BootMenu
|
||||
SetDEPOptOut
|
||||
# EnableCIMemoryIntegrity
|
||||
DisableScriptHost
|
||||
EnableDotNetStrongCrypto
|
||||
# EnableMeltdownCompatFlag
|
||||
|
||||
# DisableUpdateMSRT
|
||||
# DisableUpdateDriver
|
||||
DisableUpdateRestart
|
||||
# DisableHomeGroups
|
||||
DisableSharedExperiences
|
||||
DisableRemoteAssistance
|
||||
EnableRemoteDesktop
|
||||
DisableAutoplay
|
||||
DisableAutorun
|
||||
# EnableStorageSense
|
||||
# DisableDefragmentation
|
||||
# DisableSuperfetch
|
||||
# DisableIndexing
|
||||
# SetBIOSTimeUTC
|
||||
# EnableHibernation
|
||||
# DisableSleepButton
|
||||
# DisableSleepTimeout
|
||||
# DisableFastStartup
|
||||
|
||||
DisableActionCenter
|
||||
HideAccountProtectionWarn
|
||||
DisableLockScreen
|
||||
# DisableLockScreenRS1
|
||||
HideNetworkFromLockScreen
|
||||
HideShutdownFromLockScreen
|
||||
DisableStickyKeys
|
||||
ShowTaskManagerDetails
|
||||
ShowFileOperationsDetails
|
||||
# EnableFileDeleteConfirm
|
||||
HideTaskbarSearch
|
||||
HideTaskView
|
||||
ShowSmallTaskbarIcons
|
||||
SetTaskbarCombineWhenFull
|
||||
HideTaskbarPeopleIcon
|
||||
ShowTrayIcons
|
||||
DisableSearchAppInStore
|
||||
DisableNewAppPrompt
|
||||
# SetControlPanelSmallIcons
|
||||
SetVisualFXPerformance
|
||||
# AddENKeyboard
|
||||
# EnableNumlock
|
||||
# SetSoundSchemeNone
|
||||
# DisableStartupSound
|
||||
# DisableChangingSoundScheme
|
||||
|
||||
ShowKnownExtensions
|
||||
ShowHiddenFiles
|
||||
HideSelectCheckboxes
|
||||
HideSyncNotifications
|
||||
HideRecentShortcuts
|
||||
SetExplorerThisPC
|
||||
HideQuickAccess
|
||||
ShowThisPCOnDesktop
|
||||
# ShowUserFolderOnDesktop
|
||||
HideDesktopFromThisPC
|
||||
# HideDesktopFromExplorer
|
||||
HideDocumentsFromThisPC
|
||||
# HideDocumentsFromExplorer
|
||||
HideDownloadsFromThisPC
|
||||
# HideDownloadsFromExplorer
|
||||
HideMusicFromThisPC
|
||||
# HideMusicFromExplorer
|
||||
HidePicturesFromThisPC
|
||||
# HidePicturesFromExplorer
|
||||
HideVideosFromThisPC
|
||||
# HideVideosFromExplorer
|
||||
Hide3DObjectsFromThisPC
|
||||
# Hide3DObjectsFromExplorer
|
||||
# DisableThumbnails
|
||||
DisableThumbnailCache
|
||||
DisableThumbsDBOnNetwork
|
||||
|
||||
DisableOneDrive
|
||||
UninstallOneDrive
|
||||
UninstallMsftBloat
|
||||
UninstallThirdPartyBloat
|
||||
# UninstallWindowsStore
|
||||
DisableXboxFeatures
|
||||
DisableAdobeFlash
|
||||
DisableEdgeShortcutCreation
|
||||
# UninstallMediaPlayer
|
||||
# UninstallInternetExplorer
|
||||
# UninstallWorkFolders
|
||||
# InstallLinuxSubsystem
|
||||
# InstallHyperV
|
||||
SetPhotoViewerAssociation
|
||||
AddPhotoViewerOpenWith
|
||||
# UninstallPDFPrinter
|
||||
UninstallXPSPrinter
|
||||
RemoveFaxPrinter
|
||||
# UninstallFaxAndScan
|
||||
|
||||
# HideServerManagerOnLogin
|
||||
# DisableShutdownTracker
|
||||
# DisablePasswordPolicy
|
||||
# DisableCtrlAltDelLogin
|
||||
# DisableIEEnhancedSecurity
|
||||
# EnableAudio
|
||||
|
||||
# UnpinStartMenuTiles
|
||||
# UnpinTaskbarIcons
|
||||
|
||||
WaitForKey
|
||||
Restart
|
||||
|
||||
@@ -17,7 +17,7 @@ This is a PowerShell script for automation of routine tasks done after fresh ins
|
||||
## 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.
|
||||
|
||||
Alternatively copy also *Default.bat* and *Default.preset* along with the *Win10.ps1* file and then doubleclick on *Default.bat* to run it.
|
||||
Alternatively copy also *Default.cmd* and *Default.preset* along with the *Win10.ps1* file, place all three of them into the same folder and then double-click on *Default.cmd* to run the script.
|
||||
|
||||
### Advanced usage
|
||||
The script consists of separate functions, each of which contains one tweak. The functions can be grouped to *presets*. Preset is simply a list of function names which should be called. If you don't supply any specific preset, the default preset defined by `$tweaks` array in the beginning of the script will be applied. Any function which is not present or is commented in a preset will not be called, thus the corresponding tweak will not be applied.
|
||||
@@ -71,6 +71,9 @@ For even more advanced usage, refer to section [Maintaining own forks](#maintain
|
||||
**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. 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 some 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 some controls are now greyed out and display message "*Some settings are hidden or managed by your organization*", why?
|
||||
**A:** To ensure that system-wide tweaks are applied smoothly and reliably, some of them make use of *Group Policy Objects* (*GPO*). The same mechanism is employed also in companies managing their computers in large scale, so the users without administrative privileges can't change the settings. If you wish to change a setting locked by GPO, apply the appropriate restore tweak and the control will become available again.
|
||||
|
||||
**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.
|
||||
|
||||
@@ -100,13 +103,13 @@ For even more advanced usage, refer to section [Maintaining own forks](#maintain
|
||||
| 1607 | Redstone 1 (RS1) | Anniversary Update | 14393 |
|
||||
| 1703 | Redstone 2 (RS2) | Creators Update | 15063 |
|
||||
| 1709 | Redstone 3 (RS3) | Fall Creators Update | 16299 |
|
||||
| 1803 | Redstone 4 (RS4) | Spring Creators Update | 17133 |
|
||||
| 1803 | Redstone 4 (RS4) | April 2018 Update | 17134 |
|
||||
|
||||
|
||||
|
||||
## Maintaining own forks
|
||||
|
||||
The easiest way how to customize the script settings it is to create your own preset file. For easy start, you can base it on the *Default.bat* and *Default.preset* and maintain just that. If you choose to fork the script anyway and adjust the defaults directly in the script instead, then all you have to modify is the `$tweaks` array in the beginning of the script. You don't need to comment or remove the actual functions, because if they are not called, they are not used.
|
||||
The easiest way how to customize the script settings it is to create your own preset file. For easy start, you can base it on the *Default.cmd* and *Default.preset* and maintain just that. If you choose to fork the script anyway and adjust the defaults directly in the script instead, then all you have to modify is the `$tweaks` array in the beginning of the script. You don't need to comment or remove the actual functions, because if they are not called, they are not used.
|
||||
|
||||
If you wish to make more elaborate modifications and incorporate some personal tweaks or adjustments, the I suggest doing it in a following way:
|
||||
|
||||
|
||||
319
Win10.ps1
319
Win10.ps1
@@ -1,7 +1,7 @@
|
||||
##########
|
||||
# Win10 / WinServer2016 Initial Setup Script
|
||||
# Author: Disassembler <disassembler@dasm.cz>
|
||||
# Version: v2.20, 2018-04-15
|
||||
# Version: v2.21, 2018-08-27
|
||||
# Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
|
||||
##########
|
||||
|
||||
@@ -23,9 +23,10 @@ $tweaks = @(
|
||||
"DisableFeedback", # "EnableFeedback",
|
||||
"DisableTailoredExperiences", # "EnableTailoredExperiences",
|
||||
"DisableAdvertisingID", # "EnableAdvertisingID",
|
||||
"DisableWebLangList", # "EnableWebLangList",
|
||||
"DisableCortana", # "EnableCortana",
|
||||
"DisableErrorReporting", # "EnableErrorReporting",
|
||||
# "SetP2PUpdateLocal", # "SetP2PUpdateInternet",
|
||||
# "SetP2PUpdateLocal", # "SetP2PUpdateInternet", # "SetP2PUpdateDisable",
|
||||
"DisableDiagTrack", # "EnableDiagTrack",
|
||||
"DisableWAPPush", # "EnableWAPPush",
|
||||
|
||||
@@ -36,6 +37,7 @@ $tweaks = @(
|
||||
# "DisableSMB1", # "EnableSMB1",
|
||||
# "DisableSMBServer", # "EnableSMBServer",
|
||||
# "DisableLLMNR", # "EnableLLMNR",
|
||||
# "DisableNCSIProbe", # "EnableNCSIProbe",
|
||||
"SetCurrentNetworkPrivate", # "SetCurrentNetworkPublic",
|
||||
# "SetUnknownNetworksPrivate", # "SetUnknownNetworksPublic",
|
||||
# "DisableNetDevicesAutoInst", # "EnableNetDevicesAutoInst",
|
||||
@@ -72,6 +74,7 @@ $tweaks = @(
|
||||
|
||||
### UI Tweaks ###
|
||||
"DisableActionCenter", # "EnableActionCenter",
|
||||
"HideAccountProtectionWarn", # "ShowAccountProtectionWarn",
|
||||
"DisableLockScreen", # "EnableLockScreen",
|
||||
# "DisableLockScreenRS1", # "EnableLockScreenRS1",
|
||||
"HideNetworkFromLockScreen", # "ShowNetworkOnLockScreen",
|
||||
@@ -92,13 +95,18 @@ $tweaks = @(
|
||||
"SetVisualFXPerformance", # "SetVisualFXAppearance",
|
||||
# "AddENKeyboard", # "RemoveENKeyboard",
|
||||
# "EnableNumlock", # "DisableNumlock",
|
||||
# "SetSoundSchemeNone", # "SetSoundSchemeDefault",
|
||||
# "DisableStartupSound", # "EnableStartupSound",
|
||||
# "DisableChangingSoundScheme", # "EnableChangingSoundScheme",
|
||||
|
||||
### Explorer UI Tweaks ###
|
||||
"ShowKnownExtensions", # "HideKnownExtensions",
|
||||
"ShowHiddenFiles", # "HideHiddenFiles",
|
||||
# "HideSelectCheckboxes", # "ShowSelectCheckboxes",
|
||||
"HideSyncNotifications" # "ShowSyncNotifications",
|
||||
"HideRecentShortcuts", # "ShowRecentShortcuts",
|
||||
"SetExplorerThisPC", # "SetExplorerQuickAccess",
|
||||
"HideQuickAccess", # "ShowQuickAccess",
|
||||
"ShowThisPCOnDesktop", # "HideThisPCFromDesktop",
|
||||
# "ShowUserFolderOnDesktop", # "HideUserFolderFromDesktop",
|
||||
"HideDesktopFromThisPC", # "ShowDesktopInThisPC",
|
||||
@@ -116,7 +124,8 @@ $tweaks = @(
|
||||
"Hide3DObjectsFromThisPC", # "Show3DObjectsInThisPC",
|
||||
# "Hide3DObjectsFromExplorer", # "Show3DObjectsInExplorer",
|
||||
# "DisableThumbnails", # "EnableThumbnails",
|
||||
"DisableThumbsDB", # "EnableThumbsDB",
|
||||
"DisableThumbnailCache", # "EnableThumbnailCache",
|
||||
"DisableThumbsDBOnNetwork", # "EnableThumbsDBOnNetwork",
|
||||
|
||||
### Application Tweaks ###
|
||||
"DisableOneDrive", # "EnableOneDrive",
|
||||
@@ -126,6 +135,7 @@ $tweaks = @(
|
||||
# "UninstallWindowsStore", # "InstallWindowsStore",
|
||||
"DisableXboxFeatures", # "EnableXboxFeatures",
|
||||
"DisableAdobeFlash", # "EnableAdobeFlash",
|
||||
"DisableEdgeShortcutCreation", # "EnableEdgeShortcutCreation",
|
||||
# "UninstallMediaPlayer", # "InstallMediaPlayer",
|
||||
# "UninstallInternetExplorer", # "InstallInternetExplorer",
|
||||
# "UninstallWorkFolders", # "InstallWorkFolders",
|
||||
@@ -136,6 +146,7 @@ $tweaks = @(
|
||||
# "UninstallPDFPrinter", # "InstallPDFPrinter",
|
||||
"UninstallXPSPrinter", # "InstallXPSPrinter",
|
||||
"RemoveFaxPrinter", # "AddFaxPrinter",
|
||||
# "UninstallFaxAndScan", # "InstallFaxAndScan",
|
||||
|
||||
### Server Specific Tweaks ###
|
||||
# "HideServerManagerOnLogin", # "ShowServerManagerOnLogin",
|
||||
@@ -161,14 +172,19 @@ $tweaks = @(
|
||||
##########
|
||||
|
||||
# Disable Telemetry
|
||||
# Note: This tweak may cause Enterprise edition to stop receiving Windows updates.
|
||||
# Windows Update control panel will then show message "Your device is at risk because it's out of date and missing important security and quality updates. Let's get you back on track so Windows can run more securely. Select this button to get going".
|
||||
# In such case, enable telemetry, run Windows update and then disable telemetry again. See also https://github.com/Disassembler0/Win10-Initial-Setup-Script/issues/57
|
||||
# Note: This tweak also disables the possibility to join Windows Insider Program, as it requires Telemetry data.
|
||||
# Windows Update control panel may show message "Your device is at risk because it's out of date and missing important security and quality updates. Let's get you back on track so Windows can run more securely. Select this button to get going".
|
||||
# In such case, enable telemetry, run Windows update and then disable telemetry again.
|
||||
# See also https://github.com/Disassembler0/Win10-Initial-Setup-Script/issues/57 and https://github.com/Disassembler0/Win10-Initial-Setup-Script/issues/92
|
||||
Function DisableTelemetry {
|
||||
Write-Output "Disabling Telemetry..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
|
||||
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
|
||||
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
|
||||
@@ -183,6 +199,7 @@ Function EnableTelemetry {
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 3
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 3
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\PreviewBuilds" -Name "AllowBuildPreview" -ErrorAction SilentlyContinue
|
||||
Enable-ScheduledTask -TaskName "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" | Out-Null
|
||||
Enable-ScheduledTask -TaskName "Microsoft\Windows\Application Experience\ProgramDataUpdater" | Out-Null
|
||||
Enable-ScheduledTask -TaskName "Microsoft\Windows\Autochk\Proxy" | Out-Null
|
||||
@@ -198,6 +215,9 @@ Function DisableWiFiSense {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Name "Value" -Type DWord -Value 0
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" -Name "Value" -Type DWord -Value 0
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config" -Force | Out-Null
|
||||
@@ -213,6 +233,9 @@ Function EnableWiFiSense {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Name "Value" -Type DWord -Value 1
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" -Name "Value" -Type DWord -Value 1
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config" -Name "AutoConnectAllowedOEM" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config" -Name "WiFISenseAllowed" -ErrorAction SilentlyContinue
|
||||
@@ -262,9 +285,11 @@ Function DisableAppSuggestions {
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEnabled" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEverEnabled" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SilentInstalledAppsEnabled" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-310093Enabled" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338387Enabled" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338388Enabled" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338389Enabled" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338393Enabled" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-353698Enabled" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SystemPaneSuggestionsEnabled" -Type DWord -Value 0
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent")) {
|
||||
@@ -284,7 +309,9 @@ Function EnableAppSuggestions {
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338388Enabled" -Type DWord -Value 1
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338389Enabled" -Type DWord -Value 1
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SystemPaneSuggestionsEnabled" -Type DWord -Value 1
|
||||
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-310093Enabled" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338387Enabled" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338393Enabled" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-353698Enabled" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -ErrorAction SilentlyContinue
|
||||
}
|
||||
@@ -408,6 +435,18 @@ Function EnableAdvertisingID {
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" -Name "DisabledByGroupPolicy" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable setting "Let websites provide locally relevant content by accessing my language list"
|
||||
Function DisableWebLangList {
|
||||
Write-Output "Disabling Website Access to Language List..."
|
||||
Set-ItemProperty -Path "HKCU:\Control Panel\International\User Profile" -Name "HttpAcceptLanguageOptOut" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable setting "Let websites provide locally relevant content by accessing my language list"
|
||||
Function EnableWebLangList {
|
||||
Write-Output "Enabling Website Access to Language List..."
|
||||
Remove-ItemProperty -Path "HKCU:\Control Panel\International\User Profile" -Name "HttpAcceptLanguageOptOut" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Cortana
|
||||
Function DisableCortana {
|
||||
Write-Output "Disabling Cortana..."
|
||||
@@ -457,19 +496,58 @@ Function EnableErrorReporting {
|
||||
Enable-ScheduledTask -TaskName "Microsoft\Windows\Windows Error Reporting\QueueReporting" | Out-Null
|
||||
}
|
||||
|
||||
# Restrict Windows Update P2P only to local network - Needed only for 1507 as local P2P is the default since 1511
|
||||
# Restrict Windows Update P2P delivery optimization to computers in local network - Default since 1703
|
||||
Function SetP2PUpdateLocal {
|
||||
Write-Output "Restricting Windows Update P2P only to local network..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" | Out-Null
|
||||
Write-Output "Restricting Windows Update P2P optimization to local network..."
|
||||
If ([System.Environment]::OSVersion.Version.Build -lt 16299) {
|
||||
# Method used in 1507 - 1703
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 1
|
||||
} Else {
|
||||
# Method used since 1709
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings" -Name "DownloadMode" -Type DWord -Value 1
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Unrestrict Windows Update P2P
|
||||
# Unrestrict Windows Update P2P delivery optimization to both local networks and internet - Default in 1507 - 1607
|
||||
Function SetP2PUpdateInternet {
|
||||
Write-Output "Unrestricting Windows Update P2P to internet..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -ErrorAction SilentlyContinue
|
||||
Write-Output "Unrestricting Windows Update P2P optimization to internet..."
|
||||
If ([System.Environment]::OSVersion.Version.Build -lt 16299) {
|
||||
# Method used in 1507 - 1703
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 3
|
||||
} Else {
|
||||
# Method used since 1709
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings" -Name "DownloadMode" -Type DWord -Value 3
|
||||
}
|
||||
}
|
||||
|
||||
# Disable Windows Update P2P delivery optimization completely
|
||||
Function SetP2PUpdateDisable {
|
||||
Write-Output "Disabling Windows Update P2P optimization..."
|
||||
If ([System.Environment]::OSVersion.Version.Build -lt 16299) {
|
||||
# Method used in 1507 - 1703
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 0
|
||||
} Else {
|
||||
# Method used since 1709
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Settings" -Name "DownloadMode" -Type DWord -Value 0
|
||||
}
|
||||
}
|
||||
|
||||
# Stop and disable Diagnostics Tracking Service
|
||||
@@ -585,6 +663,20 @@ Function EnableLLMNR {
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" -Name "EnableMulticast" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Network Connectivity Status Indicator active test
|
||||
# Note: This may reduce the ability of OS and other components to determine internet access, however protects against a specific type of zero-click attack.
|
||||
# See https://github.com/Disassembler0/Win10-Initial-Setup-Script/pull/111 for details
|
||||
Function DisableNCSIProbe {
|
||||
Write-Output "Disabling NCSI active test..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\NetworkConnectivityStatusIndicator" -Name "NoActiveProbe" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable Network Connectivity Status Indicator active test
|
||||
Function EnableNCSIProbe {
|
||||
Write-Output "Enabling NCSI active test..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\NetworkConnectivityStatusIndicator" -Name "NoActiveProbe" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Set current network profile to private (allow file sharing, device discovery, etc.)
|
||||
Function SetCurrentNetworkPrivate {
|
||||
Write-Output "Setting current network profile to private..."
|
||||
@@ -762,10 +854,11 @@ Function DisableDotNetStrongCrypto {
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319" -Name "SchUseStrongCrypto" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Enable Meltdown (CVE-2017-5754) compatibility flag - Required for January 2018 and all subsequent Windows updates
|
||||
# Enable Meltdown (CVE-2017-5754) compatibility flag - Required for January and February 2018 Windows updates
|
||||
# This flag is normally automatically enabled by compatible antivirus software (such as Windows Defender).
|
||||
# Use the tweak only if you have confirmed that your AV is compatible but unable to set the flag automatically or if you don't use any AV at all.
|
||||
# See https://support.microsoft.com/en-us/help/4072699/january-3-2018-windows-security-updates-and-antivirus-software for details.
|
||||
# As of March 2018, the compatibility check has been lifted for security updates.
|
||||
# See https://support.microsoft.com/en-us/help/4072699/windows-security-updates-and-antivirus-software for details
|
||||
Function EnableMeltdownCompatFlag {
|
||||
Write-Output "Enabling Meltdown (CVE-2017-5754) compatibility flag..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat")) {
|
||||
@@ -1011,7 +1104,7 @@ Function SetBIOSTimeLocal {
|
||||
# Enable Hibernation - Do not use on Server with automatically started Hyper-V hvboot service as it may lead to BSODs (Win10 with Hyper-V is fine)
|
||||
Function EnableHibernation {
|
||||
Write-Output "Enabling Hibernation..."
|
||||
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Session Manager\Power" -Name "HibernteEnabled" -Type Dword -Value 1
|
||||
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Session Manager\Power" -Name "HibernateEnabled" -Type Dword -Value 1
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" | Out-Null
|
||||
}
|
||||
@@ -1021,7 +1114,7 @@ Function EnableHibernation {
|
||||
# Disable Hibernation
|
||||
Function DisableHibernation {
|
||||
Write-Output "Disabling Hibernation..."
|
||||
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Session Manager\Power" -Name "HibernteEnabled" -Type Dword -Value 0
|
||||
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Session Manager\Power" -Name "HibernateEnabled" -Type Dword -Value 0
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" | Out-Null
|
||||
}
|
||||
@@ -1103,6 +1196,21 @@ Function EnableActionCenter {
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Hide Account Protection warning in Defender about not using a Microsoft account
|
||||
Function HideAccountProtectionWarn {
|
||||
Write-Output "Hiding Account Protection warning..."
|
||||
If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows Security Health\State")) {
|
||||
New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows Security Health\State" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows Security Health\State" -Name "AccountProtection_MicrosoftAccount_Disconnected" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Show Account Protection warning in Defender
|
||||
Function ShowAccountProtectionWarn {
|
||||
Write-Output "Showing Account Protection warning..."
|
||||
Remove-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows Security Health\State" -Name "AccountProtection_MicrosoftAccount_Disconnected" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Lock screen
|
||||
Function DisableLockScreen {
|
||||
Write-Output "Disabling Lock screen..."
|
||||
@@ -1275,18 +1383,21 @@ Function ShowLargeTaskbarIcons {
|
||||
Function SetTaskbarCombineWhenFull {
|
||||
Write-Output "Setting taskbar buttons to combine when taskbar is full..."
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarGlomLevel" -Type DWord -Value 1
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "MMTaskbarGlomLevel" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Set taskbar buttons to show labels and never combine
|
||||
Function SetTaskbarCombineNever {
|
||||
Write-Output "Setting taskbar buttons to never combine..."
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarGlomLevel" -Type DWord -Value 2
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "MMTaskbarGlomLevel" -Type DWord -Value 2
|
||||
}
|
||||
|
||||
# Set taskbar buttons to always combine and hide labels
|
||||
Function SetTaskbarCombineAlways {
|
||||
Write-Output "Setting taskbar buttons to always combine, hide labels..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarGlomLevel" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "MMTaskbarGlomLevel" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Hide Taskbar People icon
|
||||
@@ -1307,13 +1418,16 @@ Function ShowTaskbarPeopleIcon {
|
||||
# Show all tray icons
|
||||
Function ShowTrayIcons {
|
||||
Write-Output "Showing all tray icons..."
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "EnableAutoTray" -Type DWord -Value 0
|
||||
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
|
||||
}
|
||||
|
||||
# Hide tray icons as needed
|
||||
Function HideTrayIcons {
|
||||
Write-Output "Hiding tray icons..."
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "EnableAutoTray" -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoAutoTrayNotify" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable search for app in store for unknown extensions
|
||||
@@ -1446,7 +1560,76 @@ Function DisableNumlock {
|
||||
}
|
||||
}
|
||||
|
||||
# Set sound scheme to No Sounds
|
||||
Function SetSoundSchemeNone {
|
||||
Write-Output "Setting sound scheme to No Sounds..."
|
||||
$SoundScheme = ".None"
|
||||
Get-ChildItem -Path "HKCU:\AppEvents\Schemes\Apps\*\*" | ForEach {
|
||||
# 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
|
||||
# Copy data from source scheme to current.
|
||||
Set-ItemProperty -Path "$($_.PsPath)\.Current" -Name "(Default)" -Type String -Value $Data
|
||||
}
|
||||
Set-ItemProperty -Path "HKCU:\AppEvents\Schemes" -Name "(Default)" -Type String -Value $SoundScheme
|
||||
}
|
||||
|
||||
# Set sound scheme to Windows Default
|
||||
Function SetSoundSchemeDefault {
|
||||
Write-Output "Setting sound scheme to Windows Default..."
|
||||
$SoundScheme = ".Default"
|
||||
Get-ChildItem -Path "HKCU:\AppEvents\Schemes\Apps\*\*" | ForEach {
|
||||
# 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
|
||||
# Copy data from source scheme to current.
|
||||
Set-ItemProperty -Path "$($_.PsPath)\.Current" -Name "(Default)" -Type String -Value $Data
|
||||
}
|
||||
Set-ItemProperty -Path "HKCU:\AppEvents\Schemes" -Name "(Default)" -Type String -Value $SoundScheme
|
||||
}
|
||||
|
||||
# Disable playing Windows Startup sound
|
||||
Function DisableStartupSound {
|
||||
Write-Output "Disabling Windows Startup sound..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation" -Name "DisableStartupSound" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable playing Windows Startup sound
|
||||
Function EnableStartupSound {
|
||||
Write-Output "Enabling Windows Startup sound..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation" -Name "DisableStartupSound" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Disable changing sound scheme
|
||||
Function DisableChangingSoundScheme {
|
||||
Write-Output "Disabling changing sound scheme..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" -Name "NoChangingSoundScheme" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable changing sound scheme
|
||||
Function EnableChangingSoundScheme {
|
||||
Write-Output "Enabling changing sound scheme..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" -Name "NoChangingSoundScheme" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
##########
|
||||
# Explorer UI Tweaks
|
||||
@@ -1476,6 +1659,18 @@ Function HideHiddenFiles {
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "Hidden" -Type DWord -Value 2
|
||||
}
|
||||
|
||||
# Hide item selection checkboxes
|
||||
Function HideSelectCheckboxes {
|
||||
Write-Output "Hiding item selection checkboxes..."
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "AutoCheckSelect" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Show item selection checkboxes
|
||||
Function ShowSelectCheckboxes {
|
||||
Write-Output "Showing item selection checkboxes..."
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "AutoCheckSelect" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Hide sync provider notifications
|
||||
Function HideSyncNotifications {
|
||||
Write-Output "Hiding sync provider notifications..."
|
||||
@@ -1514,6 +1709,18 @@ Function SetExplorerQuickAccess {
|
||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Hide Quick Access from Explorer navigation pane
|
||||
Function HideQuickAccess {
|
||||
Write-Output "Hiding Quick Access from Explorer navigation pane..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "HubMode" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Show Quick Access in Explorer navigation pane
|
||||
Function ShowQuickAccess {
|
||||
Write-Output "Showing Quick Access in Explorer navigation pane..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "HubMode" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Show This PC shortcut on desktop
|
||||
Function ShowThisPCOnDesktop {
|
||||
Write-Output "Showing This PC shortcut on desktop..."
|
||||
@@ -1788,17 +1995,27 @@ Function EnableThumbnails {
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "IconsOnly" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Disable creation of Thumbs.db thumbnail cache files
|
||||
Function DisableThumbsDB {
|
||||
Write-Output "Disabling creation of Thumbs.db..."
|
||||
# Disable creation of thumbnail cache files
|
||||
Function DisableThumbnailCache {
|
||||
Write-Output "Disabling creation of thumbnail cache files..."
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DisableThumbnailCache" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable creation of thumbnail cache files
|
||||
Function EnableThumbnailCache {
|
||||
Write-Output "Enabling creation of thumbnail cache files..."
|
||||
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DisableThumbnailCache" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable creation of Thumbs.db thumbnail cache files on network folders
|
||||
Function DisableThumbsDBOnNetwork {
|
||||
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
|
||||
}
|
||||
|
||||
# Enable creation of Thumbs.db thumbnail cache files
|
||||
Function EnableThumbsDB {
|
||||
Write-Output "Enable creation of Thumbs.db..."
|
||||
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DisableThumbnailCache" -ErrorAction SilentlyContinue
|
||||
# Enable creation of Thumbs.db thumbnail cache files on network folders
|
||||
Function EnableThumbsDBOnNetwork {
|
||||
Write-Output "Enabling creation of Thumbs.db on network folders..."
|
||||
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DisableThumbsDBOnNetworkFolders" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
@@ -1826,7 +2043,7 @@ Function EnableOneDrive {
|
||||
# Uninstall OneDrive - Not applicable to Server
|
||||
Function UninstallOneDrive {
|
||||
Write-Output "Uninstalling OneDrive..."
|
||||
Stop-Process -Name "OneDrive" -ErrorAction SilentlyContinue
|
||||
Stop-Process -Name "OneDrive" -Force -ErrorAction SilentlyContinue
|
||||
Start-Sleep -s 2
|
||||
$onedrive = "$env:SYSTEMROOT\SysWOW64\OneDriveSetup.exe"
|
||||
If (!(Test-Path $onedrive)) {
|
||||
@@ -1834,7 +2051,7 @@ Function UninstallOneDrive {
|
||||
}
|
||||
Start-Process $onedrive "/uninstall" -NoNewWindow -Wait
|
||||
Start-Sleep -s 2
|
||||
Stop-Process -Name "explorer" -ErrorAction SilentlyContinue
|
||||
Stop-Process -Name "explorer" -Force -ErrorAction SilentlyContinue
|
||||
Start-Sleep -s 2
|
||||
Remove-Item -Path "$env:USERPROFILE\OneDrive" -Force -Recurse -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\OneDrive" -Force -Recurse -ErrorAction SilentlyContinue
|
||||
@@ -1898,6 +2115,7 @@ Function UninstallMsftBloat {
|
||||
Get-AppxPackage "Microsoft.WindowsSoundRecorder" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.ZuneMusic" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.ZuneVideo" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WebMediaExtensions" | Remove-AppxPackage
|
||||
}
|
||||
|
||||
# Install default Microsoft applications
|
||||
@@ -1941,6 +2159,7 @@ Function InstallMsftBloat {
|
||||
Get-AppxPackage -AllUsers "Microsoft.WindowsSoundRecorder" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.ZuneMusic" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.ZuneVideo" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.WebMediaExtensions" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
}
|
||||
# In case you have removed them for good, you can try to restore the files using installation medium as follows
|
||||
# New-Item C:\Mnt -Type Directory | Out-Null
|
||||
@@ -1971,16 +2190,22 @@ function UninstallThirdPartyBloat {
|
||||
Get-AppxPackage "DB6EA5DB.CyberLinkMediaSuiteEssentials" | Remove-AppxPackage
|
||||
Get-AppxPackage "DolbyLaboratories.DolbyAccess" | Remove-AppxPackage
|
||||
Get-AppxPackage "Drawboard.DrawboardPDF" | Remove-AppxPackage
|
||||
Get-AppxPackage "E046963F.LenovoCompanion" | Remove-AppxPackage
|
||||
Get-AppxPackage "Facebook.Facebook" | Remove-AppxPackage
|
||||
Get-AppxPackage "flaregamesGmbH.RoyalRevolt2" | Remove-AppxPackage
|
||||
Get-AppxPackage "GAMELOFTSA.Asphalt8Airborne" | Remove-AppxPackage
|
||||
Get-AppxPackage "KeeperSecurityInc.Keeper" | Remove-AppxPackage
|
||||
Get-AppxPackage "king.com.BubbleWitch3Saga" | Remove-AppxPackage
|
||||
Get-AppxPackage "king.com.CandyCrushSodaSaga" | Remove-AppxPackage
|
||||
Get-AppxPackage "LenovoCorporation.LenovoID" | Remove-AppxPackage
|
||||
Get-AppxPackage "LenovoCorporation.LenovoSettings" | Remove-AppxPackage
|
||||
Get-AppxPackage "PandoraMediaInc.29680B314EFC2" | Remove-AppxPackage
|
||||
Get-AppxPackage "SpotifyAB.SpotifyMusic" | Remove-AppxPackage
|
||||
Get-AppxPackage "WinZipComputing.WinZipUniversal" | Remove-AppxPackage
|
||||
Get-AppxPackage "XINGAG.XING" | Remove-AppxPackage
|
||||
Get-AppxPackage "king.com.CandyCrushSaga" | Remove-AppxPackage
|
||||
Get-AppxPackage "Nordcurrent.CookingFever" | Remove-AppxPackage
|
||||
Get-AppxPackage "A278AB0D.DragonManiaLegends" | Remove-AppxPackage
|
||||
}
|
||||
|
||||
# Install default third party applications
|
||||
@@ -2005,16 +2230,22 @@ Function InstallThirdPartyBloat {
|
||||
Get-AppxPackage -AllUsers "DB6EA5DB.CyberLinkMediaSuiteEssentials" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "DolbyLaboratories.DolbyAccess" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Drawboard.DrawboardPDF" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "E046963F.LenovoCompanion" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Facebook.Facebook" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "flaregamesGmbH.RoyalRevolt2" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "GAMELOFTSA.Asphalt8Airborne" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "KeeperSecurityInc.Keeper" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "king.com.BubbleWitch3Saga" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "king.com.CandyCrushSodaSaga" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "LenovoCorporation.LenovoID" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "LenovoCorporation.LenovoSettings" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "PandoraMediaInc.29680B314EFC2" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "SpotifyAB.SpotifyMusic" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "WinZipComputing.WinZipUniversal" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "XINGAG.XING" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "king.com.CandyCrushSaga" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Nordcurrent.CookingFever" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "A278AB0D.DragonManiaLegends" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
}
|
||||
|
||||
# Uninstall Windows Store
|
||||
@@ -2038,6 +2269,7 @@ Function DisableXboxFeatures {
|
||||
Get-AppxPackage "Microsoft.XboxIdentityProvider" | Remove-AppxPackage -ErrorAction SilentlyContinue
|
||||
Get-AppxPackage "Microsoft.XboxSpeechToTextOverlay" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.XboxGameOverlay" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.XboxGamingOverlay" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Xbox.TCUI" | Remove-AppxPackage
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 0
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR")) {
|
||||
@@ -2053,6 +2285,7 @@ Function EnableXboxFeatures {
|
||||
Get-AppxPackage -AllUsers "Microsoft.XboxIdentityProvider" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.XboxSpeechToTextOverlay" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.XboxGameOverlay" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.XboxGamingOverlay" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.Xbox.TCUI" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 1
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -ErrorAction SilentlyContinue
|
||||
@@ -2084,6 +2317,18 @@ Function UninstallMediaPlayer {
|
||||
Disable-WindowsOptionalFeature -Online -FeatureName "WindowsMediaPlayer" -NoRestart -WarningAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
# Disable Edge desktop shortcut creation after certain Windows updates are applied
|
||||
Function DisableEdgeShortcutCreation {
|
||||
Write-Output "Disabling Edge shortcut creation..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "DisableEdgeDesktopShortcutCreation" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable Edge desktop shortcut creation after certain Windows updates are applied
|
||||
Function EnableEdgeShortcutCreation {
|
||||
Write-Output "Enabling Edge shortcut creation..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "DisableEdgeDesktopShortcutCreation" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Install Windows Media Player
|
||||
Function InstallMediaPlayer {
|
||||
Write-Output "Installing Windows Media Player..."
|
||||
@@ -2242,6 +2487,18 @@ Function AddFaxPrinter {
|
||||
Add-Printer -Name "Fax" -DriverName "Microsoft Shared Fax Driver" -PortName "SHRFAX:" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Uninstall Windows Fax and Scan Services - Not applicable to Server
|
||||
Function UninstallFaxAndScan {
|
||||
Write-Output "Uninstalling Windows Fax and Scan Services..."
|
||||
Disable-WindowsOptionalFeature -Online -FeatureName "FaxServicesClientPackage" -NoRestart -WarningAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
# Install Windows Fax and Scan Services - Not applicable to Server
|
||||
Function InstallFaxAndScan {
|
||||
Write-Output "Installing Windows Fax and Scan Services..."
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName "FaxServicesClientPackage" -NoRestart -WarningAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
|
||||
|
||||
##########
|
||||
@@ -2257,7 +2514,7 @@ Function HideServerManagerOnLogin {
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Server\ServerManager" -Name "DoNotOpenAtLogon" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Hide Server Manager after login
|
||||
# Show Server Manager after login
|
||||
Function ShowServerManagerOnLogin {
|
||||
Write-Output "Showing Server Manager after login..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Server\ServerManager" -Name "DoNotOpenAtLogon" -ErrorAction SilentlyContinue
|
||||
@@ -2353,7 +2610,7 @@ Function UnpinStartMenuTiles {
|
||||
$data = $data.Substring(0, $data.IndexOf(",0,202,30") + 9) + ",0,202,80,0,0"
|
||||
Set-ItemProperty -Path "$($_.PsPath)\Current" -Name "Data" -Type Binary -Value $data.Split(",")
|
||||
}
|
||||
} ElseIf ([System.Environment]::OSVersion.Version.Build -eq 17133) {
|
||||
} ElseIf ([System.Environment]::OSVersion.Version.Build -eq 17134) {
|
||||
$key = Get-ChildItem -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount" -Recurse | Where-Object { $_ -like "*start.tilegrid`$windows.data.curatedtilecollection.tilecollection\Current" }
|
||||
$data = (Get-ItemProperty -Path $key.PSPath -Name "Data").Data[0..25] + ([byte[]](202,50,0,226,44,1,1,0,0))
|
||||
Set-ItemProperty -Path $key.PSPath -Name "Data" -Type Binary -Value $data
|
||||
|
||||
Reference in New Issue
Block a user