mirror of
https://github.com/Disassembler0/Win10-Initial-Setup-Script.git
synced 2026-01-11 23:18:19 -05:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33ea31d09c |
@@ -1,7 +1,7 @@
|
||||
##########
|
||||
# Win 10 / Server 2016 / Server 2019 Initial Setup Script - Default preset
|
||||
# Author: Disassembler <disassembler@dasm.cz>
|
||||
# Version: v3.8, 2019-09-11
|
||||
# Version: development
|
||||
# Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
|
||||
##########
|
||||
|
||||
@@ -12,7 +12,7 @@ RequireAdmin
|
||||
DisableTelemetry # EnableTelemetry
|
||||
DisableWiFiSense # EnableWiFiSense
|
||||
# DisableSmartScreen # EnableSmartScreen
|
||||
# DisableWebSearch # EnableWebSearch
|
||||
DisableWebSearch # EnableWebSearch
|
||||
DisableAppSuggestions # EnableAppSuggestions
|
||||
DisableActivityHistory # EnableActivityHistory
|
||||
DisableBackgroundApps # EnableBackgroundApps
|
||||
@@ -26,7 +26,6 @@ DisableWebLangList # EnableWebLangList
|
||||
DisableCortana # EnableCortana
|
||||
# DisableBiometrics # EnableBiometrics
|
||||
# DisableCamera # EnableCamera
|
||||
# DisableMicrophone # EnableMicrophone
|
||||
DisableErrorReporting # EnableErrorReporting
|
||||
# SetP2PUpdateLocal # SetP2PUpdateInternet # SetP2PUpdateDisable
|
||||
DisableDiagTrack # EnableDiagTrack
|
||||
@@ -38,6 +37,15 @@ DisableWAPPush # EnableWAPPush
|
||||
# SetUACLow # SetUACHigh
|
||||
# EnableSharingMappedDrives # DisableSharingMappedDrives
|
||||
DisableAdminShares # EnableAdminShares
|
||||
# DisableSMB1 # EnableSMB1
|
||||
# DisableSMBServer # EnableSMBServer
|
||||
# DisableNetBIOS # EnableNetBIOS
|
||||
# DisableLLMNR # EnableLLMNR
|
||||
# DisableNCSIProbe # EnableNCSIProbe
|
||||
SetCurrentNetworkPrivate # SetCurrentNetworkPublic
|
||||
# SetUnknownNetworksPrivate # SetUnknownNetworksPublic
|
||||
# DisableConnectionSharing # EnableConnectionSharing
|
||||
# DisableNetDevicesAutoInst # EnableNetDevicesAutoInst
|
||||
# DisableFirewall # EnableFirewall
|
||||
# HideDefenderTrayIcon # ShowDefenderTrayIcon
|
||||
# DisableDefender # EnableDefender
|
||||
@@ -55,35 +63,16 @@ 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
|
||||
DisableMaintenanceWakeUp # EnableMaintenanceWakeUp
|
||||
# DisableHomeGroups # EnableHomeGroups
|
||||
DisableSharedExperiences # EnableSharedExperiences
|
||||
# EnableClipboardHistory # DisableClipboardHistory
|
||||
DisableRemoteAssistance # EnableRemoteAssistance
|
||||
EnableRemoteDesktop # DisableRemoteDesktop
|
||||
DisableAutoplay # EnableAutoplay
|
||||
DisableAutorun # EnableAutorun
|
||||
# DisableRestorePoints # EnableRestorePoints
|
||||
@@ -92,7 +81,6 @@ DisableAutorun # EnableAutorun
|
||||
# DisableSuperfetch # EnableSuperfetch
|
||||
# DisableIndexing # EnableIndexing
|
||||
# DisableSwapFile # EnableSwapFile
|
||||
# DisableRecycleBin # EnableRecycleBin
|
||||
EnableNTFSLongPaths # DisableNTFSLongPaths
|
||||
# DisableNTFSLastAccess # EnableNTFSLastAccess
|
||||
# SetBIOSTimeUTC # SetBIOSTimeLocal
|
||||
@@ -120,7 +108,6 @@ ShowSmallTaskbarIcons # ShowLargeTaskbarIcons
|
||||
SetTaskbarCombineWhenFull # SetTaskbarCombineNever # SetTaskbarCombineAlways
|
||||
HideTaskbarPeopleIcon # ShowTaskbarPeopleIcon
|
||||
ShowTrayIcons # HideTrayIcons
|
||||
# ShowSecondsInTaskbar # HideSecondsFromTaskbar
|
||||
DisableSearchAppInStore # EnableSearchAppInStore
|
||||
DisableNewAppPrompt # EnableNewAppPrompt
|
||||
# HideRecentlyAddedApps # ShowRecentlyAddedApps
|
||||
@@ -163,7 +150,6 @@ ShowThisPCOnDesktop # HideThisPCFromDesktop
|
||||
# ShowUserFolderOnDesktop # HideUserFolderFromDesktop
|
||||
# ShowControlPanelOnDesktop # HideControlPanelFromDesktop
|
||||
# ShowNetworkOnDesktop # HideNetworkFromDesktop
|
||||
# ShowBuildNumberOnDesktop # HideBuildNumberFromDesktop
|
||||
HideDesktopFromThisPC # ShowDesktopInThisPC
|
||||
# HideDesktopFromExplorer # ShowDesktopInExplorer
|
||||
HideDocumentsFromThisPC # ShowDocumentsInThisPC
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
##########
|
||||
# Win 10 / Server 2016 / Server 2019 Initial Setup Script - Main execution loop
|
||||
# Author: Disassembler <disassembler@dasm.cz>
|
||||
# Version: v3.8, 2019-09-11
|
||||
# Version: development
|
||||
# Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
|
||||
##########
|
||||
|
||||
@@ -31,13 +31,13 @@ $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] -ErrorAction Stop
|
||||
$include = Resolve-Path $args[++$i]
|
||||
$PSCommandArgs += "-include `"$include`""
|
||||
# Import the included file as a module
|
||||
Import-Module -Name $include -ErrorAction Stop
|
||||
Import-Module -Name $include
|
||||
} ElseIf ($args[$i].ToLower() -eq "-preset") {
|
||||
# Resolve full path to the preset file
|
||||
$preset = Resolve-Path $args[++$i] -ErrorAction Stop
|
||||
$preset = Resolve-Path $args[++$i]
|
||||
$PSCommandArgs += "-preset `"$preset`""
|
||||
# Load tweak names from the preset file
|
||||
Get-Content $preset -ErrorAction Stop | ForEach-Object { AddOrRemoveTweak($_.Split("#")[0].Trim()) }
|
||||
|
||||
803
Win10.psm1
803
Win10.psm1
@@ -1,7 +1,7 @@
|
||||
##########
|
||||
# Win 10 / Server 2016 / Server 2019 Initial Setup Script - Tweak library
|
||||
# Author: Disassembler <disassembler@dasm.cz>
|
||||
# Version: v3.8, 2019-09-11
|
||||
# Version: development
|
||||
# Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
|
||||
##########
|
||||
|
||||
@@ -169,10 +169,6 @@ Function DisableAppSuggestions {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -Type DWord -Value 1
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsInkWorkspace")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsInkWorkspace" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsInkWorkspace" -Name "AllowSuggestedAppsInWindowsInkWorkspace" -Type DWord -Value 0
|
||||
# Empty placeholder tile collection in registry cache and restart Start Menu process to reload the cache
|
||||
If ([System.Environment]::OSVersion.Version.Build -ge 17134) {
|
||||
$key = Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount\*windows.data.placeholdertilecollection\Current"
|
||||
@@ -200,7 +196,6 @@ Function EnableAppSuggestions {
|
||||
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
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsInkWorkspace" -Name "AllowSuggestedAppsInWindowsInkWorkspace" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Activity History feed in Task View - Note: The checkbox "Let Windows collect my activities from this PC" remains checked even when the function is disabled
|
||||
@@ -396,36 +391,21 @@ Function EnableBiometrics {
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Biometrics" -Name "Enabled" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable access to camera from ModernUI applications
|
||||
# Disable use of camera devices
|
||||
Function DisableCamera {
|
||||
Write-Output "Disabling access to camera from ModernUI applications..."
|
||||
Write-Output "Disabling camera devices..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Camera")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Camera" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Camera" -Name "AllowCamera" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Enable access to camera in ModernUI applications
|
||||
# Enable use of camera devices
|
||||
Function EnableCamera {
|
||||
Write-Output "Enabling access to camera from ModernUI applications..."
|
||||
Write-Output "Enabling camera devices..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Camera" -Name "AllowCamera" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable access to microphone in ModernUI applications
|
||||
Function DisableMicrophone {
|
||||
Write-Output "Disabling access to microphone in ModernUI applications..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessMicrophone" -Type DWord -Value 2
|
||||
}
|
||||
|
||||
# Enable access to microphone in ModernUI applications
|
||||
Function EnableMicrophone {
|
||||
Write-Output "Enabling access to microphone from ModernUI applications..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessMicrophone" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Error reporting
|
||||
Function DisableErrorReporting {
|
||||
Write-Output "Disabling Error reporting..."
|
||||
@@ -609,6 +589,127 @@ Function EnableAdminShares {
|
||||
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name "AutoShareWks" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable obsolete SMB 1.0 protocol - Disabled by default since 1709
|
||||
Function DisableSMB1 {
|
||||
Write-Output "Disabling SMB 1.0 protocol..."
|
||||
Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force
|
||||
}
|
||||
|
||||
# Enable obsolete SMB 1.0 protocol - Disabled by default since 1709
|
||||
Function EnableSMB1 {
|
||||
Write-Output "Enabling SMB 1.0 protocol..."
|
||||
Set-SmbServerConfiguration -EnableSMB1Protocol $true -Force
|
||||
}
|
||||
|
||||
# Disable SMB Server - Completely disables file and printer sharing, but leaves the system able to connect to another SMB server as a client
|
||||
# Note: Do not run this if you plan to use Docker and Shared Drives (as it uses SMB internally), see https://github.com/Disassembler0/Win10-Initial-Setup-Script/issues/216
|
||||
Function DisableSMBServer {
|
||||
Write-Output "Disabling SMB Server..."
|
||||
Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force
|
||||
Set-SmbServerConfiguration -EnableSMB2Protocol $false -Force
|
||||
}
|
||||
|
||||
# Enable SMB Server
|
||||
Function EnableSMBServer {
|
||||
Write-Output "Enabling SMB Server..."
|
||||
Set-SmbServerConfiguration -EnableSMB2Protocol $true -Force
|
||||
}
|
||||
|
||||
# Disable NetBIOS over TCP/IP on all currently installed network interfaces
|
||||
Function DisableNetBIOS {
|
||||
Write-Output "Disabling NetBIOS over TCP/IP..."
|
||||
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces\Tcpip*" -Name "NetbiosOptions" -Type DWord -Value 2
|
||||
}
|
||||
|
||||
# Enable NetBIOS over TCP/IP on all currently installed network interfaces
|
||||
Function EnableNetBIOS {
|
||||
Write-Output "Enabling NetBIOS over TCP/IP..."
|
||||
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces\Tcpip*" -Name "NetbiosOptions" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Disable Link-Local Multicast Name Resolution (LLMNR) protocol
|
||||
Function DisableLLMNR {
|
||||
Write-Output "Disabling LLMNR..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" -Name "EnableMulticast" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Enable Link-Local Multicast Name Resolution (LLMNR) protocol
|
||||
Function EnableLLMNR {
|
||||
Write-Output "Enabling LLMNR..."
|
||||
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..."
|
||||
Set-NetConnectionProfile -NetworkCategory Private
|
||||
}
|
||||
|
||||
# Set current network profile to public (deny file sharing, device discovery, etc.)
|
||||
Function SetCurrentNetworkPublic {
|
||||
Write-Output "Setting current network profile to public..."
|
||||
Set-NetConnectionProfile -NetworkCategory Public
|
||||
}
|
||||
|
||||
# Set unknown networks profile to private (allow file sharing, device discovery, etc.)
|
||||
Function SetUnknownNetworksPrivate {
|
||||
Write-Output "Setting unknown networks profile to private..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24" -Name "Category" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Set unknown networks profile to public (deny file sharing, device discovery, etc.)
|
||||
Function SetUnknownNetworksPublic {
|
||||
Write-Output "Setting unknown networks profile to public..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24" -Name "Category" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Internet Connection Sharing (e.g. mobile hotspot)
|
||||
Function DisableConnectionSharing {
|
||||
Write-Output "Disabling Internet Connection Sharing..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Network Connections" -Name "NC_ShowSharedAccessUI" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Enable Internet Connection Sharing (e.g. mobile hotspot)
|
||||
Function EnableConnectionSharing {
|
||||
Write-Output "Enabling Internet Connection Sharing..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Network Connections" -Name "NC_ShowSharedAccessUI" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable automatic installation of network devices
|
||||
Function DisableNetDevicesAutoInst {
|
||||
Write-Output "Disabling automatic installation of network devices..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\NcdAutoSetup\Private")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\NcdAutoSetup\Private" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\NcdAutoSetup\Private" -Name "AutoSetup" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Enable automatic installation of network devices
|
||||
Function EnableNetDevicesAutoInst {
|
||||
Write-Output "Enabling automatic installation of network devices..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\NcdAutoSetup\Private" -Name "AutoSetup" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Firewall
|
||||
Function DisableFirewall {
|
||||
Write-Output "Disabling Firewall..."
|
||||
@@ -869,260 +970,6 @@ Function SetDEPOptIn {
|
||||
|
||||
|
||||
|
||||
##########
|
||||
#region Network Tweaks
|
||||
##########
|
||||
|
||||
# Set current network profile to private (allow file sharing, device discovery, etc.)
|
||||
Function SetCurrentNetworkPrivate {
|
||||
Write-Output "Setting current network profile to private..."
|
||||
Set-NetConnectionProfile -NetworkCategory Private
|
||||
}
|
||||
|
||||
# Set current network profile to public (deny file sharing, device discovery, etc.)
|
||||
Function SetCurrentNetworkPublic {
|
||||
Write-Output "Setting current network profile to public..."
|
||||
Set-NetConnectionProfile -NetworkCategory Public
|
||||
}
|
||||
|
||||
# Set unknown networks profile to private (allow file sharing, device discovery, etc.)
|
||||
Function SetUnknownNetworksPrivate {
|
||||
Write-Output "Setting unknown networks profile to private..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24" -Name "Category" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Set unknown networks profile to public (deny file sharing, device discovery, etc.)
|
||||
Function SetUnknownNetworksPublic {
|
||||
Write-Output "Setting unknown networks profile to public..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24" -Name "Category" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable automatic installation of network devices
|
||||
Function DisableNetDevicesAutoInst {
|
||||
Write-Output "Disabling automatic installation of network devices..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\NcdAutoSetup\Private")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\NcdAutoSetup\Private" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\NcdAutoSetup\Private" -Name "AutoSetup" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Enable automatic installation of network devices
|
||||
Function EnableNetDevicesAutoInst {
|
||||
Write-Output "Enabling automatic installation of network devices..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\NcdAutoSetup\Private" -Name "AutoSetup" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Stop and disable Home Groups services - Not applicable since 1803. Not applicable to Server
|
||||
Function DisableHomeGroups {
|
||||
Write-Output "Stopping and disabling Home Groups services..."
|
||||
If (Get-Service "HomeGroupListener" -ErrorAction SilentlyContinue) {
|
||||
Stop-Service "HomeGroupListener" -WarningAction SilentlyContinue
|
||||
Set-Service "HomeGroupListener" -StartupType Disabled
|
||||
}
|
||||
If (Get-Service "HomeGroupProvider" -ErrorAction SilentlyContinue) {
|
||||
Stop-Service "HomeGroupProvider" -WarningAction SilentlyContinue
|
||||
Set-Service "HomeGroupProvider" -StartupType Disabled
|
||||
}
|
||||
}
|
||||
|
||||
# Enable and start Home Groups services - Not applicable since 1803. Not applicable to Server
|
||||
Function EnableHomeGroups {
|
||||
Write-Output "Starting and enabling Home Groups services..."
|
||||
Set-Service "HomeGroupListener" -StartupType Manual
|
||||
Set-Service "HomeGroupProvider" -StartupType Manual
|
||||
Start-Service "HomeGroupProvider" -WarningAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable obsolete SMB 1.0 protocol - Disabled by default since 1709
|
||||
Function DisableSMB1 {
|
||||
Write-Output "Disabling SMB 1.0 protocol..."
|
||||
Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force
|
||||
}
|
||||
|
||||
# Enable obsolete SMB 1.0 protocol - Disabled by default since 1709
|
||||
Function EnableSMB1 {
|
||||
Write-Output "Enabling SMB 1.0 protocol..."
|
||||
Set-SmbServerConfiguration -EnableSMB1Protocol $true -Force
|
||||
}
|
||||
|
||||
# Disable SMB Server - Completely disables file and printer sharing, but leaves the system able to connect to another SMB server as a client
|
||||
# Note: Do not run this if you plan to use Docker and Shared Drives (as it uses SMB internally), see https://github.com/Disassembler0/Win10-Initial-Setup-Script/issues/216
|
||||
Function DisableSMBServer {
|
||||
Write-Output "Disabling SMB Server..."
|
||||
Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force
|
||||
Set-SmbServerConfiguration -EnableSMB2Protocol $false -Force
|
||||
Disable-NetAdapterBinding -Name "*" -ComponentID "ms_server"
|
||||
}
|
||||
|
||||
# Enable SMB Server
|
||||
Function EnableSMBServer {
|
||||
Write-Output "Enabling SMB Server..."
|
||||
Set-SmbServerConfiguration -EnableSMB2Protocol $true -Force
|
||||
Enable-NetAdapterBinding -Name "*" -ComponentID "ms_server"
|
||||
}
|
||||
|
||||
# Disable NetBIOS over TCP/IP on all currently installed network interfaces
|
||||
Function DisableNetBIOS {
|
||||
Write-Output "Disabling NetBIOS over TCP/IP..."
|
||||
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces\Tcpip*" -Name "NetbiosOptions" -Type DWord -Value 2
|
||||
}
|
||||
|
||||
# Enable NetBIOS over TCP/IP on all currently installed network interfaces
|
||||
Function EnableNetBIOS {
|
||||
Write-Output "Enabling NetBIOS over TCP/IP..."
|
||||
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces\Tcpip*" -Name "NetbiosOptions" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Disable Link-Local Multicast Name Resolution (LLMNR) protocol
|
||||
Function DisableLLMNR {
|
||||
Write-Output "Disabling Link-Local Multicast Name Resolution (LLMNR)..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" -Name "EnableMulticast" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Enable Link-Local Multicast Name Resolution (LLMNR) protocol
|
||||
Function EnableLLMNR {
|
||||
Write-Output "Enabling Link-Local Multicast Name Resolution (LLMNR)..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient" -Name "EnableMulticast" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Local-Link Discovery Protocol (LLDP) for all installed network interfaces
|
||||
Function DisableLLDP {
|
||||
Write-Output "Disabling Local-Link Discovery Protocol (LLDP)..."
|
||||
Disable-NetAdapterBinding -Name "*" -ComponentID "ms_lldp"
|
||||
}
|
||||
|
||||
# Enable Local-Link Discovery Protocol (LLDP) for all installed network interfaces
|
||||
Function EnableLLDP {
|
||||
Write-Output "Enabling Local-Link Discovery Protocol (LLDP)..."
|
||||
Enable-NetAdapterBinding -Name "*" -ComponentID "ms_lldp"
|
||||
}
|
||||
|
||||
# Disable Local-Link Topology Discovery (LLTD) for all installed network interfaces
|
||||
Function DisableLLTD {
|
||||
Write-Output "Disabling Local-Link Topology Discovery (LLTD)..."
|
||||
Disable-NetAdapterBinding -Name "*" -ComponentID "ms_lltdio"
|
||||
Disable-NetAdapterBinding -Name "*" -ComponentID "ms_rspndr"
|
||||
}
|
||||
|
||||
# Enable Local-Link Topology Discovery (LLTD) for all installed network interfaces
|
||||
Function EnableLLTD {
|
||||
Write-Output "Enabling Local-Link Topology Discovery (LLTD)..."
|
||||
Enable-NetAdapterBinding -Name "*" -ComponentID "ms_lltdio"
|
||||
Enable-NetAdapterBinding -Name "*" -ComponentID "ms_rspndr"
|
||||
}
|
||||
|
||||
# Disable Client for Microsoft Networks for all installed network interfaces
|
||||
Function DisableMSNetClient {
|
||||
Write-Output "Disabling Client for Microsoft Networks..."
|
||||
Disable-NetAdapterBinding -Name "*" -ComponentID "ms_msclient"
|
||||
}
|
||||
|
||||
# Enable Client for Microsoft Networks for all installed network interfaces
|
||||
Function EnableMSNetClient {
|
||||
Write-Output "Enabling Client for Microsoft Networks..."
|
||||
Enable-NetAdapterBinding -Name "*" -ComponentID "ms_msclient"
|
||||
}
|
||||
|
||||
# Disable Quality of Service (QoS) packet scheduler for all installed network interfaces
|
||||
Function DisableQoS {
|
||||
Write-Output "Disabling Quality of Service (QoS) packet scheduler..."
|
||||
Disable-NetAdapterBinding -Name "*" -ComponentID "ms_pacer"
|
||||
}
|
||||
|
||||
# Enable Quality of Service (QoS) packet scheduler for all installed network interfaces
|
||||
Function EnableQoS {
|
||||
Write-Output "Enabling Quality of Service (QoS) packet scheduler..."
|
||||
Enable-NetAdapterBinding -Name "*" -ComponentID "ms_pacer"
|
||||
}
|
||||
|
||||
# Disable IPv4 stack for all installed network interfaces
|
||||
Function DisableIPv4 {
|
||||
Write-Output "Disabling IPv4 stack..."
|
||||
Disable-NetAdapterBinding -Name "*" -ComponentID "ms_tcpip"
|
||||
}
|
||||
|
||||
# Enable IPv4 stack for all installed network interfaces
|
||||
Function EnableIPv4 {
|
||||
Write-Output "Enabling IPv4 stack..."
|
||||
Enable-NetAdapterBinding -Name "*" -ComponentID "ms_tcpip"
|
||||
}
|
||||
|
||||
# Disable IPv6 stack for all installed network interfaces
|
||||
Function DisableIPv6 {
|
||||
Write-Output "Disabling IPv6 stack..."
|
||||
Disable-NetAdapterBinding -Name "*" -ComponentID "ms_tcpip6"
|
||||
}
|
||||
|
||||
# Enable IPv6 stack for all installed network interfaces
|
||||
Function EnableIPv6 {
|
||||
Write-Output "Enabling IPv6 stack..."
|
||||
Enable-NetAdapterBinding -Name "*" -ComponentID "ms_tcpip6"
|
||||
}
|
||||
|
||||
# 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 Network Connectivity Status Indicator (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 Network Connectivity Status Indicator (NCSI) active test..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\NetworkConnectivityStatusIndicator" -Name "NoActiveProbe" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Internet Connection Sharing (e.g. mobile hotspot)
|
||||
Function DisableConnectionSharing {
|
||||
Write-Output "Disabling Internet Connection Sharing..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Network Connections" -Name "NC_ShowSharedAccessUI" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Enable Internet Connection Sharing (e.g. mobile hotspot)
|
||||
Function EnableConnectionSharing {
|
||||
Write-Output "Enabling Internet Connection Sharing..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Network Connections" -Name "NC_ShowSharedAccessUI" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Remote Assistance - Not applicable to Server (unless Remote Assistance is explicitly installed)
|
||||
Function DisableRemoteAssistance {
|
||||
Write-Output "Disabling Remote Assistance..."
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Remote Assistance" -Name "fAllowToGetHelp" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Enable Remote Assistance - Not applicable to Server (unless Remote Assistance is explicitly installed)
|
||||
Function EnableRemoteAssistance {
|
||||
Write-Output "Enabling Remote Assistance..."
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Remote Assistance" -Name "fAllowToGetHelp" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable Remote Desktop
|
||||
Function EnableRemoteDesktop {
|
||||
Write-Output "Enabling Remote Desktop..."
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Type DWord -Value 0
|
||||
Enable-NetFirewallRule -Name "RemoteDesktop*"
|
||||
}
|
||||
|
||||
# Disable Remote Desktop
|
||||
Function DisableRemoteDesktop {
|
||||
Write-Output "Disabling Remote Desktop..."
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Type DWord -Value 1
|
||||
Disable-NetFirewallRule -Name "RemoteDesktop*"
|
||||
}
|
||||
|
||||
##########
|
||||
#endregion Network Tweaks
|
||||
##########
|
||||
|
||||
|
||||
|
||||
##########
|
||||
#region Service Tweaks
|
||||
##########
|
||||
@@ -1173,20 +1020,6 @@ Function EnableUpdateDriver {
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Enable receiving updates for other Microsoft products via Windows Update
|
||||
Function EnableUpdateMSProducts {
|
||||
Write-Output "Enabling updates for other Microsoft products..."
|
||||
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") | Out-Null
|
||||
}
|
||||
|
||||
# Disable receiving updates for other Microsoft products via Windows Update
|
||||
Function DisableUpdateMSProducts {
|
||||
Write-Output "Disabling updates for other Microsoft products..."
|
||||
If ((New-Object -ComObject Microsoft.Update.ServiceManager).Services | Where-Object { $_.ServiceID -eq "7971f918-a847-4430-9279-4a52d1efe18d"}) {
|
||||
(New-Object -ComObject Microsoft.Update.ServiceManager).RemoveService("7971f918-a847-4430-9279-4a52d1efe18d") | Out-Null
|
||||
}
|
||||
}
|
||||
|
||||
# Disable Windows Update automatic downloads
|
||||
Function DisableUpdateAutoDownload {
|
||||
Write-Output "Disabling Windows Update automatic downloads..."
|
||||
@@ -1202,23 +1035,6 @@ Function EnableUpdateAutoDownload {
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable automatic restart after Windows Update installation
|
||||
# The tweak is slightly experimental, as it registers a dummy debugger for MusNotification.exe
|
||||
# which blocks the restart prompt executable from running, thus never schedulling the restart
|
||||
Function DisableUpdateRestart {
|
||||
Write-Output "Disabling Windows Update automatic restart..."
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MusNotification.exe")) {
|
||||
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MusNotification.exe" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MusNotification.exe" -Name "Debugger" -Type String -Value "cmd.exe"
|
||||
}
|
||||
|
||||
# Enable automatic restart after Windows Update installation
|
||||
Function EnableUpdateRestart {
|
||||
Write-Output "Enabling Windows Update automatic restart..."
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MusNotification.exe" -Name "Debugger" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable nightly wake-up for Automatic Maintenance and Windows Updates
|
||||
Function DisableMaintenanceWakeUp {
|
||||
Write-Output "Disabling nightly wake-up for Automatic Maintenance..."
|
||||
@@ -1236,6 +1052,27 @@ Function EnableMaintenanceWakeUp {
|
||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" -Name "WakeUp" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Stop and disable Home Groups services - Not applicable since 1803. Not applicable to Server
|
||||
Function DisableHomeGroups {
|
||||
Write-Output "Stopping and disabling Home Groups services..."
|
||||
If (Get-Service "HomeGroupListener" -ErrorAction SilentlyContinue) {
|
||||
Stop-Service "HomeGroupListener" -WarningAction SilentlyContinue
|
||||
Set-Service "HomeGroupListener" -StartupType Disabled
|
||||
}
|
||||
If (Get-Service "HomeGroupProvider" -ErrorAction SilentlyContinue) {
|
||||
Stop-Service "HomeGroupProvider" -WarningAction SilentlyContinue
|
||||
Set-Service "HomeGroupProvider" -StartupType Disabled
|
||||
}
|
||||
}
|
||||
|
||||
# Enable and start Home Groups services - Not applicable since 1803. Not applicable to Server
|
||||
Function EnableHomeGroups {
|
||||
Write-Output "Starting and enabling Home Groups services..."
|
||||
Set-Service "HomeGroupListener" -StartupType Manual
|
||||
Set-Service "HomeGroupProvider" -StartupType Manual
|
||||
Start-Service "HomeGroupProvider" -WarningAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Shared Experiences - Applicable since 1703. Not applicable to Server
|
||||
# This setting can be set also via GPO, however doing so causes reset of Start Menu cache. See https://github.com/Disassembler0/Win10-Initial-Setup-Script/issues/145 for details
|
||||
Function DisableSharedExperiences {
|
||||
@@ -1264,6 +1101,32 @@ Function DisableClipboardHistory {
|
||||
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Clipboard" -Name "EnableClipboardHistory" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Remote Assistance - Not applicable to Server (unless Remote Assistance is explicitly installed)
|
||||
Function DisableRemoteAssistance {
|
||||
Write-Output "Disabling Remote Assistance..."
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Remote Assistance" -Name "fAllowToGetHelp" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Enable Remote Assistance - Not applicable to Server (unless Remote Assistance is explicitly installed)
|
||||
Function EnableRemoteAssistance {
|
||||
Write-Output "Enabling Remote Assistance..."
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Remote Assistance" -Name "fAllowToGetHelp" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable Remote Desktop
|
||||
Function EnableRemoteDesktop {
|
||||
Write-Output "Enabling Remote Desktop..."
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Type DWord -Value 0
|
||||
Enable-NetFirewallRule -Name "RemoteDesktop*"
|
||||
}
|
||||
|
||||
# Disable Remote Desktop
|
||||
Function DisableRemoteDesktop {
|
||||
Write-Output "Disabling Remote Desktop..."
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Type DWord -Value 1
|
||||
Disable-NetFirewallRule -Name "RemoteDesktop*"
|
||||
}
|
||||
|
||||
# Disable Autoplay
|
||||
Function DisableAutoplay {
|
||||
Write-Output "Disabling Autoplay..."
|
||||
@@ -1377,21 +1240,6 @@ Function EnableSwapFile {
|
||||
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "SwapfileControl" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable Recycle Bin - Files will be permanently deleted without placing into Recycle Bin
|
||||
Function DisableRecycleBin {
|
||||
Write-Output "Disabling Recycle Bin..."
|
||||
If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer")) {
|
||||
New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoRecycleFiles" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Enable Recycle Bin
|
||||
Function EnableRecycleBin {
|
||||
Write-Output "Enable Recycle Bin..."
|
||||
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoRecycleFiles" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Enable NTFS paths with length over 260 characters
|
||||
Function EnableNTFSLongPaths {
|
||||
Write-Output "Enabling NTFS paths with length over 260 characters..."
|
||||
@@ -1801,21 +1649,6 @@ Function HideTrayIcons {
|
||||
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoAutoTrayNotify" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Show seconds in taskbar
|
||||
Function ShowSecondsInTaskbar {
|
||||
Write-Output "Showing seconds in taskbar..."
|
||||
If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced")) {
|
||||
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowSecondsInSystemClock" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Hide seconds from taskbar
|
||||
Function HideSecondsFromTaskbar {
|
||||
Write-Output "Hiding seconds from taskbar..."
|
||||
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowSecondsInSystemClock" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Disable search for app in store for unknown extensions
|
||||
Function DisableSearchAppInStore {
|
||||
Write-Output "Disabling search for app in store for unknown extensions..."
|
||||
@@ -2003,7 +1836,7 @@ Function RemoveENKeyboard {
|
||||
Function EnableNumlock {
|
||||
Write-Output "Enabling NumLock after startup..."
|
||||
If (!(Test-Path "HKU:")) {
|
||||
New-PSDrive -Name "HKU" -PSProvider "Registry" -Root "HKEY_USERS" | Out-Null
|
||||
New-PSDrive -Name HKU -PSProvider Registry -Root HKEY_USERS | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKU:\.DEFAULT\Control Panel\Keyboard" -Name "InitialKeyboardIndicators" -Type DWord -Value 2147483650
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
@@ -2017,7 +1850,7 @@ Function EnableNumlock {
|
||||
Function DisableNumlock {
|
||||
Write-Output "Disabling NumLock after startup..."
|
||||
If (!(Test-Path "HKU:")) {
|
||||
New-PSDrive -Name "HKU" -PSProvider "Registry" -Root "HKEY_USERS" | Out-Null
|
||||
New-PSDrive -Name HKU -PSProvider Registry -Root HKEY_USERS | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "HKU:\.DEFAULT\Control Panel\Keyboard" -Name "InitialKeyboardIndicators" -Type DWord -Value 2147483648
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
@@ -2473,18 +2306,6 @@ Function HideNetworkFromDesktop {
|
||||
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Show Windows build number and Windows edition (Home/Pro/Enterprise) from bottom right of desktop
|
||||
Function ShowBuildNumberOnDesktop {
|
||||
Write-Output "Showing Windows build number on desktop..."
|
||||
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "PaintDesktopVersion" -Type DWord -Value 1
|
||||
}
|
||||
|
||||
# Remove Windows build number and Windows edition (Home/Pro/Enterprise) from bottom right of desktop
|
||||
Function HideBuildNumberFromDesktop {
|
||||
Write-Output "Hiding Windows build number from desktop..."
|
||||
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "PaintDesktopVersion" -Type DWord -Value 0
|
||||
}
|
||||
|
||||
# Hide Desktop icon from This PC - The icon remains in personal folders and open/save dialogs
|
||||
Function HideDesktopFromThisPC {
|
||||
Write-Output "Hiding Desktop icon from This PC..."
|
||||
@@ -2848,14 +2669,12 @@ Function UninstallOneDrive {
|
||||
Start-Sleep -s 2
|
||||
Stop-Process -Name "explorer" -Force -ErrorAction SilentlyContinue
|
||||
Start-Sleep -s 2
|
||||
If ((Get-ChildItem -Path "$env:USERPROFILE\OneDrive" -ErrorAction SilentlyContinue | Measure-Object).Count -eq 0) {
|
||||
Remove-Item -Path "$env:USERPROFILE\OneDrive" -Force -Recurse -ErrorAction SilentlyContinue
|
||||
}
|
||||
Remove-Item -Path "$env:USERPROFILE\OneDrive" -Force -Recurse -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\OneDrive" -Force -Recurse -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "$env:PROGRAMDATA\Microsoft OneDrive" -Force -Recurse -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "$env:SYSTEMDRIVE\OneDriveTemp" -Force -Recurse -ErrorAction SilentlyContinue
|
||||
If (!(Test-Path "HKCR:")) {
|
||||
New-PSDrive -Name "HKCR" -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" | Out-Null
|
||||
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null
|
||||
}
|
||||
Remove-Item -Path "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -Recurse -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -Recurse -ErrorAction SilentlyContinue
|
||||
@@ -2873,65 +2692,66 @@ Function InstallOneDrive {
|
||||
|
||||
# Uninstall default Microsoft applications
|
||||
Function UninstallMsftBloat {
|
||||
Param ([switch]$AllUsers)
|
||||
Write-Output "Uninstalling default Microsoft applications..."
|
||||
Get-AppxPackage "Microsoft.3DBuilder" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.AppConnector" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.BingFinance" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.BingFoodAndDrink" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.BingHealthAndFitness" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.BingMaps" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.BingNews" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.BingSports" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.BingTranslator" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.BingTravel" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.BingWeather" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.CommsPhone" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.ConnectivityStore" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.FreshPaint" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.GetHelp" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Getstarted" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.HelpAndTips" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Media.PlayReadyClient.2" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Messaging" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Microsoft3DViewer" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.MicrosoftOfficeHub" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.MicrosoftPowerBIForWindows" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.MicrosoftSolitaireCollection" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.MicrosoftStickyNotes" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.MinecraftUWP" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.MixedReality.Portal" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.MoCamera" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.MSPaint" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.NetworkSpeedTest" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.OfficeLens" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Office.OneNote" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Office.Sway" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.OneConnect" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.People" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Print3D" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Reader" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.RemoteDesktop" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.SkypeApp" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Todos" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Wallet" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WebMediaExtensions" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Whiteboard" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WindowsAlarms" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WindowsCamera" | Remove-AppxPackage
|
||||
Get-AppxPackage "microsoft.windowscommunicationsapps" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WindowsFeedbackHub" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WindowsMaps" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WindowsPhone" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Windows.Photos" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WindowsReadingList" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WindowsScan" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WindowsSoundRecorder" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WinJS.1.0" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WinJS.2.0" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.YourPhone" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.ZuneMusic" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.ZuneVideo" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Advertising.Xaml" | Remove-AppxPackage # Dependency for microsoft.windowscommunicationsapps, Microsoft.BingWeather
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.3DBuilder" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.AppConnector" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.BingFinance" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.BingFoodAndDrink" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.BingHealthAndFitness" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.BingMaps" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.BingNews" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.BingSports" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.BingTranslator" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.BingTravel" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.BingWeather" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.CommsPhone" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.ConnectivityStore" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.FreshPaint" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.GetHelp" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Getstarted" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.HelpAndTips" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Media.PlayReadyClient.2" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Messaging" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Microsoft3DViewer" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.MicrosoftOfficeHub" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.MicrosoftPowerBIForWindows" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.MicrosoftSolitaireCollection" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.MicrosoftStickyNotes" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.MinecraftUWP" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.MixedReality.Portal" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.MoCamera" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.MSPaint" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.NetworkSpeedTest" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.OfficeLens" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Office.OneNote" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Office.Sway" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.OneConnect" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.People" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Print3D" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Reader" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.RemoteDesktop" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.SkypeApp" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Todos" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Wallet" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.WebMediaExtensions" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Whiteboard" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.WindowsAlarms" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.WindowsCamera" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "microsoft.windowscommunicationsapps" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.WindowsFeedbackHub" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.WindowsMaps" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.WindowsPhone" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Windows.Photos" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.WindowsReadingList" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.WindowsScan" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.WindowsSoundRecorder" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.WinJS.1.0" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.WinJS.2.0" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.YourPhone" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.ZuneMusic" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.ZuneVideo" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Advertising.Xaml" | Remove-AppxPackage -AllUsers:$AllUsers # Dependency for microsoft.windowscommunicationsapps, Microsoft.BingWeather
|
||||
}
|
||||
|
||||
# Install default Microsoft applications
|
||||
@@ -2996,61 +2816,56 @@ Function InstallMsftBloat {
|
||||
Get-AppxPackage -AllUsers "Microsoft.ZuneMusic" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -AllUsers "Microsoft.ZuneVideo" | ForEach-Object {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
|
||||
# dism /Mount-Image /ImageFile:D:\sources\install.wim /index:1 /ReadOnly /MountDir:C:\Mnt
|
||||
# robocopy /S /SEC /R:0 "C:\Mnt\Program Files\WindowsApps" "C:\Program Files\WindowsApps"
|
||||
# dism /Unmount-Image /Discard /MountDir:C:\Mnt
|
||||
# Remove-Item -Path C:\Mnt -Recurse
|
||||
|
||||
# Uninstall default third party applications
|
||||
function UninstallThirdPartyBloat {
|
||||
Param ([switch]$AllUsers)
|
||||
Write-Output "Uninstalling default third party applications..."
|
||||
Get-AppxPackage "2414FC7A.Viber" | Remove-AppxPackage
|
||||
Get-AppxPackage "41038Axilesoft.ACGMediaPlayer" | Remove-AppxPackage
|
||||
Get-AppxPackage "46928bounde.EclipseManager" | Remove-AppxPackage
|
||||
Get-AppxPackage "4DF9E0F8.Netflix" | Remove-AppxPackage
|
||||
Get-AppxPackage "64885BlueEdge.OneCalendar" | Remove-AppxPackage
|
||||
Get-AppxPackage "7EE7776C.LinkedInforWindows" | Remove-AppxPackage
|
||||
Get-AppxPackage "828B5831.HiddenCityMysteryofShadows" | Remove-AppxPackage
|
||||
Get-AppxPackage "89006A2E.AutodeskSketchBook" | Remove-AppxPackage
|
||||
Get-AppxPackage "9E2F88E3.Twitter" | Remove-AppxPackage
|
||||
Get-AppxPackage "A278AB0D.DisneyMagicKingdoms" | Remove-AppxPackage
|
||||
Get-AppxPackage "A278AB0D.DragonManiaLegends" | Remove-AppxPackage
|
||||
Get-AppxPackage "A278AB0D.MarchofEmpires" | Remove-AppxPackage
|
||||
Get-AppxPackage "ActiproSoftwareLLC.562882FEEB491" | Remove-AppxPackage
|
||||
Get-AppxPackage "AD2F1837.GettingStartedwithWindows8" | Remove-AppxPackage
|
||||
Get-AppxPackage "AD2F1837.HPJumpStart" | Remove-AppxPackage
|
||||
Get-AppxPackage "AD2F1837.HPRegistration" | Remove-AppxPackage
|
||||
Get-AppxPackage "AdobeSystemsIncorporated.AdobePhotoshopExpress" | Remove-AppxPackage
|
||||
Get-AppxPackage "Amazon.com.Amazon" | Remove-AppxPackage
|
||||
Get-AppxPackage "C27EB4BA.DropboxOEM" | Remove-AppxPackage
|
||||
Get-AppxPackage "CAF9E577.Plex" | Remove-AppxPackage
|
||||
Get-AppxPackage "CyberLinkCorp.hs.PowerMediaPlayer14forHPConsumerPC" | Remove-AppxPackage
|
||||
Get-AppxPackage "D52A8D61.FarmVille2CountryEscape" | Remove-AppxPackage
|
||||
Get-AppxPackage "D5EA27B7.Duolingo-LearnLanguagesforFree" | Remove-AppxPackage
|
||||
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 "Fitbit.FitbitCoach" | 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.CandyCrushFriends" | Remove-AppxPackage
|
||||
Get-AppxPackage "king.com.CandyCrushSaga" | Remove-AppxPackage
|
||||
Get-AppxPackage "king.com.CandyCrushSodaSaga" | Remove-AppxPackage
|
||||
Get-AppxPackage "LenovoCorporation.LenovoID" | Remove-AppxPackage
|
||||
Get-AppxPackage "LenovoCorporation.LenovoSettings" | Remove-AppxPackage
|
||||
Get-AppxPackage "Nordcurrent.CookingFever" | Remove-AppxPackage
|
||||
Get-AppxPackage "PandoraMediaInc.29680B314EFC2" | Remove-AppxPackage
|
||||
Get-AppxPackage "PricelinePartnerNetwork.Booking.comBigsavingsonhot" | Remove-AppxPackage
|
||||
Get-AppxPackage "SpotifyAB.SpotifyMusic" | Remove-AppxPackage
|
||||
Get-AppxPackage "ThumbmunkeysLtd.PhototasticCollage" | Remove-AppxPackage
|
||||
Get-AppxPackage "WinZipComputing.WinZipUniversal" | Remove-AppxPackage
|
||||
Get-AppxPackage "XINGAG.XING" | Remove-AppxPackage
|
||||
Get-AppxPackage -AllUsers:$AllUsers "2414FC7A.Viber" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "41038Axilesoft.ACGMediaPlayer" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "46928bounde.EclipseManager" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "4DF9E0F8.Netflix" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "64885BlueEdge.OneCalendar" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "7EE7776C.LinkedInforWindows" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "828B5831.HiddenCityMysteryofShadows" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "89006A2E.AutodeskSketchBook" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "9E2F88E3.Twitter" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "A278AB0D.DisneyMagicKingdoms" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "A278AB0D.DragonManiaLegends" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "A278AB0D.MarchofEmpires" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "ActiproSoftwareLLC.562882FEEB491" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "AD2F1837.GettingStartedwithWindows8" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "AD2F1837.HPJumpStart" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "AD2F1837.HPRegistration" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "AdobeSystemsIncorporated.AdobePhotoshopExpress" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Amazon.com.Amazon" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "C27EB4BA.DropboxOEM" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "CAF9E577.Plex" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "CyberLinkCorp.hs.PowerMediaPlayer14forHPConsumerPC" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "D52A8D61.FarmVille2CountryEscape" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "D5EA27B7.Duolingo-LearnLanguagesforFree" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "DB6EA5DB.CyberLinkMediaSuiteEssentials" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "DolbyLaboratories.DolbyAccess" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Drawboard.DrawboardPDF" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "E046963F.LenovoCompanion" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Facebook.Facebook" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Fitbit.FitbitCoach" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "flaregamesGmbH.RoyalRevolt2" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "GAMELOFTSA.Asphalt8Airborne" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "KeeperSecurityInc.Keeper" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "king.com.BubbleWitch3Saga" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "king.com.CandyCrushFriends" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "king.com.CandyCrushSaga" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "king.com.CandyCrushSodaSaga" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "LenovoCorporation.LenovoID" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "LenovoCorporation.LenovoSettings" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Nordcurrent.CookingFever" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "PandoraMediaInc.29680B314EFC2" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "PricelinePartnerNetwork.Booking.comBigsavingsonhot" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "SpotifyAB.SpotifyMusic" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "ThumbmunkeysLtd.PhototasticCollage" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "WinZipComputing.WinZipUniversal" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "XINGAG.XING" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
}
|
||||
|
||||
# Install default third party applications
|
||||
@@ -3105,11 +2920,12 @@ Function InstallThirdPartyBloat {
|
||||
|
||||
# Uninstall Windows Store
|
||||
Function UninstallWindowsStore {
|
||||
Param ([switch]$AllUsers)
|
||||
Write-Output "Uninstalling Windows Store..."
|
||||
Get-AppxPackage "Microsoft.DesktopAppInstaller" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.Services.Store.Engagement" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.StorePurchaseApp" | Remove-AppxPackage
|
||||
Get-AppxPackage "Microsoft.WindowsStore" | Remove-AppxPackage
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.DesktopAppInstaller" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Services.Store.Engagement" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.StorePurchaseApp" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.WindowsStore" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
}
|
||||
|
||||
# Install Windows Store
|
||||
@@ -3123,13 +2939,14 @@ Function InstallWindowsStore {
|
||||
|
||||
# Disable Xbox features - Not applicable to Server
|
||||
Function DisableXboxFeatures {
|
||||
Param ([switch]$AllUsers)
|
||||
Write-Output "Disabling Xbox features..."
|
||||
Get-AppxPackage "Microsoft.XboxApp" | Remove-AppxPackage
|
||||
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
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.XboxApp" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.XboxIdentityProvider" | Remove-AppxPackage -AllUsers:$AllUsers -ErrorAction SilentlyContinue
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.XboxSpeechToTextOverlay" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.XboxGameOverlay" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.XboxGamingOverlay" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Get-AppxPackage -AllUsers:$AllUsers "Microsoft.Xbox.TCUI" | Remove-AppxPackage -AllUsers:$AllUsers
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\GameBar" -Name "AutoGameModeEnabled" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 0
|
||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR")) {
|
||||
@@ -3388,7 +3205,7 @@ Function UninstallNET23 {
|
||||
Function SetPhotoViewerAssociation {
|
||||
Write-Output "Setting Photo Viewer association for bmp, gif, jpg, png and tif..."
|
||||
If (!(Test-Path "HKCR:")) {
|
||||
New-PSDrive -Name "HKCR" -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" | Out-Null
|
||||
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null
|
||||
}
|
||||
ForEach ($type in @("Paint.Picture", "giffile", "jpegfile", "pngfile")) {
|
||||
New-Item -Path $("HKCR:\$type\shell\open") -Force | Out-Null
|
||||
@@ -3402,7 +3219,7 @@ Function SetPhotoViewerAssociation {
|
||||
Function UnsetPhotoViewerAssociation {
|
||||
Write-Output "Unsetting Photo Viewer association for bmp, gif, jpg, png and tif..."
|
||||
If (!(Test-Path "HKCR:")) {
|
||||
New-PSDrive -Name "HKCR" -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" | Out-Null
|
||||
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null
|
||||
}
|
||||
Remove-Item -Path "HKCR:\Paint.Picture\shell\open" -Recurse -ErrorAction SilentlyContinue
|
||||
Remove-ItemProperty -Path "HKCR:\giffile\shell\open" -Name "MuiVerb" -ErrorAction SilentlyContinue
|
||||
@@ -3417,7 +3234,7 @@ Function UnsetPhotoViewerAssociation {
|
||||
Function AddPhotoViewerOpenWith {
|
||||
Write-Output "Adding Photo Viewer to 'Open with...'"
|
||||
If (!(Test-Path "HKCR:")) {
|
||||
New-PSDrive -Name "HKCR" -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" | Out-Null
|
||||
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null
|
||||
}
|
||||
New-Item -Path "HKCR:\Applications\photoviewer.dll\shell\open\command" -Force | Out-Null
|
||||
New-Item -Path "HKCR:\Applications\photoviewer.dll\shell\open\DropTarget" -Force | Out-Null
|
||||
@@ -3430,7 +3247,7 @@ Function AddPhotoViewerOpenWith {
|
||||
Function RemovePhotoViewerOpenWith {
|
||||
Write-Output "Removing Photo Viewer from 'Open with...'"
|
||||
If (!(Test-Path "HKCR:")) {
|
||||
New-PSDrive -Name "HKCR" -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" | Out-Null
|
||||
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null
|
||||
}
|
||||
Remove-Item -Path "HKCR:\Applications\photoviewer.dll\shell\open" -Recurse -ErrorAction SilentlyContinue
|
||||
}
|
||||
@@ -3590,7 +3407,7 @@ Function DisableAudio {
|
||||
|
||||
|
||||
##########
|
||||
#region Unpinning
|
||||
#region Irreversible Tweaks
|
||||
##########
|
||||
|
||||
# Unpin all Start Menu tiles - Note: This function has no counterpart. You have to pin the tiles back manually.
|
||||
@@ -3617,8 +3434,28 @@ Function UnpinTaskbarIcons {
|
||||
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -Name "FavoritesResolve" -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# Uninstall default Microsoft applications for all users - Note: This function has no counterpart.
|
||||
Function UninstallMsftBloatAllUsers {
|
||||
UninstallMsftBloat -AllUsers
|
||||
}
|
||||
|
||||
# Uninstall default third party applications for all users - Note: This function has no counterpart.
|
||||
Function UninstallThirdPartyBloatAllUsers {
|
||||
UninstallThirdPartyBloat -AllUsers
|
||||
}
|
||||
|
||||
# Uninstall Windows Store for all users - Note: This function has no counterpart.
|
||||
Function UninstallWindowsStoreAllUsers {
|
||||
UninstallWindowsStore -AllUsers
|
||||
}
|
||||
|
||||
# Disable Xbox features for all users - Note: This function has no counterpart. Not applicable to Server
|
||||
Function DisableXboxFeatures {
|
||||
DisableXboxFeatures -AllUsers
|
||||
}
|
||||
|
||||
##########
|
||||
#endregion Unpinning
|
||||
#endregion Irreversible Tweaks
|
||||
##########
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user