|
|
|
|
@@ -1,7 +1,7 @@
|
|
|
|
|
##########
|
|
|
|
|
# Win10 / WinServer2016 Initial Setup Script
|
|
|
|
|
# Author: Disassembler <disassembler@dasm.cz>
|
|
|
|
|
# Version: v2.10, 2017-11-09
|
|
|
|
|
# Version: v2.11, 2017-12-27
|
|
|
|
|
# Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
|
|
|
|
|
##########
|
|
|
|
|
|
|
|
|
|
@@ -36,9 +36,11 @@ $tweaks = @(
|
|
|
|
|
# "DisableSMB1", # "EnableSMB1",
|
|
|
|
|
"SetCurrentNetworkPrivate", # "SetCurrentNetworkPublic",
|
|
|
|
|
# "SetUnknownNetworksPrivate", # "SetUnknownNetworksPublic",
|
|
|
|
|
# "DisableNetDevicesAutoInst", # "EnableNetDevicesAutoInst",
|
|
|
|
|
"EnableCtrldFolderAccess", # "DisableCtrldFolderAccess",
|
|
|
|
|
# "DisableFirewall", # "EnableFirewall",
|
|
|
|
|
# "DisableDefender", # "EnableDefender",
|
|
|
|
|
# "DisableDefenderCloud", # "EnableDefenderCloud",
|
|
|
|
|
# "DisableUpdateMSRT", # "EnableUpdateMSRT",
|
|
|
|
|
# "DisableUpdateDriver", # "EnableUpdateDriver",
|
|
|
|
|
"DisableUpdateRestart", # "EnableUpdateRestart",
|
|
|
|
|
@@ -54,6 +56,8 @@ $tweaks = @(
|
|
|
|
|
# "DisableIndexing", # "EnableIndexing",
|
|
|
|
|
# "SetBIOSTimeUTC", # "SetBIOSTimeLocal",
|
|
|
|
|
# "EnableHibernation", # "DisableHibernation",
|
|
|
|
|
# "DisableSleepButton", # "EnableSleepButton",
|
|
|
|
|
# "DisableSleepTimeout", # "EnableSleepTimeout",
|
|
|
|
|
# "DisableFastStartup", # "EnableFastStartup",
|
|
|
|
|
|
|
|
|
|
### UI Tweaks ###
|
|
|
|
|
@@ -80,12 +84,20 @@ $tweaks = @(
|
|
|
|
|
"ShowThisPCOnDesktop", # "HideThisPCFromDesktop",
|
|
|
|
|
# "ShowUserFolderOnDesktop", # "HideUserFolderFromDesktop",
|
|
|
|
|
"HideDesktopFromThisPC", # "ShowDesktopInThisPC",
|
|
|
|
|
# "HideDesktopFromExplorer", # "ShowDesktopInExplorer",
|
|
|
|
|
"HideDocumentsFromThisPC", # "ShowDocumentsInThisPC",
|
|
|
|
|
# "HideDocumentsFromExplorer", # "ShowDocumentsInExplorer",
|
|
|
|
|
"HideDownloadsFromThisPC", # "ShowDownloadsInThisPC",
|
|
|
|
|
# "HideDownloadsFromExplorer", # "ShowDownloadsInExplorer",
|
|
|
|
|
"HideMusicFromThisPC", # "ShowMusicInThisPC",
|
|
|
|
|
# "HideMusicFromExplorer", # "ShowMusicInExplorer",
|
|
|
|
|
"HidePicturesFromThisPC", # "ShowPicturesInThisPC",
|
|
|
|
|
# "HidePicturesFromExplorer", # "ShowPicturesInExplorer",
|
|
|
|
|
"HideVideosFromThisPC", # "ShowVideosInThisPC",
|
|
|
|
|
# "HideVideosFromExplorer", # "ShowVideosInExplorer",
|
|
|
|
|
"Hide3DObjectsFromThisPC", # "Show3DObjectsInThisPC",
|
|
|
|
|
# "Hide3DObjectsFromExplorer", # "Show3DObjectsInExplorer",
|
|
|
|
|
# "SetControlPanelViewIcons", # "SetControlPanelViewCategories",
|
|
|
|
|
"SetVisualFXPerformance", # "SetVisualFXAppearance",
|
|
|
|
|
# "DisableThumbnails", # "EnableThumbnails",
|
|
|
|
|
"DisableThumbsDB", # "EnableThumbsDB",
|
|
|
|
|
@@ -153,6 +165,11 @@ Function DisableWiFiSense {
|
|
|
|
|
}
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Name "Value" -Type DWord -Value 0
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config" -Name "AutoConnectAllowedOEM" -Type Dword -Value 0
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config" -Name "WiFISenseAllowed" -Type Dword -Value 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Enable Wi-Fi Sense
|
|
|
|
|
@@ -163,6 +180,8 @@ Function EnableWiFiSense {
|
|
|
|
|
}
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Name "Value" -Type DWord -Value 1
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Disable SmartScreen Filter
|
|
|
|
|
@@ -236,19 +255,25 @@ Function EnableAppSuggestions {
|
|
|
|
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -ErrorAction SilentlyContinue
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Disable Background application access - Ie. if apps can download or update even when they aren't used
|
|
|
|
|
# Disable Background application access - ie. if apps can download or update when they aren't used - Cortana is excluded as its inclusion breaks start menu search
|
|
|
|
|
Function DisableBackgroundApps {
|
|
|
|
|
Write-Host "Disabling Background application access..."
|
|
|
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Name "GlobalUserDisabled" -Type DWord -Value 1
|
|
|
|
|
Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Exclude "Microsoft.Windows.Cortana*" | ForEach-Object {
|
|
|
|
|
Set-ItemProperty -Path $_.PsPath -Name "Disabled" -Type DWord -Value 1
|
|
|
|
|
Set-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -Type DWord -Value 1
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Enable Background application access
|
|
|
|
|
Function EnableBackgroundApps {
|
|
|
|
|
Write-Host "Enabling Background application access..."
|
|
|
|
|
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Name "GlobalUserDisabled" -ErrorAction SilentlyContinue
|
|
|
|
|
Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" | ForEach-Object {
|
|
|
|
|
Remove-ItemProperty -Path $_.PsPath -Name "Disabled" -ErrorAction SilentlyContinue
|
|
|
|
|
Remove-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -ErrorAction SilentlyContinue
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Disable Lock screen Spotlight - New backgrounds, tips, advertisements etc.
|
|
|
|
|
# Disable Lock screen Spotlight - New backgrounds, tips, adveradvertisements etc.
|
|
|
|
|
Function DisableLockScreenSpotlight {
|
|
|
|
|
Write-Host "Disabling Lock screen spotlight..."
|
|
|
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "RotatingLockScreenEnabled" -Type DWord -Value 0
|
|
|
|
|
@@ -322,6 +347,9 @@ Function DisableAdvertisingID {
|
|
|
|
|
Function EnableAdvertisingID {
|
|
|
|
|
Write-Host "Enabling Advertising ID..."
|
|
|
|
|
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" -Name "Enabled" -ErrorAction SilentlyContinue
|
|
|
|
|
If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Privacy")) {
|
|
|
|
|
New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Privacy" | Out-Null
|
|
|
|
|
}
|
|
|
|
|
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Privacy" -Name "TailoredExperiencesWithDiagnosticDataEnabled" -Type DWord -Value 2
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -521,6 +549,21 @@ Function SetUnknownNetworksPublic {
|
|
|
|
|
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-Host "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-Host "Enabling automatic installation of network devices..."
|
|
|
|
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\NcdAutoSetup\Private" -Name "AutoSetup" -ErrorAction SilentlyContinue
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Enable Controlled Folder Access (Defender Exploit Guard feature) - Not applicable to Server
|
|
|
|
|
Function EnableCtrldFolderAccess {
|
|
|
|
|
Write-Host "Enabling Controlled Folder Access..."
|
|
|
|
|
@@ -565,6 +608,23 @@ Function EnableDefender {
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "SecurityHealth" -Type ExpandString -Value "`"%ProgramFiles%\Windows Defender\MSASCuiL.exe`""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Disable Windows Defender Cloud
|
|
|
|
|
Function DisableDefenderCloud {
|
|
|
|
|
Write-Host "Disabling Windows Defender Cloud..."
|
|
|
|
|
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet")) {
|
|
|
|
|
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Force | Out-Null
|
|
|
|
|
}
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Name "SpynetReporting" -Type DWord -Value 0
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Name "SubmitSamplesConsent" -Type DWord -Value 2
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Enable Windows Defender Cloud
|
|
|
|
|
Function EnableDefenderCloud {
|
|
|
|
|
Write-Host "Enabling Windows Defender Cloud..."
|
|
|
|
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Name "SpynetReporting" -ErrorAction SilentlyContinue
|
|
|
|
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Name "SubmitSamplesConsent" -ErrorAction SilentlyContinue
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Disable offering of Malicious Software Removal Tool through Windows Update
|
|
|
|
|
Function DisableUpdateMSRT {
|
|
|
|
|
Write-Host "Disabling Malicious Software Removal Tool offering..."
|
|
|
|
|
@@ -781,6 +841,46 @@ Function DisableHibernation {
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" -Name "ShowHibernateOption" -Type Dword -Value 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Disable Sleep start menu and keyboard button
|
|
|
|
|
Function DisableSleepButton {
|
|
|
|
|
Write-Host "Disabling Sleep start menu and keyboard button..."
|
|
|
|
|
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings")) {
|
|
|
|
|
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" | Out-Null
|
|
|
|
|
}
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" -Name "ShowSleepOption" -Type Dword -Value 0
|
|
|
|
|
powercfg /SETACVALUEINDEX SCHEME_CURRENT SUB_BUTTONS SBUTTONACTION 0
|
|
|
|
|
powercfg /SETDCVALUEINDEX SCHEME_CURRENT SUB_BUTTONS SBUTTONACTION 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Enable Sleep start menu and keyboard button
|
|
|
|
|
Function EnableSleepButton {
|
|
|
|
|
Write-Host "Enabling Sleep start menu and keyboard button..."
|
|
|
|
|
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings")) {
|
|
|
|
|
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" | Out-Null
|
|
|
|
|
}
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" -Name "ShowSleepOption" -Type Dword -Value 1
|
|
|
|
|
powercfg /SETACVALUEINDEX SCHEME_CURRENT SUB_BUTTONS SBUTTONACTION 1
|
|
|
|
|
powercfg /SETDCVALUEINDEX SCHEME_CURRENT SUB_BUTTONS SBUTTONACTION 1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Disable display and sleep mode timeouts
|
|
|
|
|
Function DisableSleepTimeout {
|
|
|
|
|
Write-Host "Disabling display and sleep mode timeouts..."
|
|
|
|
|
powercfg /X monitor-timeout-ac 0
|
|
|
|
|
powercfg /X monitor-timeout-dc 0
|
|
|
|
|
powercfg /X standby-timeout-ac 0
|
|
|
|
|
powercfg /X standby-timeout-dc 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Enable display and sleep mode timeouts
|
|
|
|
|
Function EnableSleepTimeout {
|
|
|
|
|
Write-Host "Enabling display and sleep mode timeouts..."
|
|
|
|
|
powercfg /X monitor-timeout-ac 10
|
|
|
|
|
powercfg /X monitor-timeout-dc 5
|
|
|
|
|
powercfg /X standby-timeout-ac 30
|
|
|
|
|
powercfg /X standby-timeout-dc 15
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Disable Fast Startup
|
|
|
|
|
Function DisableFastStartup {
|
|
|
|
|
Write-Host "Disabling Fast Startup..."
|
|
|
|
|
@@ -1125,7 +1225,7 @@ Function HideUserFolderFromDesktop {
|
|
|
|
|
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{59031a47-3f72-44a7-89c5-5595fe6b30ee}" -ErrorAction SilentlyContinue
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide Desktop icon from This PC
|
|
|
|
|
# Hide Desktop icon from This PC - The icon remains in personal folders and open/save dialogs
|
|
|
|
|
Function HideDesktopFromThisPC {
|
|
|
|
|
Write-Host "Hiding Desktop icon from This PC..."
|
|
|
|
|
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" -Recurse -ErrorAction SilentlyContinue
|
|
|
|
|
@@ -1139,7 +1239,21 @@ Function ShowDesktopInThisPC {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide Documents icon from This PC
|
|
|
|
|
# Hide Desktop icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs
|
|
|
|
|
Function HideDesktopFromExplorer {
|
|
|
|
|
Write-Host "Hiding Desktop icon from Explorer namespace..."
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Show Desktop icon in Explorer namespace
|
|
|
|
|
Function ShowDesktopInExplorer {
|
|
|
|
|
Write-Host "Showing Desktop icon in Explorer namespace..."
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show"
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide Documents icon from This PC - The icon remains in personal folders and open/save dialogs
|
|
|
|
|
Function HideDocumentsFromThisPC {
|
|
|
|
|
Write-Host "Hiding Documents icon from This PC..."
|
|
|
|
|
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}" -Recurse -ErrorAction SilentlyContinue
|
|
|
|
|
@@ -1157,7 +1271,21 @@ Function ShowDocumentsInThisPC {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide Downloads icon from This PC
|
|
|
|
|
# Hide Documents icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs
|
|
|
|
|
Function HideDocumentsFromExplorer {
|
|
|
|
|
Write-Host "Hiding Documents icon from Explorer namespace..."
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Show Documents icon in Explorer namespace
|
|
|
|
|
Function ShowDocumentsInExplorer {
|
|
|
|
|
Write-Host "Showing Documents icon in Explorer namespace..."
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show"
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide Downloads icon from This PC - The icon remains in personal folders and open/save dialogs
|
|
|
|
|
Function HideDownloadsFromThisPC {
|
|
|
|
|
Write-Host "Hiding Downloads icon from This PC..."
|
|
|
|
|
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}" -Recurse -ErrorAction SilentlyContinue
|
|
|
|
|
@@ -1175,7 +1303,21 @@ Function ShowDownloadsInThisPC {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide Music icon from This PC
|
|
|
|
|
# Hide Downloads icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs
|
|
|
|
|
Function HideDownloadsFromExplorer {
|
|
|
|
|
Write-Host "Hiding Downloads icon from Explorer namespace..."
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Show Downloads icon in Explorer namespace
|
|
|
|
|
Function ShowDownloadsInExplorer {
|
|
|
|
|
Write-Host "Showing Downloads icon in Explorer namespace..."
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show"
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide Music icon from This PC - The icon remains in personal folders and open/save dialogs
|
|
|
|
|
Function HideMusicFromThisPC {
|
|
|
|
|
Write-Host "Hiding Music icon from This PC..."
|
|
|
|
|
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}" -Recurse -ErrorAction SilentlyContinue
|
|
|
|
|
@@ -1193,7 +1335,21 @@ Function ShowMusicInThisPC {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide Pictures icon from This PC
|
|
|
|
|
# Hide Music icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs
|
|
|
|
|
Function HideMusicFromExplorer {
|
|
|
|
|
Write-Host "Hiding Music icon from Explorer namespace..."
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Show Music icon in Explorer namespace
|
|
|
|
|
Function ShowMusicInExplorer {
|
|
|
|
|
Write-Host "Showing Music icon in Explorer namespace..."
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show"
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide Pictures icon from This PC - The icon remains in personal folders and open/save dialogs
|
|
|
|
|
Function HidePicturesFromThisPC {
|
|
|
|
|
Write-Host "Hiding Pictures icon from This PC..."
|
|
|
|
|
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}" -Recurse -ErrorAction SilentlyContinue
|
|
|
|
|
@@ -1211,7 +1367,21 @@ Function ShowPicturesInThisPC {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide Videos icon from This PC
|
|
|
|
|
# Hide Pictures icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs
|
|
|
|
|
Function HidePicturesFromExplorer {
|
|
|
|
|
Write-Host "Hiding Pictures icon from Explorer namespace..."
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Show Pictures icon in Explorer namespace
|
|
|
|
|
Function ShowPicturesInExplorer {
|
|
|
|
|
Write-Host "Showing Pictures icon in Explorer namespace..."
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show"
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide Videos icon from This PC - The icon remains in personal folders and open/save dialogs
|
|
|
|
|
Function HideVideosFromThisPC {
|
|
|
|
|
Write-Host "Hiding Videos icon from This PC..."
|
|
|
|
|
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}" -Recurse -ErrorAction SilentlyContinue
|
|
|
|
|
@@ -1229,7 +1399,21 @@ Function ShowVideosInThisPC {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide 3D Objects icon from This PC
|
|
|
|
|
# Hide Videos icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs
|
|
|
|
|
Function HideVideosFromExplorer {
|
|
|
|
|
Write-Host "Hiding Videos icon from Explorer namespace..."
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Show Videos icon in Explorer namespace
|
|
|
|
|
Function ShowVideosInExplorer {
|
|
|
|
|
Write-Host "Showing Videos icon in Explorer namespace..."
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show"
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Show"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide 3D Objects icon from This PC - The icon remains in personal folders and open/save dialogs
|
|
|
|
|
Function Hide3DObjectsFromThisPC {
|
|
|
|
|
Write-Host "Hiding 3D Objects icon from This PC..."
|
|
|
|
|
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" -Recurse -ErrorAction SilentlyContinue
|
|
|
|
|
@@ -1243,6 +1427,38 @@ Function Show3DObjectsInThisPC {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Hide 3D Objects icon from Explorer namespace - Hides the icon also from personal folders and open/save dialogs
|
|
|
|
|
Function Hide3DObjectsFromExplorer {
|
|
|
|
|
Write-Host "Hiding 3D Objects icon from Explorer namespace..."
|
|
|
|
|
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag")) {
|
|
|
|
|
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag" -Force | Out-Null
|
|
|
|
|
}
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
If (!(Test-Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag")) {
|
|
|
|
|
New-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag" -Force | Out-Null
|
|
|
|
|
}
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag" -Name "ThisPCPolicy" -Type String -Value "Hide"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Show 3D Objects icon in Explorer namespace
|
|
|
|
|
Function Show3DObjectsInExplorer {
|
|
|
|
|
Write-Host "Showing 3D Objects icon in Explorer namespace..."
|
|
|
|
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag" -Name "ThisPCPolicy" -ErrorAction SilentlyContinue
|
|
|
|
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag" -Name "ThisPCPolicy" -ErrorAction SilentlyContinue
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Set Control Panel view to icons (Classic) - Note: May trigger antimalware
|
|
|
|
|
Function SetControlPanelViewIcons {
|
|
|
|
|
Write-Host "Setting Control Panel view to icons..."
|
|
|
|
|
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "ForceClassicControlPanel" -Type DWord -Value 1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Set Control Panel view to categories
|
|
|
|
|
Function SetControlPanelViewCategories {
|
|
|
|
|
Write-Host "Setting Control Panel view to categories..."
|
|
|
|
|
Remove-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "ForceClassicControlPanel" -ErrorAction SilentlyContinue
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Adjusts visual effects for performance - Disables animations, transparency etc. but leaves font smoothing and miniatures enabled
|
|
|
|
|
Function SetVisualFXPerformance {
|
|
|
|
|
Write-Host "Adjusting visual effects for performance..."
|
|
|
|
|
@@ -1503,6 +1719,8 @@ function UninstallThirdPartyBloat {
|
|
|
|
|
Get-AppxPackage "king.com.BubbleWitch3Saga" | Remove-AppxPackage
|
|
|
|
|
Get-AppxPackage "89006A2E.AutodeskSketchBook" | Remove-AppxPackage
|
|
|
|
|
Get-AppxPackage "CAF9E577.Plex" | Remove-AppxPackage
|
|
|
|
|
Get-AppxPackage "A278AB0D.DisneyMagicKingdoms" | Remove-AppxPackage
|
|
|
|
|
Get-AppxPackage "828B5831.HiddenCityMysteryofShadows" | Remove-AppxPackage
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Install default third party applications
|
|
|
|
|
@@ -1525,6 +1743,8 @@ Function InstallThirdPartyBloat {
|
|
|
|
|
Get-AppxPackage -AllUsers "king.com.BubbleWitch3Saga" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
|
|
|
|
Get-AppxPackage -AllUsers "89006A2E.AutodeskSketchBook" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
|
|
|
|
Get-AppxPackage -AllUsers "CAF9E577.Plex" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
|
|
|
|
Get-AppxPackage -AllUsers "A278AB0D.DisneyMagicKingdoms" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
|
|
|
|
Get-AppxPackage -AllUsers "828B5831.HiddenCityMysteryofShadows" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Uninstall Windows Store
|
|
|
|
|
|