Skip to content

Instantly share code, notes, and snippets.

@LongJohnCoder
Forked from alirobe/reclaimWindows10.ps1
Created June 1, 2021 14:09
Show Gist options
  • Save LongJohnCoder/9fd6db2d770bfc2f42a9366097f1df71 to your computer and use it in GitHub Desktop.
Save LongJohnCoder/9fd6db2d770bfc2f42a9366097f1df71 to your computer and use it in GitHub Desktop.

Revisions

  1. @alirobe alirobe revised this gist Sep 21, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ $tweaks = @(
    "DisableFeedback", # "EnableFeedback",
    "DisableTailoredExperiences", # "EnableTailoredExperiences",
    "DisableAdvertisingID", # "EnableAdvertisingID",
    #"DisableCortana", # "EnableCortana",
    "DisableCortana", # "EnableCortana",
    "DisableErrorReporting", # "EnableErrorReporting",
    "SetP2PUpdateLocal", # "SetP2PUpdateInternet",
    "DisableDiagTrack", # "EnableDiagTrack",
  2. @alirobe alirobe revised this gist Sep 13, 2018. No changes.
  3. @alirobe alirobe revised this gist Sep 13, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ $tweaks = @(
    "DisableFeedback", # "EnableFeedback",
    "DisableTailoredExperiences", # "EnableTailoredExperiences",
    "DisableAdvertisingID", # "EnableAdvertisingID",
    "DisableCortana", # "EnableCortana",
    #"DisableCortana", # "EnableCortana",
    "DisableErrorReporting", # "EnableErrorReporting",
    "SetP2PUpdateLocal", # "SetP2PUpdateInternet",
    "DisableDiagTrack", # "EnableDiagTrack",
  4. @alirobe alirobe revised this gist Sep 13, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ $tweaks = @(
    "DisableFeedback", # "EnableFeedback",
    "DisableTailoredExperiences", # "EnableTailoredExperiences",
    "DisableAdvertisingID", # "EnableAdvertisingID",
    #"DisableCortana", # "EnableCortana",
    "DisableCortana", # "EnableCortana",
    "DisableErrorReporting", # "EnableErrorReporting",
    "SetP2PUpdateLocal", # "SetP2PUpdateInternet",
    "DisableDiagTrack", # "EnableDiagTrack",
  5. @alirobe alirobe revised this gist Sep 13, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -159,8 +159,8 @@ $tweaks = @(
    # "EnableAudio", # "DisableAudio",

    ### Unpinning ###
    # "UnpinStartMenuTiles",
    # "UnpinTaskbarIcons",
    "UnpinStartMenuTiles",
    #"UnpinTaskbarIcons",

    ### Auxiliary Functions ###
    "WaitForKey"
  6. @alirobe alirobe revised this gist Sep 13, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -164,7 +164,7 @@ $tweaks = @(

    ### Auxiliary Functions ###
    "WaitForKey"
    #"Restart"
    "Restart"
    )


  7. @alirobe alirobe revised this gist Sep 13, 2018. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    # Tweaked Win10 Initial Setup Script
    # Primary Author: Disassembler <[email protected]>
    # Modified by: alirobe <[email protected]> based on my personal preferences.
    # Version: 2.20.1, 2018-07-23
    # Version: 2.20.2, 2018-09-14
    # Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
    # Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
    # Tweak difference:
    @@ -56,7 +56,7 @@ $tweaks = @(
    # "DisableDefender", # "EnableDefender",
    # "DisableDefenderCloud", # "EnableDefenderCloud",
    "EnableF8BootMenu", # "DisableF8BootMenu",
    "SetDEPOptOut", # "SetDEPOptIn",
    #"SetDEPOptOut", # "SetDEPOptIn",
    # "EnableCIMemoryIntegrity", # "DisableCIMemoryIntegrity",
    #"DisableScriptHost", # "EnableScriptHost",
    #"EnableDotNetStrongCrypto", # "DisableDotNetStrongCrypto",
    @@ -66,7 +66,7 @@ $tweaks = @(
    # "DisableUpdateMSRT", # "EnableUpdateMSRT",
    # "DisableUpdateDriver", # "EnableUpdateDriver",
    "DisableUpdateRestart", # "EnableUpdateRestart",
    # "DisableHomeGroups", # "EnableHomeGroups",
    "DisableHomeGroups", # "EnableHomeGroups",
    # "DisableSharedExperiences", # "EnableSharedExperiences",
    # "DisableRemoteAssistance", # "EnableRemoteAssistance",
    # "EnableRemoteDesktop", # "DisableRemoteDesktop",
  8. @alirobe alirobe revised this gist Aug 13, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -163,7 +163,7 @@ $tweaks = @(
    # "UnpinTaskbarIcons",

    ### Auxiliary Functions ###
    "WaitForKey",
    "WaitForKey"
    #"Restart"
    )

  9. @alirobe alirobe revised this gist Jul 23, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ $tweaks = @(
    "DisableFeedback", # "EnableFeedback",
    "DisableTailoredExperiences", # "EnableTailoredExperiences",
    "DisableAdvertisingID", # "EnableAdvertisingID",
    "DisableCortana", # "EnableCortana",
    #"DisableCortana", # "EnableCortana",
    "DisableErrorReporting", # "EnableErrorReporting",
    "SetP2PUpdateLocal", # "SetP2PUpdateInternet",
    "DisableDiagTrack", # "EnableDiagTrack",
  10. @alirobe alirobe revised this gist Jul 23, 2018. 1 changed file with 818 additions and 590 deletions.
    1,408 changes: 818 additions & 590 deletions reclaimWindows10.ps1
    818 additions, 590 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
  11. @alirobe alirobe revised this gist Jun 20, 2018. No changes.
  12. @alirobe alirobe revised this gist Mar 16, 2018. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@
    # Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
    # Tweak difference:
    #
    # @alirobe's version is a subset focused on safely disabling telemetry, 'smart' features, and 3rd party bloat ...
    # @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
    # ... while retaining win10 defaults + security features. Aim to be suitable for end-user rollout.
    #
    # If you're a power user looking to tweak your machinea, or doing larger roll-out..
    @@ -27,12 +27,12 @@ $tweaks = @(
    "DisableTelemetry", # "EnableTelemetry",
    "DisableWiFiSense", # "EnableWiFiSense",
    # "DisableSmartScreen", # "EnableSmartScreen",
    "DisableWebSearch", # "EnableWebSearch",
    # "DisableWebSearch", # "EnableWebSearch",
    "DisableAppSuggestions", # "EnableAppSuggestions",
    "DisableBackgroundApps", # "EnableBackgroundApps",
    "DisableLockScreenSpotlight", # "EnableLockScreenSpotlight",
    "DisableLocationTracking", # "EnableLocationTracking",
    "DisableMapUpdates", # "EnableMapUpdates",
    # "DisableBackgroundApps", # "EnableBackgroundApps",
    # "DisableLockScreenSpotlight", # "EnableLockScreenSpotlight",
    # "DisableLocationTracking", # "EnableLocationTracking",
    # "DisableMapUpdates", # "EnableMapUpdates",
    "DisableFeedback", # "EnableFeedback",
    "DisableAdvertisingID", # "EnableAdvertisingID",
    "DisableCortana", # "EnableCortana",
    @@ -109,7 +109,7 @@ $tweaks = @(
    # "HideVideosFromThisPC", # "ShowVideosInThisPC",
    # "HideVideosFromExplorer", # "ShowVideosInExplorer",
    # "Hide3DObjectsFromThisPC", # "Show3DObjectsInThisPC",
    # "Hide3DObjectsFromExplorer", # "Show3DObjectsInExplorer",
    "Hide3DObjectsFromExplorer", # "Show3DObjectsInExplorer",
    # "SetVisualFXPerformance", # "SetVisualFXAppearance",
    # "DisableThumbnails", # "EnableThumbnails",
    # "DisableThumbsDB", # "EnableThumbsDB",
  13. @alirobe alirobe revised this gist Mar 16, 2018. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -84,11 +84,11 @@ $tweaks = @(
    "ShowFileOperationsDetails", # "HideFileOperationsDetails",
    # "EnableFileDeleteConfirm", # "DisableFileDeleteConfirm",
    "HideTaskbarSearchBox", # "ShowTaskbarSearchBox",
    # "HideTaskView", # "ShowTaskView",
    "HideTaskView", # "ShowTaskView",
    # "ShowSmallTaskbarIcons", # "ShowLargeTaskbarIcons",
    # "ShowTaskbarTitles", # "HideTaskbarTitles",
    # "HideTaskbarPeopleIcon", # "ShowTaskbarPeopleIcon",
    # "ShowTrayIcons", # "HideTrayIcons",
    "HideTaskbarPeopleIcon", # "ShowTaskbarPeopleIcon",
    "ShowTrayIcons", # "HideTrayIcons",
    "ShowKnownExtensions", # "HideKnownExtensions",
    # "ShowHiddenFiles", # "HideHiddenFiles",
    # "HideSyncNotifications" # "ShowSyncNotifications",
  14. @alirobe alirobe revised this gist Mar 16, 2018. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -48,7 +48,7 @@ $tweaks = @(
    # "DisableAdminShares", # "EnableAdminShares",
    "DisableSMB1", # "EnableSMB1",
    "SetCurrentNetworkPrivate", # "SetCurrentNetworkPublic",
    # "SetUnknownNetworksPrivate", # "SetUnknownNetworksPublic",
    # "SetUnknownNetworksPrivate", # "SetUnknownNetworksPublic",
    # "DisableNetDevicesAutoInst", # "EnableNetDevicesAutoInst",
    # "EnableCtrldFolderAccess", # "DisableCtrldFolderAccess",
    # "DisableFirewall", # "EnableFirewall",
    @@ -96,7 +96,7 @@ $tweaks = @(
    "SetExplorerThisPC", # "SetExplorerQuickAccess",
    "ShowThisPCOnDesktop", # "HideThisPCFromDesktop",
    # "ShowUserFolderOnDesktop", # "HideUserFolderFromDesktop",
    # "HideDesktopFromThisPC", # "ShowDesktopInThisPC",
    # "HideDesktopFromThisPC", # "ShowDesktopInThisPC",
    # "HideDesktopFromExplorer", # "ShowDesktopInExplorer",
    # "HideDocumentsFromThisPC", # "ShowDocumentsInThisPC",
    # "HideDocumentsFromExplorer", # "ShowDocumentsInExplorer",
    @@ -109,7 +109,7 @@ $tweaks = @(
    # "HideVideosFromThisPC", # "ShowVideosInThisPC",
    # "HideVideosFromExplorer", # "ShowVideosInExplorer",
    # "Hide3DObjectsFromThisPC", # "Show3DObjectsInThisPC",
    # "Hide3DObjectsFromExplorer", # "Show3DObjectsInExplorer",
    # "Hide3DObjectsFromExplorer", # "Show3DObjectsInExplorer",
    # "SetVisualFXPerformance", # "SetVisualFXAppearance",
    # "DisableThumbnails", # "EnableThumbnails",
    # "DisableThumbsDB", # "EnableThumbsDB",
    @@ -143,7 +143,7 @@ $tweaks = @(
    # "DisableCtrlAltDelLogin", # "EnableCtrlAltDelLogin",
    # "DisableIEEnhancedSecurity", # "EnableIEEnhancedSecurity",

    ### Unpinning ###
    ### Unpinning ###
    # "UnpinStartMenuTiles",
    # "UnpinTaskbarIcons",

  15. @alirobe alirobe revised this gist Mar 16, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    # Tweaked Win10 Initial Setup Script
    # Primary Author: Disassembler <[email protected]>
    # Modified by: alirobe <[email protected]> based on my personal preferences.
    # Version: 2.10.1, 2017-11-25
    # Version: 2.12.1, 2018-03-15
    # Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
    # Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
    # Tweak difference:
  16. @alirobe alirobe revised this gist Mar 16, 2018. 1 changed file with 309 additions and 30 deletions.
    339 changes: 309 additions & 30 deletions reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@
    # @alirobe's version is a subset focused on safely disabling telemetry, 'smart' features, and 3rd party bloat ...
    # ... while retaining win10 defaults + security features. Aim to be suitable for end-user rollout.
    #
    # If you're a power user looking to tweak your machine, or doing larger roll-out..
    # If you're a power user looking to tweak your machinea, or doing larger roll-out..
    # Use the @Disassembler0 script instead. It'll probably be more up-to-date than mine:
    # https://github.com/Disassembler0/Win10-Initial-Setup-Script
    #
    @@ -48,7 +48,8 @@ $tweaks = @(
    # "DisableAdminShares", # "EnableAdminShares",
    "DisableSMB1", # "EnableSMB1",
    "SetCurrentNetworkPrivate", # "SetCurrentNetworkPublic",
    # "SetUnknownNetworksPrivate", # "SetUnknownNetworksPublic",
    # "SetUnknownNetworksPrivate", # "SetUnknownNetworksPublic",
    # "DisableNetDevicesAutoInst", # "EnableNetDevicesAutoInst",
    # "EnableCtrldFolderAccess", # "DisableCtrldFolderAccess",
    # "DisableFirewall", # "EnableFirewall",
    # "DisableDefender", # "EnableDefender",
    @@ -68,6 +69,8 @@ $tweaks = @(
    # "DisableIndexing", # "EnableIndexing",
    # "SetBIOSTimeUTC", # "SetBIOSTimeLocal",
    # "EnableHibernation", # "DisableHibernation",
    # "DisableSleepButton", # "EnableSleepButton",
    # "DisableSleepTimeout", # "EnableSleepTimeout",
    # "DisableFastStartup", # "EnableFastStartup",

    ### UI Tweaks ###
    @@ -93,13 +96,20 @@ $tweaks = @(
    "SetExplorerThisPC", # "SetExplorerQuickAccess",
    "ShowThisPCOnDesktop", # "HideThisPCFromDesktop",
    # "ShowUserFolderOnDesktop", # "HideUserFolderFromDesktop",
    # "HideDesktopFromThisPC", # "ShowDesktopInThisPC",
    # "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",
    # "SetVisualFXPerformance", # "SetVisualFXAppearance",
    # "DisableThumbnails", # "EnableThumbnails",
    # "DisableThumbsDB", # "EnableThumbsDB",
    @@ -124,6 +134,7 @@ $tweaks = @(
    # "DisableNewAppPrompt", # "EnableNewAppPrompt",
    "EnableF8BootMenu", # "DisableF8BootMenu",
    # "SetDEPOptOut", # "SetDEPOptIn",
    # "EnableMeltdownCompatFlag" # "DisableMeltdownCompatFlag",

    ### Server Specific Tweaks ###
    # "HideServerManagerOnLogin", # "ShowServerManagerOnLogin",
    @@ -132,13 +143,18 @@ $tweaks = @(
    # "DisableCtrlAltDelLogin", # "EnableCtrlAltDelLogin",
    # "DisableIEEnhancedSecurity", # "EnableIEEnhancedSecurity",

    ### Unpinning ###
    # "UnpinStartMenuTiles",
    # "UnpinTaskbarIcons",

    ### Auxiliary Functions ###
    "WaitForKey" #,
    # "Restart"
    )




    ##########
    # Privacy Settings
    ##########
    @@ -149,6 +165,12 @@ Function DisableTelemetry {
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
    Disable-ScheduledTask -TaskName "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" | Out-Null
    Disable-ScheduledTask -TaskName "Microsoft\Windows\Application Experience\ProgramDataUpdater" | Out-Null
    Disable-ScheduledTask -TaskName "Microsoft\Windows\Autochk\Proxy" | Out-Null
    Disable-ScheduledTask -TaskName "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" | Out-Null
    Disable-ScheduledTask -TaskName "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" | Out-Null
    Disable-ScheduledTask -TaskName "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" | Out-Null
    }

    # Enable Telemetry
    @@ -157,6 +179,12 @@ Function EnableTelemetry {
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 3
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 3
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 3
    Enable-ScheduledTask -TaskName "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" | Out-Null
    Enable-ScheduledTask -TaskName "Microsoft\Windows\Application Experience\ProgramDataUpdater" | Out-Null
    Enable-ScheduledTask -TaskName "Microsoft\Windows\Autochk\Proxy" | Out-Null
    Enable-ScheduledTask -TaskName "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" | Out-Null
    Enable-ScheduledTask -TaskName "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" | Out-Null
    Enable-ScheduledTask -TaskName "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" | Out-Null
    }

    # Disable Wi-Fi Sense
    @@ -167,6 +195,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
    @@ -177,6 +210,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
    @@ -250,10 +285,10 @@ 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..."
    Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" | ForEach-Object {
    Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Exclude "Microsoft.Windows.Cortana*" | ForEach {
    Set-ItemProperty -Path $_.PsPath -Name "Disabled" -Type DWord -Value 1
    Set-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -Type DWord -Value 1
    }
    @@ -262,7 +297,7 @@ Function DisableBackgroundApps {
    # Enable Background application access
    Function EnableBackgroundApps {
    Write-Host "Enabling Background application access..."
    Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" | ForEach-Object {
    Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" | ForEach {
    Remove-ItemProperty -Path $_.PsPath -Name "Disabled" -ErrorAction SilentlyContinue
    Remove-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -ErrorAction SilentlyContinue
    }
    @@ -317,12 +352,16 @@ Function DisableFeedback {
    New-Item -Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" -Force | Out-Null
    }
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" -Name "NumberOfSIUFInPeriod" -Type DWord -Value 0
    Disable-ScheduledTask -TaskName "Microsoft\Windows\Feedback\Siuf\DmClient" -ErrorAction SilentlyContinue | Out-Null
    Disable-ScheduledTask -TaskName "Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload" -ErrorAction SilentlyContinue | Out-Null
    }

    # Enable Feedback
    Function EnableFeedback {
    Write-Host "Enabling Feedback..."
    Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" -Name "NumberOfSIUFInPeriod" -ErrorAction SilentlyContinue
    Enable-ScheduledTask -TaskName "Microsoft\Windows\Feedback\Siuf\DmClient" -ErrorAction SilentlyContinue | Out-Null
    Enable-ScheduledTask -TaskName "Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload" -ErrorAction SilentlyContinue | Out-Null
    }

    # Disable Advertising ID
    @@ -342,6 +381,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
    }

    @@ -384,12 +426,14 @@ Function EnableCortana {
    Function DisableErrorReporting {
    Write-Host "Disabling Error reporting..."
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "Disabled" -Type DWord -Value 1
    Disable-ScheduledTask -TaskName "Microsoft\Windows\Windows Error Reporting\QueueReporting" | Out-Null
    }

    # Enable Error reporting
    Function EnableErrorReporting {
    Write-Host "Enabling Error reporting..."
    Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "Disabled" -ErrorAction SilentlyContinue
    Enable-ScheduledTask -TaskName "Microsoft\Windows\Windows Error Reporting\QueueReporting" | Out-Null
    }

    # Restrict Windows Update P2P only to local network
    @@ -417,7 +461,7 @@ Function DisableAutoLogger {
    Write-Host "Removing AutoLogger file and restricting directory..."
    $autoLoggerDir = "$env:PROGRAMDATA\Microsoft\Diagnosis\ETLLogs\AutoLogger"
    If (Test-Path "$autoLoggerDir\AutoLogger-Diagtrack-Listener.etl") {
    Remove-Item "$autoLoggerDir\AutoLogger-Diagtrack-Listener.etl"
    Remove-Item -Path "$autoLoggerDir\AutoLogger-Diagtrack-Listener.etl"
    }
    icacls $autoLoggerDir /deny SYSTEM:`(OI`)`(CI`)F | Out-Null
    }
    @@ -541,6 +585,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..."
    @@ -587,19 +646,19 @@ Function EnableDefender {

    # 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
    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
    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
    @@ -736,25 +795,32 @@ Function EnableAutorun {
    # Enable Storage Sense - automatic disk cleanup - Not applicable to Server
    Function EnableStorageSense {
    Write-Host "Enabling Storage Sense..."
    If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy")) {
    New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Force | Out-Null
    }
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Name "01" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Name "04" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Name "08" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Name "32" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Name "StoragePoliciesNotified" -Type DWord -Value 1
    }

    # Disable Storage Sense - Not applicable to Server
    Function DisableStorageSense {
    Write-Host "Disabling Storage Sense..."
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Name "01" -Type DWord -Value 1
    Remove-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Recurse -ErrorAction SilentlyContinue
    }

    # Disable scheduled defragmentation task
    Function DisableDefragmentation {
    Write-Host "Disabling scheduled defragmentation..."
    Disable-ScheduledTask -TaskName "\Microsoft\Windows\Defrag\ScheduledDefrag" | Out-Null
    Disable-ScheduledTask -TaskName "Microsoft\Windows\Defrag\ScheduledDefrag" | Out-Null
    }

    # Enable scheduled defragmentation task
    Function EnableDefragmentation {
    Write-Host "Enabling scheduled defragmentation..."
    Enable-ScheduledTask -TaskName "\Microsoft\Windows\Defrag\ScheduledDefrag" | Out-Null
    Enable-ScheduledTask -TaskName "Microsoft\Windows\Defrag\ScheduledDefrag" | Out-Null
    }

    # Stop and disable Superfetch service - Not applicable to Server
    @@ -818,6 +884,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..."
    @@ -1162,7 +1268,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
    @@ -1176,7 +1282,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
    @@ -1194,7 +1314,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
    @@ -1212,7 +1346,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
    @@ -1230,7 +1378,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
    @@ -1248,7 +1410,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
    @@ -1266,7 +1442,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
    @@ -1280,6 +1470,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..."
    @@ -1413,10 +1635,10 @@ Function UninstallOneDrive {
    Start-Sleep -s 3
    Stop-Process -Name explorer -ErrorAction SilentlyContinue
    Start-Sleep -s 3
    Remove-Item "$env:USERPROFILE\OneDrive" -Force -Recurse -ErrorAction SilentlyContinue
    Remove-Item "$env:LOCALAPPDATA\Microsoft\OneDrive" -Force -Recurse -ErrorAction SilentlyContinue
    Remove-Item "$env:PROGRAMDATA\Microsoft OneDrive" -Force -Recurse -ErrorAction SilentlyContinue
    Remove-Item "$env:SYSTEMDRIVE\OneDriveTemp" -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
    }
    @@ -1540,6 +1762,14 @@ 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
    Get-AppxPackage "WinZipComputing.WinZipUniversal" | Remove-AppxPackage
    Get-AppxPackage "SpotifyAB.SpotifyMusic" | Remove-AppxPackage
    Get-AppxPackage "PandoraMediaInc.29680B314EFC2" | Remove-AppxPackage
    Get-AppxPackage "2414FC7A.Viber" | Remove-AppxPackage
    Get-AppxPackage "64885BlueEdge.OneCalendar" | Remove-AppxPackage
    Get-AppxPackage "41038Axilesoft.ACGMediaPlayer" | Remove-AppxPackage
    }

    # Install default third party applications
    @@ -1562,6 +1792,14 @@ 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"}
    Get-AppxPackage -AllUsers "WinZipComputing.WinZipUniversal" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "SpotifyAB.SpotifyMusic" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "PandoraMediaInc.29680B314EFC2" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "2414FC7A.Viber" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "64885BlueEdge.OneCalendar" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "41038Axilesoft.ACGMediaPlayer" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    }

    # Uninstall Windows Store
    @@ -1790,6 +2028,24 @@ Function SetDEPOptIn {
    bcdedit /set `{current`} nx OptIn | Out-Null
    }

    # Enable Meltdown (CVE-2017-5754) compatibility flag - Required for January 2018 and all subsequent Windows updates
    # This flag is normally automatically enabled by compatible antivirus software (such as Windows Defender).
    # Use the tweak only if you have confirmed that your AV is compatible but unable to set the flag automatically or if you don't use any AV at all.
    # See https://support.microsoft.com/en-us/help/4072699/january-3-2018-windows-security-updates-and-antivirus-software for details.
    Function EnableMeltdownCompatFlag {
    Write-Host "Enabling Meltdown (CVE-2017-5754) compatibility flag..."
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat" | Out-Null
    }
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat" -Name "cadca5fe-87d3-4b96-b7fb-a231484277cc" -Type DWord -Value 0
    }

    # Disable Meltdown (CVE-2017-5754) compatibility flag
    Function DisableMeltdownCompatFlag {
    Write-Host "Disabling Meltdown (CVE-2017-5754) compatibility flag..."
    Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat" -Name "cadca5fe-87d3-4b96-b7fb-a231484277cc" -ErrorAction SilentlyContinue
    }



    ##########
    @@ -1874,6 +2130,29 @@ Function EnableIEEnhancedSecurity {



    ##########
    # Unpinning
    ##########

    # Unpin all Start Menu tiles - Not applicable to Server - Note: This function has no counterpart. You have to pin the tiles back manually.
    Function UnpinStartMenuTiles {
    Write-Host "Unpinning all Start Menu tiles..."
    Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount" -Include "*.group" -Recurse | ForEach-Object {
    $data = (Get-ItemProperty -Path "$($_.PsPath)\Current" -Name "Data").Data -Join ","
    $data = $data.Substring(0, $data.IndexOf(",0,202,30") + 9) + ",0,202,80,0,0"
    Set-ItemProperty -Path "$($_.PsPath)\Current" -Name "Data" -Type Binary -Value $data.Split(",")
    }
    }

    # Unpin all Taskbar icons - Note: This function has no counterpart. You have to pin the icons back manually.
    Function UnpinTaskbarIcons {
    Write-Host "Unpinning all Taskbar icons..."
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -Name "Favorites" -Type Binary -Value ([byte[]](0xFF))
    Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -Name "FavoritesResolve" -ErrorAction SilentlyContinue
    }



    ##########
    # Auxiliary Functions
    ##########
  17. @alirobe alirobe revised this gist Nov 25, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -133,7 +133,7 @@ $tweaks = @(
    # "DisableIEEnhancedSecurity", # "EnableIEEnhancedSecurity",

    ### Auxiliary Functions ###
    "WaitForKey",
    "WaitForKey" #,
    # "Restart"
    )

  18. @alirobe alirobe revised this gist Nov 24, 2017. 1 changed file with 17 additions and 4 deletions.
    21 changes: 17 additions & 4 deletions reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,21 @@
    ##########
    # Win10 / WinServer2016 Initial Setup Script
    # Author: Disassembler <[email protected]>
    # Version: v2.10, 2017-11-09
    # Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
    # Tweaked Win10 Initial Setup Script
    # Primary Author: Disassembler <[email protected]>
    # Modified by: alirobe <[email protected]> based on my personal preferences.
    # Version: 2.10.1, 2017-11-25
    # Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
    # Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
    # Tweak difference:
    #
    # @alirobe's version is a subset focused on safely disabling telemetry, 'smart' features, and 3rd party bloat ...
    # ... while retaining win10 defaults + security features. Aim to be suitable for end-user rollout.
    #
    # If you're a power user looking to tweak your machine, or doing larger roll-out..
    # Use the @Disassembler0 script instead. It'll probably be more up-to-date than mine:
    # https://github.com/Disassembler0/Win10-Initial-Setup-Script
    #
    # Note from author: Never run scripts without reading them & understanding what they do.
    #
    ##########

    # Default preset
  19. @alirobe alirobe revised this gist Nov 24, 2017. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ $tweaks = @(
    ### Privacy Settings ###
    "DisableTelemetry", # "EnableTelemetry",
    "DisableWiFiSense", # "EnableWiFiSense",
    #"DisableSmartScreen", # "EnableSmartScreen",
    # "DisableSmartScreen", # "EnableSmartScreen",
    "DisableWebSearch", # "EnableWebSearch",
    "DisableAppSuggestions", # "EnableAppSuggestions",
    "DisableBackgroundApps", # "EnableBackgroundApps",
    @@ -32,8 +32,8 @@ $tweaks = @(
    ### Service Tweaks ###
    # "SetUACLow", # "SetUACHigh",
    # "EnableSharingMappedDrives", # "DisableSharingMappedDrives",
    "DisableAdminShares", # "EnableAdminShares",
    "DisableSMB1", # "EnableSMB1",
    # "DisableAdminShares", # "EnableAdminShares",
    "DisableSMB1", # "EnableSMB1",
    "SetCurrentNetworkPrivate", # "SetCurrentNetworkPublic",
    # "SetUnknownNetworksPrivate", # "SetUnknownNetworksPublic",
    # "EnableCtrldFolderAccess", # "DisableCtrldFolderAccess",
    @@ -44,7 +44,7 @@ $tweaks = @(
    # "DisableUpdateDriver", # "EnableUpdateDriver",
    "DisableUpdateRestart", # "EnableUpdateRestart",
    "DisableHomeGroups", # "EnableHomeGroups",
    "DisableSharedExperiences", # "EnableSharedExperiences",
    # "DisableSharedExperiences", # "EnableSharedExperiences",
    # "DisableRemoteAssistance", # "EnableRemoteAssistance",
    # "EnableRemoteDesktop", # "DisableRemoteDesktop",
    "DisableAutoplay", # "EnableAutoplay",
  20. @alirobe alirobe revised this gist Nov 24, 2017. 1 changed file with 452 additions and 102 deletions.
    554 changes: 452 additions & 102 deletions reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -1,69 +1,73 @@
    ##########
    # Tweaked Win10 Initial Setup Script
    # Primary Author: Disassembler <[email protected]>
    # Modified by: alirobe <[email protected]> based on my personal preferences.
    # Version: 2.6.1, 2017-08-02
    # Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
    # Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
    # Tweak difference:
    #
    # @alirobe's version is a subset focused on safely disabling telemetry, 'smart' features, and 3rd party bloat ...
    # ... while retaining win10 defaults + security features. Aim to be suitable for end-user rollout.
    #
    # If you're a power user looking to tweak your machine, or doing larger roll-out..
    # Use the @Disassembler0 script instead. It'll probably be more up-to-date than mine:
    # https://github.com/Disassembler0/Win10-Initial-Setup-Script
    #
    # Note from author: Never run scripts without reading them & understanding what they do.
    #
    # Win10 / WinServer2016 Initial Setup Script
    # Author: Disassembler <[email protected]>
    # Version: v2.10, 2017-11-09
    # Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
    ##########

    # Default preset
    $tweaks = @(
    ### Require administrator privileges ###
    "RequireAdmin",

    ### Privacy Settings ###
    "DisableTelemetry", # "EnableTelemetry",
    "DisableWiFiSense", # "EnableWiFiSense",
    # "DisableSmartScreen", # "EnableSmartScreen",
    #"DisableSmartScreen", # "EnableSmartScreen",
    "DisableWebSearch", # "EnableWebSearch",
    "DisableStartSuggestions", # "EnableStartSuggestions",
    "DisableAppSuggestions", # "EnableAppSuggestions",
    "DisableBackgroundApps", # "EnableBackgroundApps",
    "DisableLockScreenSpotlight", # "EnableLockScreenSpotlight",
    "DisableLocationTracking", # "EnableLocationTracking",
    "DisableMapUpdates", # "EnableMapUpdates",
    "DisableFeedback", # "EnableFeedback",
    "DisableAdvertisingID", # "EnableAdvertisingID",
    "DisableCortana", # "EnableCortana",
    "DisableErrorReporting", # "EnableErrorReporting",
    "RestrictUpdateP2P", # "UnrestrictUpdateP2P",
    "SetP2PUpdateLocal", # "SetP2PUpdateInternet",
    "DisableAutoLogger", # "EnableAutoLogger",
    "DisableDiagTrack", # "EnableDiagTrack",
    "DisableWAPPush", # "EnableWAPPush",

    ### Service Tweaks ###
    # "LowerUAC", # "RaiseUAC",
    # "SetUACLow", # "SetUACHigh",
    # "EnableSharingMappedDrives", # "DisableSharingMappedDrives",
    # "DisableAdminShares", # "EnableAdminShares",
    "DisableSMB1", # "EnableSMB1",
    "DisableAdminShares", # "EnableAdminShares",
    "DisableSMB1", # "EnableSMB1",
    "SetCurrentNetworkPrivate", # "SetCurrentNetworkPublic",
    # "SetUnknownNetworksPrivate", # "SetUnknownNetworksPublic",
    # "EnableCtrldFolderAccess", # "DisableCtrldFolderAccess",
    # "DisableFirewall", # "EnableFirewall",
    # "DisableDefender", # "EnableDefender",
    # "DisableDefenderCloud", # "EnableDefenderCloud",
    # "DisableUpdateMSRT", # "EnableUpdateMSRT",
    # "DisableUpdateDriver", # "EnableUpdateDriver",
    "DisableUpdateRestart", # "EnableUpdateRestart",
    "DisableHomeGroups", # "EnableHomeGroups",
    "DisableSharedExperiences", # "EnableSharedExperiences",
    # "DisableRemoteAssistance", # "EnableRemoteAssistance",
    # "EnableRemoteDesktop", # "DisableRemoteDesktop",
    "DisableAutoplay", # "EnableAutoplay",
    "DisableAutorun", # "EnableAutorun",
    # "EnableStorageSense", # "DisableStorageSense",
    # "DisableDefragmentation", # "EnableDefragmentation",
    # "DisableSuperfetch", # "EnableSuperfetch",
    # "DisableIndexing", # "EnableIndexing",
    # "SetBIOSTimeUTC", # "SetBIOSTimeLocal",
    # "EnableHibernation", # "DisableHibernation",
    # "DisableFastStartup", # "EnableFastStartup",

    ### UI Tweaks ###
    # "DisableActionCenter", # "EnableActionCenter",
    # "DisableLockScreen", # "EnableLockScreen",
    # "DisableLockScreenRS1", # "EnableLockScreenRS1",
    # "DisableStickyKeys", # "EnableStickyKeys",
    # "ShowTaskManagerDetails" # "HideTaskManagerDetails",
    # "HideNetworkFromLockScreen", # "ShowNetworkOnLockScreen",
    # "HideShutdownFromLockScreen", # "ShowShutdownOnLockScreen",
    "DisableStickyKeys", # "EnableStickyKeys",
    "ShowTaskManagerDetails" # "HideTaskManagerDetails",
    "ShowFileOperationsDetails", # "HideFileOperationsDetails",
    # "HideTaskbarSearchBox", # "ShowTaskbarSearchBox",
    # "EnableFileDeleteConfirm", # "DisableFileDeleteConfirm",
    "HideTaskbarSearchBox", # "ShowTaskbarSearchBox",
    # "HideTaskView", # "ShowTaskView",
    # "ShowSmallTaskbarIcons", # "ShowLargeTaskbarIcons",
    # "ShowTaskbarTitles", # "HideTaskbarTitles",
    @@ -73,14 +77,19 @@ $tweaks = @(
    # "ShowHiddenFiles", # "HideHiddenFiles",
    # "HideSyncNotifications" # "ShowSyncNotifications",
    # "HideRecentShortcuts", # "ShowRecentShortcuts",
    "ExplorerThisPC", # "ExplorerQuickAccess",
    "SetExplorerThisPC", # "SetExplorerQuickAccess",
    "ShowThisPCOnDesktop", # "HideThisPCFromDesktop",
    # "ShowUserFolderOnDesktop", # "HideUserFolderFromDesktop",
    # "HideDesktopFromThisPC", # "ShowDesktopInThisPC",
    # "HideDocumentsFromThisPC", # "ShowDocumentsInThisPC",
    # "HideDownloadsFromThisPC", # "ShowDownloadsInThisPC",
    # "HideMusicFromThisPC", # "ShowMusicInThisPC",
    # "HidePicturesFromThisPC", # "ShowPicturesInThisPC",
    # "HideVideosFromThisPC", # "ShowVideosInThisPC",
    # "Hide3DObjectsFromThisPC", # "Show3DObjectsInThisPC",
    # "SetVisualFXPerformance", # "SetVisualFXAppearance",
    # "DisableThumbnails", # "EnableThumbnails",
    # "DisableThumbsDB", # "EnableThumbsDB",
    # "AddENKeyboard", # "RemoveENKeyboard",
    # "EnableNumlock", # "DisableNumlock",

    @@ -90,18 +99,18 @@ $tweaks = @(
    # "UninstallMsftBloat", # "InstallMsftBloat",
    "UninstallThirdPartyBloat", # "InstallThirdPartyBloat",
    # "UninstallWindowsStore", # "InstallWindowsStore",
    # "DisableConsumerApps", # "EnableConsumerApps",
    # "DisableXboxFeatures", # "EnableXboxFeatures",
    # "DisableAdobeFlash", # "EnableAdobeFlash",
    # "UninstallMediaPlayer", # "InstallMediaPlayer",
    # "UninstallWorkFolders", # "InstallWorkFolders",
    # "InstallLinuxSubsystem", # "UninstallLinuxSubsystem",
    # "InstallHyperV", # "UninstallHyperV",
    # "SetPhotoViewerAssociation", # "UnsetPhotoViewerAssociation",
    # "AddPhotoViewerOpenWith", # "RemovePhotoViewerOpenWith",
    "SetPhotoViewerAssociation", # "UnsetPhotoViewerAssociation",
    "AddPhotoViewerOpenWith", # "RemovePhotoViewerOpenWith",
    # "DisableSearchAppInStore", # "EnableSearchAppInStore",
    "DisableNewAppPrompt", # "EnableNewAppPrompt",
    # "DisableNewAppPrompt", # "EnableNewAppPrompt",
    "EnableF8BootMenu", # "DisableF8BootMenu",
    # "SetDEPOptOut", # "SetDEPOptIn",
    # "SetDEPOptOut", # "SetDEPOptIn",

    ### Server Specific Tweaks ###
    # "HideServerManagerOnLogin", # "ShowServerManagerOnLogin",
    @@ -111,9 +120,12 @@ $tweaks = @(
    # "DisableIEEnhancedSecurity", # "EnableIEEnhancedSecurity",

    ### Auxiliary Functions ###
    "WaitForKey" #,
    "WaitForKey",
    # "Restart"
    )



    ##########
    # Privacy Settings
    ##########
    @@ -147,6 +159,9 @@ Function DisableWiFiSense {
    # Enable Wi-Fi Sense
    Function EnableWiFiSense {
    Write-Host "Enabling Wi-Fi Sense..."
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Force | Out-Null
    }
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" -Name "Value" -Type DWord -Value 1
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" -Name "Value" -Type DWord -Value 1
    }
    @@ -191,18 +206,69 @@ Function EnableWebSearch {
    Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "DisableWebSearch" -ErrorAction SilentlyContinue
    }

    # Disable Start Menu suggestions
    Function DisableStartSuggestions {
    Write-Host "Disabling Start Menu suggestions..."
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SystemPaneSuggestionsEnabled" -Type DWord -Value 0
    # Disable Application suggestions and automatic installation
    Function DisableAppSuggestions {
    Write-Host "Disabling Application suggestions..."
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "ContentDeliveryAllowed" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "OemPreInstalledAppsEnabled" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEnabled" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEverEnabled" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SilentInstalledAppsEnabled" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338389Enabled" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SystemPaneSuggestionsEnabled" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338388Enabled" -Type DWord -Value 0
    If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent")) {
    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
    }

    # Enable Start Menu suggestions
    Function EnableStartSuggestions {
    Write-Host "Enabling Start Menu suggestions..."
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SystemPaneSuggestionsEnabled" -Type DWord -Value 1
    # Enable Application suggestions and automatic installation
    Function EnableAppSuggestions {
    Write-Host "Enabling Application suggestions..."
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "ContentDeliveryAllowed" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "OemPreInstalledAppsEnabled" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEnabled" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEverEnabled" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SilentInstalledAppsEnabled" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338389Enabled" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SystemPaneSuggestionsEnabled" -Type DWord -Value 1
    Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338388Enabled" -ErrorAction SilentlyContinue
    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
    Function DisableBackgroundApps {
    Write-Host "Disabling Background application access..."
    Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" | 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..."
    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.
    Function DisableLockScreenSpotlight {
    Write-Host "Disabling Lock screen spotlight..."
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "RotatingLockScreenEnabled" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "RotatingLockScreenOverlayEnabled" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338387Enabled" -Type DWord -Value 0
    }

    # Enable Lock screen Spotlight
    Function EnableLockScreenSpotlight {
    Write-Host "Disabling Lock screen spotlight..."
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "RotatingLockScreenEnabled" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "RotatingLockScreenOverlayEnabled" -Type DWord -Value 1
    Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338387Enabled" -ErrorAction SilentlyContinue
    }

    # Disable Location Tracking
    @@ -219,6 +285,18 @@ Function EnableLocationTracking {
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" -Name "Status" -Type DWord -Value 1
    }

    # Disable automatic Maps updates
    Function DisableMapUpdates {
    Write-Host "Disabling automatic Maps updates..."
    Set-ItemProperty -Path "HKLM:\SYSTEM\Maps" -Name "AutoUpdateEnabled" -Type DWord -Value 0
    }

    # Enable automatic Maps updates
    Function EnableMapUpdates {
    Write-Host "Enable automatic Maps updates..."
    Remove-ItemProperty -Path "HKLM:\SYSTEM\Maps" -Name "AutoUpdateEnabled" -ErrorAction SilentlyContinue
    }

    # Disable Feedback
    Function DisableFeedback {
    Write-Host "Disabling Feedback..."
    @@ -241,12 +319,17 @@ Function DisableAdvertisingID {
    New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" | Out-Null
    }
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" -Name "Enabled" -Type DWord -Value 0
    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 0
    }

    # Enable Advertising ID
    Function EnableAdvertisingID {
    Write-Host "Enabling Advertising ID..."
    Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" -Name "Enabled" -ErrorAction SilentlyContinue
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Privacy" -Name "TailoredExperiencesWithDiagnosticDataEnabled" -Type DWord -Value 2
    }

    # Disable Cortana
    @@ -275,6 +358,9 @@ Function DisableCortana {
    Function EnableCortana {
    Write-Host "Enabling Cortana..."
    Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Personalization\Settings" -Name "AcceptedPrivacyPolicy" -ErrorAction SilentlyContinue
    If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore")) {
    New-Item -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" -Force | Out-Null
    }
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization" -Name "RestrictImplicitTextCollection" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization" -Name "RestrictImplicitInkCollection" -Type DWord -Value 0
    Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" -Name "HarvestContacts" -ErrorAction SilentlyContinue
    @@ -294,7 +380,7 @@ Function EnableErrorReporting {
    }

    # Restrict Windows Update P2P only to local network
    Function RestrictUpdateP2P {
    Function SetP2PUpdateLocal {
    Write-Host "Restricting Windows Update P2P only to local network..."
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" | Out-Null
    @@ -307,7 +393,7 @@ Function RestrictUpdateP2P {
    }

    # Unrestrict Windows Update P2P
    Function UnrestrictUpdateP2P {
    Function SetP2PUpdateInternet {
    Write-Host "Unrestricting Windows Update P2P to internet..."
    Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -ErrorAction SilentlyContinue
    Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization" -Name "SystemSettingsDownloadMode" -ErrorAction SilentlyContinue
    @@ -365,15 +451,15 @@ Function EnableWAPPush {
    # Service Tweaks
    ##########

    # Lower UAC level
    Function LowerUAC {
    # Lower UAC level (disabling it completely would break apps)
    Function SetUACLow {
    Write-Host "Lowering UAC level..."
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Type DWord -Value 0
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "PromptOnSecureDesktop" -Type DWord -Value 0
    }

    # Raise UAC level
    Function RaiseUAC {
    Function SetUACHigh {
    Write-Host "Raising UAC level..."
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Type DWord -Value 5
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "PromptOnSecureDesktop" -Type DWord -Value 1
    @@ -403,13 +489,13 @@ Function EnableAdminShares {
    Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name "AutoShareWks" -ErrorAction SilentlyContinue
    }

    # Disable obsolete SMB 1.0 protocol
    # Disable obsolete SMB 1.0 protocol - Disabled by default since 1709
    Function DisableSMB1 {
    Write-Host "Disabling SMB 1.0 protocol..."
    Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force
    }

    # Enable obsolete SMB 1.0 protocol
    # Enable obsolete SMB 1.0 protocol - Disabled by default since 1709
    Function EnableSMB1 {
    Write-Host "Enabling SMB 1.0 protocol..."
    Set-SmbServerConfiguration -EnableSMB1Protocol $true -Force
    @@ -442,6 +528,18 @@ Function SetUnknownNetworksPublic {
    Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24" -Name "Category" -ErrorAction SilentlyContinue
    }

    # Enable Controlled Folder Access (Defender Exploit Guard feature) - Not applicable to Server
    Function EnableCtrldFolderAccess {
    Write-Host "Enabling Controlled Folder Access..."
    Set-MpPreference -EnableControlledFolderAccess Enabled
    }

    # Disable Controlled Folder Access (Defender Exploit Guard feature) - Not applicable to Server
    Function DisableCtrldFolderAccess {
    Write-Host "Disabling Controlled Folder Access..."
    Set-MpPreference -EnableControlledFolderAccess Disabled
    }

    # Disable Firewall
    Function DisableFirewall {
    Write-Host "Disabling Firewall..."
    @@ -474,6 +572,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..."
    @@ -509,18 +624,18 @@ Function EnableUpdateDriver {
    # Disable Windows Update automatic restart
    Function DisableUpdateRestart {
    Write-Host "Disabling Windows Update automatic restart..."
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "UxOption" -Type DWord -Value 1
    If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) {
    New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null
    }
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -Type DWord -Value 1
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUPowerManagement" -Type DWord -Value 0
    }

    # Enable Windows Update automatic restart
    Function EnableUpdateRestart {
    Write-Host "Enabling Windows Update automatic restart..."
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "UxOption" -Type DWord -Value 0
    Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -ErrorAction SilentlyContinue
    Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUPowerManagement" -ErrorAction SilentlyContinue
    }

    # Stop and disable Home Groups services - Not applicable to Server
    @@ -540,6 +655,18 @@ Function EnableHomeGroups {
    Start-Service "HomeGroupProvider" -WarningAction SilentlyContinue
    }

    # Disable Shared Experiences - Not applicable to Server
    Function DisableSharedExperiences {
    Write-Host "Disabling Shared Experiences..."
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\CDP" -Name "RomeSdkChannelUserAuthzPolicy" -Type DWord -Value 0
    }

    # Enable Shared Experiences - Not applicable to Server
    Function EnableSharedExperiences {
    Write-Host "Enabling Shared Experiences..."
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\CDP" -Name "RomeSdkChannelUserAuthzPolicy" -Type DWord -Value 1
    }

    # Disable Remote Assistance - Not applicable to Server (unless Remote Assistance is explicitly installed)
    Function DisableRemoteAssistance {
    Write-Host "Disabling Remote Assistance..."
    @@ -593,6 +720,18 @@ Function EnableAutorun {
    Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoDriveTypeAutoRun" -ErrorAction SilentlyContinue
    }

    # Enable Storage Sense - automatic disk cleanup - Not applicable to Server
    Function EnableStorageSense {
    Write-Host "Enabling Storage Sense..."
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Name "01" -Type DWord -Value 1
    }

    # Disable Storage Sense - Not applicable to Server
    Function DisableStorageSense {
    Write-Host "Disabling Storage Sense..."
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Name "01" -Type DWord -Value 1
    }

    # Disable scheduled defragmentation task
    Function DisableDefragmentation {
    Write-Host "Disabling scheduled defragmentation..."
    @@ -646,6 +785,38 @@ Function SetBIOSTimeLocal {
    Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -ErrorAction SilentlyContinue
    }

    # Enable Hibernation - Do not use on Server with automatically started Hyper-V hvboot service as it may lead to BSODs (Win10 with Hyper-V is fine)
    Function EnableHibernation {
    Write-Host "Enabling Hibernation..."
    Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Session Manager\Power" -Name "HibernteEnabled" -Type Dword -Value 1
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" | Out-Null
    }
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" -Name "ShowHibernateOption" -Type Dword -Value 1
    }

    # Disable Hibernation
    Function DisableHibernation {
    Write-Host "Disabling Hibernation..."
    Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Session Manager\Power" -Name "HibernteEnabled" -Type Dword -Value 0
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" | Out-Null
    }
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" -Name "ShowHibernateOption" -Type Dword -Value 0
    }

    # Disable Fast Startup
    Function DisableFastStartup {
    Write-Host "Disabling Fast Startup..."
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power" -Name "HiberbootEnabled" -Type DWord -Value 0
    }

    # Enable Fast Startup
    Function EnableFastStartup {
    Write-Host "Enabling Fast Startup..."
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power" -Name "HiberbootEnabled" -Type DWord -Value 1
    }



    ##########
    @@ -684,7 +855,7 @@ Function EnableLockScreen {
    Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" -Name "NoLockScreen" -ErrorAction SilentlyContinue
    }

    # Disable Lock screen (Anniversary Update workaround) - Applicable to RS1 or newer
    # Disable Lock screen (Anniversary Update workaround) - Applicable to 1607 or newer
    Function DisableLockScreenRS1 {
    Write-Host "Disabling Lock screen using scheduler workaround..."
    $service = New-Object -com Schedule.Service
    @@ -700,12 +871,36 @@ Function DisableLockScreenRS1 {
    $service.GetFolder("\").RegisterTaskDefinition("Disable LockScreen", $task, 6, "NT AUTHORITY\SYSTEM", $null, 4) | Out-Null
    }

    # Enable Lock screen (Anniversary Update workaround) - Applicable to RS1 or newer
    # Enable Lock screen (Anniversary Update workaround) - Applicable to 1607 or newer
    Function EnableLockScreenRS1 {
    Write-Host "Enabling Lock screen (removing scheduler workaround)..."
    Unregister-ScheduledTask -TaskName "Disable LockScreen" -Confirm:$false -ErrorAction SilentlyContinue
    }

    # Hide network options from Lock Screen
    Function HideNetworkFromLockScreen {
    Write-Host "Hiding network options from Lock Screen..."
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "DontDisplayNetworkSelectionUI" -Type DWord -Value 1
    }

    # Show network options on lock screen
    Function ShowNetworkOnLockScreen {
    Write-Host "Showing network options on Lock Screen..."
    Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "DontDisplayNetworkSelectionUI" -ErrorAction SilentlyContinue
    }

    # Hide shutdown options from Lock Screen
    Function HideShutdownFromLockScreen {
    Write-Host "Hiding shutdown options from Lock Screen..."
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ShutdownWithoutLogon" -Type DWord -Value 0
    }

    # Show shutdown options on lock screen
    Function ShowShutdownOnLockScreen {
    Write-Host "Showing shutdown options on Lock Screen..."
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ShutdownWithoutLogon" -Type DWord -Value 1
    }

    # Disable Sticky keys prompt
    Function DisableStickyKeys {
    Write-Host "Disabling Sticky keys prompt..."
    @@ -762,6 +957,21 @@ Function HideFileOperationsDetails {
    Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" -Name "EnthusiastMode" -ErrorAction SilentlyContinue
    }

    # Enable file delete confirmation dialog
    Function EnableFileDeleteConfirm {
    Write-Host "Enabling file delete confirmation dialog..."
    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 "ConfirmFileDelete" -Type DWord -Value 1
    }

    # Disable file delete confirmation dialog
    Function DisableFileDeleteConfirm {
    Write-Host "Disabling file delete confirmation dialog..."
    Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "ConfirmFileDelete" -ErrorAction SilentlyContinue
    }

    # Hide Taskbar Search button / box
    Function HideTaskbarSearchBox {
    Write-Host "Hiding Taskbar Search box / button..."
    @@ -888,13 +1098,13 @@ Function ShowRecentShortcuts {
    }

    # Change default Explorer view to This PC
    Function ExplorerThisPC {
    Function SetExplorerThisPC {
    Write-Host "Changing default Explorer view to This PC..."
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo" -Type DWord -Value 1
    }

    # Change default Explorer view to Quick Access
    Function ExplorerQuickAccess {
    Function SetExplorerQuickAccess {
    Write-Host "Changing default Explorer view to Quick Access..."
    Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo" -ErrorAction SilentlyContinue
    }
    @@ -919,88 +1129,198 @@ Function HideThisPCFromDesktop {
    Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -ErrorAction SilentlyContinue
    }

    # Show User Folder shortcut on desktop
    Function ShowUserFolderOnDesktop {
    Write-Host "Showing User Folder shortcut on desktop..."
    If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu")) {
    New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" -Force | Out-Null
    }
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" -Name "{59031a47-3f72-44a7-89c5-5595fe6b30ee}" -Type DWord -Value 0
    If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel")) {
    New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Force | Out-Null
    }
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{59031a47-3f72-44a7-89c5-5595fe6b30ee}" -Type DWord -Value 0
    }

    # Hide User Folder shortcut from desktop
    Function HideUserFolderFromDesktop {
    Write-Host "Hiding User Folder shortcut from desktop..."
    Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" -Name "{59031a47-3f72-44a7-89c5-5595fe6b30ee}" -ErrorAction SilentlyContinue
    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
    Function HideDesktopFromThisPC {
    Write-Host "Hiding Desktop icon from This PC..."
    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"
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" -Recurse -ErrorAction SilentlyContinue
    }

    # Show Desktop icon in This PC
    Function ShowDesktopInThisPC {
    Write-Host "Showing Desktop icon in This PC..."
    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"
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" | Out-Null
    }
    }

    # Hide Documents icon from This PC
    Function HideDocumentsFromThisPC {
    Write-Host "Hiding Documents icon from This PC..."
    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"
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}" -Recurse -ErrorAction SilentlyContinue
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}" -Recurse -ErrorAction SilentlyContinue
    }

    # Show Documents icon in This PC
    Function ShowDocumentsInThisPC {
    Write-Host "Showing Documents icon in This PC..."
    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"
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}" | Out-Null
    }
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}" | Out-Null
    }
    }

    # Hide Downloads icon from This PC
    Function HideDownloadsFromThisPC {
    Write-Host "Hiding Downloads icon from This PC..."
    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"
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}" -Recurse -ErrorAction SilentlyContinue
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}" -Recurse -ErrorAction SilentlyContinue
    }

    # Show Downloads icon in This PC
    Function ShowDownloadsInThisPC {
    Write-Host "Showing Downloads icon in This PC..."
    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"
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}" | Out-Null
    }
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}" | Out-Null
    }
    }

    # Hide Music icon from This PC
    Function HideMusicFromThisPC {
    Write-Host "Hiding Music icon from This PC..."
    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"
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}" -Recurse -ErrorAction SilentlyContinue
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}" -Recurse -ErrorAction SilentlyContinue
    }

    # Show Music icon in This PC
    Function ShowMusicInThisPC {
    Write-Host "Showing Music icon in This PC..."
    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"
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}" | Out-Null
    }
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}" | Out-Null
    }
    }

    # Hide Pictures icon from This PC
    Function HidePicturesFromThisPC {
    Write-Host "Hiding Pictures icon from This PC..."
    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"
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}" -Recurse -ErrorAction SilentlyContinue
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}" -Recurse -ErrorAction SilentlyContinue
    }

    # Show Pictures icon in This PC
    Function ShowPicturesInThisPC {
    Write-Host "Showing Pictures icon in This PC..."
    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"
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}" | Out-Null
    }
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}" | Out-Null
    }
    }

    # Hide Videos icon from This PC
    Function HideVideosFromThisPC {
    Write-Host "Hiding Videos icon from This PC..."
    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"
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}" -Recurse -ErrorAction SilentlyContinue
    Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}" -Recurse -ErrorAction SilentlyContinue
    }

    # Show Videos icon in This PC
    Function ShowVideosInThisPC {
    Write-Host "Showing Videos icon in This PC..."
    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"
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}" | Out-Null
    }
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}" | Out-Null
    }
    }

    # Hide 3D Objects icon from This PC
    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
    }

    # Show 3D Objects icon in This PC
    Function Show3DObjectsInThisPC {
    Write-Host "Showing 3D Objects icon in This PC..."
    If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" | Out-Null
    }
    }

    # 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..."
    Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "DragFullWindows" -Type String -Value 0
    Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type String -Value 0
    Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Type Binary -Value ([byte[]](0x90,0x12,0x03,0x80,0x10,0x00,0x00,0x00))
    Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Type String -Value 0
    Set-ItemProperty -Path "HKCU:\Control Panel\Keyboard" -Name "KeyboardDelay" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewAlphaSelect" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewShadow" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAnimations" -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" -Name "VisualFXSetting" -Type DWord -Value 3
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "EnableAeroPeek" -Type DWord -Value 0
    }

    # Adjusts visual effects for appearance
    Function SetVisualFXAppearance {
    Write-Host "Adjusting visual effects for appearance..."
    Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "DragFullWindows" -Type String -Value 1
    Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type String -Value 400
    Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Type Binary -Value ([byte[]](0x9E,0x1E,0x07,0x80,0x12,0x00,0x00,0x00))
    Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Type String -Value 1
    Set-ItemProperty -Path "HKCU:\Control Panel\Keyboard" -Name "KeyboardDelay" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewAlphaSelect" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewShadow" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAnimations" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" -Name "VisualFXSetting" -Type DWord -Value 3
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "EnableAeroPeek" -Type DWord -Value 1
    }

    # Disable thumbnails, show only file extension icons
    Function DisableThumbnails {
    Write-Host "Disabling thumbnails..."
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "IconsOnly" -Type DWord -Value 1
    }

    # Enable thumbnails
    Function EnableThumbnails {
    Write-Host "Enabling thumbnails..."
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "IconsOnly" -Type DWord -Value 0
    }

    # Disable creation of Thumbs.db thumbnail cache files
    Function DisableThumbsDB {
    Write-Host "Disabling creation of Thumbs.db..."
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DisableThumbnailCache" -Type DWord -Value 1
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DisableThumbsDBOnNetworkFolders" -Type DWord -Value 1
    }

    # Enable creation of Thumbs.db thumbnail cache files
    Function EnableThumbsDB {
    Write-Host "Enable creation of Thumbs.db..."
    Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DisableThumbnailCache" -ErrorAction SilentlyContinue
    Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DisableThumbsDBOnNetworkFolders" -ErrorAction SilentlyContinue
    }

    # Add secondary en-US keyboard
    @@ -1138,6 +1458,7 @@ Function UninstallMsftBloat {
    Get-AppxPackage "Microsoft.MSPaint" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.Microsoft3DViewer" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.RemoteDesktop" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.Print3D" | Remove-AppxPackage
    }

    # Install default Microsoft applications
    @@ -1177,6 +1498,7 @@ Function InstallMsftBloat {
    Get-AppxPackage -AllUsers "Microsoft.MSPaint" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.Microsoft3DViewer" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.RemoteDesktop" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.Print3D" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    }
    # In case you have removed them for good, you can try to restore the files using installation medium as follows
    # New-Item C:\Mnt -Type Directory | Out-Null
    @@ -1187,7 +1509,7 @@ Function InstallMsftBloat {

    # Uninstall default third party applications
    function UninstallThirdPartyBloat {

    Write-Host "Uninstalling default third party applications..."
    Get-AppxPackage "9E2F88E3.Twitter" | Remove-AppxPackage
    Get-AppxPackage "king.com.CandyCrushSodaSaga" | Remove-AppxPackage
    Get-AppxPackage "4DF9E0F8.Netflix" | Remove-AppxPackage
    @@ -1201,10 +1523,15 @@ function UninstallThirdPartyBloat {
    Get-AppxPackage "Facebook.Facebook" | Remove-AppxPackage
    Get-AppxPackage "46928bounde.EclipseManager" | Remove-AppxPackage
    Get-AppxPackage "A278AB0D.MarchofEmpires" | Remove-AppxPackage
    Get-AppxPackage "KeeperSecurityInc.Keeper" | Remove-AppxPackage
    Get-AppxPackage "king.com.BubbleWitch3Saga" | Remove-AppxPackage
    Get-AppxPackage "89006A2E.AutodeskSketchBook" | Remove-AppxPackage
    Get-AppxPackage "CAF9E577.Plex" | Remove-AppxPackage
    }

    # Install default third party applications
    Function InstallThirdPartyBloat {
    Write-Host "Installing default third party applications..."
    Get-AppxPackage -AllUsers "9E2F88E3.Twitter" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "king.com.CandyCrushSodaSaga" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "4DF9E0F8.Netflix" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    @@ -1218,6 +1545,10 @@ Function InstallThirdPartyBloat {
    Get-AppxPackage -AllUsers "Facebook.Facebook" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "46928bounde.EclipseManager" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "A278AB0D.MarchofEmpires" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "KeeperSecurityInc.Keeper" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "king.com.BubbleWitch3Saga" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "89006A2E.AutodeskSketchBook" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "CAF9E577.Plex" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    }

    # Uninstall Windows Store
    @@ -1234,28 +1565,14 @@ Function InstallWindowsStore {
    Get-AppxPackage -AllUsers "Microsoft.WindowsStore" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    }

    # Disable installation of consumer experience applications
    Function DisableConsumerApps {
    Write-Host "Disabling installation of consumer experience applications..."
    If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent")) {
    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
    }

    # Enable installation of consumer experience applications
    Function EnableConsumerApps {
    Write-Host "Enabling installation of consumer experience applications..."
    Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -ErrorAction SilentlyContinue
    }

    # Disable Xbox features
    Function DisableXboxFeatures {
    Write-Host "Disabling Xbox features..."
    Get-AppxPackage "Microsoft.XboxApp" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.XboxIdentityProvider" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.XboxSpeechToTextOverlay" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.XboxGameOverlay" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.Xbox.TCUI" | Remove-AppxPackage
    Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 0
    If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR")) {
    New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" | Out-Null
    @@ -1270,10 +1587,31 @@ Function EnableXboxFeatures {
    Get-AppxPackage -AllUsers "Microsoft.XboxIdentityProvider" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.XboxSpeechToTextOverlay" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.XboxGameOverlay" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.Xbox.TCUI" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 1
    Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -ErrorAction SilentlyContinue
    }

    # Disable built-in Adobe Flash in IE and Edge
    Function DisableAdobeFlash {
    Write-Host "Disabling built-in Adobe Flash in IE and Edge..."
    If (!(Test-Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Addons")) {
    New-Item -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Addons" -Force | Out-Null
    }
    Set-ItemProperty -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Addons" -Name "FlashPlayerEnabled" -Type DWord -Value 0
    If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Ext\Settings\{D27CDB6E-AE6D-11CF-96B8-444553540000}")) {
    New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Ext\Settings\{D27CDB6E-AE6D-11CF-96B8-444553540000}" -Force | Out-Null
    }
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Ext\Settings\{D27CDB6E-AE6D-11CF-96B8-444553540000}" -Name "Flags" -Type DWord -Value 1
    }

    # Enable built-in Adobe Flash in IE and Edge
    Function EnableAdobeFlash {
    Write-Host "Enabling built-in Adobe Flash in IE and Edge..."
    Remove-ItemProperty -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Addons" -Name "FlashPlayerEnabled" -ErrorAction SilentlyContinue
    Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Ext\Settings\{D27CDB6E-AE6D-11CF-96B8-444553540000}" -Name "Flags" -ErrorAction SilentlyContinue
    }

    # Uninstall Windows Media Player
    Function UninstallMediaPlayer {
    Write-Host "Uninstalling Windows Media Player..."
    @@ -1298,15 +1636,15 @@ Function InstallWorkFolders {
    Enable-WindowsOptionalFeature -Online -FeatureName "WorkFolders-Client" -NoRestart -WarningAction SilentlyContinue | Out-Null
    }

    # Install Linux Subsystem - Applicable to RS1 or newer, not applicable to Server yet
    # Install Linux Subsystem - Applicable to 1607 or newer, not applicable to Server yet
    Function InstallLinuxSubsystem {
    Write-Host "Installing Linux Subsystem..."
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowDevelopmentWithoutDevLicense" -Type DWord -Value 1
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowAllTrustedApps" -Type DWord -Value 1
    Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux" -NoRestart -WarningAction SilentlyContinue | Out-Null
    }

    # Uninstall Linux Subsystem - Applicable to RS1 or newer, not applicable to Server yet
    # Uninstall Linux Subsystem - Applicable to 1607 or newer, not applicable to Server yet
    Function UninstallLinuxSubsystem {
    Write-Host "Uninstalling Linux Subsystem..."
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowDevelopmentWithoutDevLicense" -Type DWord -Value 0
    @@ -1527,12 +1865,22 @@ Function EnableIEEnhancedSecurity {
    # Auxiliary Functions
    ##########

    # Relaunch the script with administrator privileges
    Function RequireAdmin {
    If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]"Administrator")) {
    Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`" $PSCommandArgs" -WorkingDirectory $pwd -Verb RunAs
    Exit
    }
    }

    # Wait for key press
    Function WaitForKey {
    Write-Host
    Write-Host "Press any key to continue..." -ForegroundColor Black -BackgroundColor White
    [Console]::ReadKey($true) | Out-Null
    }

    # Restart computer
    Function Restart {
    Write-Host "Restarting..."
    Restart-Computer
    @@ -1544,17 +1892,19 @@ Function Restart {
    # Parse parameters and apply tweaks
    ##########

    # Ask for elevated privileges if required
    If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]"Administrator")) {
    Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`" $args" -WorkingDirectory $pwd -Verb RunAs
    Exit
    # Normalize path to preset file
    $preset = ""
    $PSCommandArgs = $args
    If ($args -And $args[0].ToLower() -eq "-preset") {
    $preset = Resolve-Path $($args | Select-Object -Skip 1)
    $PSCommandArgs = "-preset `"$preset`""
    }

    # Load function names from command line arguments or a preset file
    If ($args) {
    $tweaks = $args
    If ($args[0].ToLower() -eq "-preset") {
    $tweaks = Get-Content $args[1] -ErrorAction Stop | ForEach { $_.Trim() } | Where { $_ -ne "" -and $_[0] -ne "#" }
    If ($preset) {
    $tweaks = Get-Content $preset -ErrorAction Stop | ForEach { $_.Trim() } | Where { $_ -ne "" -and $_[0] -ne "#" }
    }
    }

  21. @alirobe alirobe revised this gist Sep 24, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -50,7 +50,7 @@ $tweaks = @(
    "DisableUpdateRestart", # "EnableUpdateRestart",
    "DisableHomeGroups", # "EnableHomeGroups",
    # "DisableRemoteAssistance", # "EnableRemoteAssistance",
    "EnableRemoteDesktop", # "DisableRemoteDesktop",
    # "EnableRemoteDesktop", # "DisableRemoteDesktop",
    "DisableAutoplay", # "EnableAutoplay",
    "DisableAutorun", # "EnableAutorun",
    # "DisableDefragmentation", # "EnableDefragmentation",
  22. @alirobe alirobe revised this gist Sep 10, 2017. No changes.
  23. @alirobe alirobe revised this gist Aug 1, 2017. 1 changed file with 115 additions and 80 deletions.
    195 changes: 115 additions & 80 deletions reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    # Tweaked Win10 Initial Setup Script
    # Primary Author: Disassembler <[email protected]>
    # Modified by: alirobe <[email protected]> based on my personal preferences.
    # Version: 2.5.1, 2017-09-17
    # Version: 2.6.1, 2017-08-02
    # Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
    # Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
    # Tweak difference:
    @@ -87,8 +87,8 @@ $tweaks = @(
    ### Application Tweaks ###
    # "DisableOneDrive", # "EnableOneDrive",
    # "UninstallOneDrive", # "InstallOneDrive",
    # NOTE I HAVE TEMP MODIFIED UNINSTALL BLOATWARE TO REFER ONLY TO 3RD PARTY BLOATWARE. THIS SHOULD IDEALLY BE 2 FUNCTIONS. (Pull Req https://github.com/Disassembler0/Win10-Initial-Setup-Script/pull/12) -- @alirobe
    "UninstallBloatware", # "InstallBloatware",
    # "UninstallMsftBloat", # "InstallMsftBloat",
    "UninstallThirdPartyBloat", # "InstallThirdPartyBloat",
    # "UninstallWindowsStore", # "InstallWindowsStore",
    # "DisableConsumerApps", # "EnableConsumerApps",
    # "DisableXboxFeatures", # "EnableXboxFeatures",
    @@ -111,12 +111,9 @@ $tweaks = @(
    # "DisableIEEnhancedSecurity", # "EnableIEEnhancedSecurity",

    ### Auxiliary Functions ###
    "WaitForKey",
    "WaitForKey" #,
    # "Restart"
    )



    ##########
    # Privacy Settings
    ##########
    @@ -336,29 +333,29 @@ Function EnableAutoLogger {
    # Stop and disable Diagnostics Tracking Service
    Function DisableDiagTrack {
    Write-Host "Stopping and disabling Diagnostics Tracking Service..."
    Stop-Service "DiagTrack"
    Stop-Service "DiagTrack" -WarningAction SilentlyContinue
    Set-Service "DiagTrack" -StartupType Disabled
    }

    # Enable and start Diagnostics Tracking Service
    Function EnableDiagTrack {
    Write-Host "Enabling and starting Diagnostics Tracking Service..."
    Set-Service "DiagTrack" -StartupType Automatic
    Start-Service "DiagTrack"
    Start-Service "DiagTrack" -WarningAction SilentlyContinue
    }

    # Stop and disable WAP Push Service
    Function DisableWAPPush {
    Write-Host "Stopping and disabling WAP Push Service..."
    Stop-Service "dmwappushservice"
    Stop-Service "dmwappushservice" -WarningAction SilentlyContinue
    Set-Service "dmwappushservice" -StartupType Disabled
    }

    # Enable and start WAP Push Service
    Function EnableWAPPush {
    Write-Host "Enabling and starting WAP Push Service..."
    Set-Service "dmwappushservice" -StartupType Automatic
    Start-Service "dmwappushservice"
    Start-Service "dmwappushservice" -WarningAction SilentlyContinue
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\dmwappushservice" -Name "DelayedAutoStart" -Type DWord -Value 1
    }

    @@ -529,9 +526,9 @@ Function EnableUpdateRestart {
    # Stop and disable Home Groups services - Not applicable to Server
    Function DisableHomeGroups {
    Write-Host "Stopping and disabling Home Groups services..."
    Stop-Service "HomeGroupListener"
    Stop-Service "HomeGroupListener" -WarningAction SilentlyContinue
    Set-Service "HomeGroupListener" -StartupType Disabled
    Stop-Service "HomeGroupProvider"
    Stop-Service "HomeGroupProvider" -WarningAction SilentlyContinue
    Set-Service "HomeGroupProvider" -StartupType Disabled
    }

    @@ -540,7 +537,7 @@ Function EnableHomeGroups {
    Write-Host "Starting and enabling Home Groups services..."
    Set-Service "HomeGroupListener" -StartupType Manual
    Set-Service "HomeGroupProvider" -StartupType Manual
    Start-Service "HomeGroupProvider"
    Start-Service "HomeGroupProvider" -WarningAction SilentlyContinue
    }

    # Disable Remote Assistance - Not applicable to Server (unless Remote Assistance is explicitly installed)
    @@ -596,18 +593,47 @@ Function EnableAutorun {
    Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoDriveTypeAutoRun" -ErrorAction SilentlyContinue
    }

    # Disable scheduled defragmentation
    # Disable scheduled defragmentation task
    Function DisableDefragmentation {
    Write-Host "Disabling scheduled defragmentation..."
    Disable-ScheduledTask -TaskName "\Microsoft\Windows\Defrag\ScheduledDefrag" | Out-Null
    }

    # Enable scheduled defragmentation
    # Enable scheduled defragmentation task
    Function EnableDefragmentation {
    Write-Host "Enabling scheduled defragmentation..."
    Enable-ScheduledTask -TaskName "\Microsoft\Windows\Defrag\ScheduledDefrag" | Out-Null
    }

    # Stop and disable Superfetch service - Not applicable to Server
    Function DisableSuperfetch {
    Write-Host "Stopping and disabling Superfetch service..."
    Stop-Service "SysMain" -WarningAction SilentlyContinue
    Set-Service "SysMain" -StartupType Disabled
    }

    # Start and enable Superfetch service - Not applicable to Server
    Function EnableSuperfetch {
    Write-Host "Starting and enabling Superfetch service..."
    Set-Service "SysMain" -StartupType Automatic
    Start-Service "SysMain" -WarningAction SilentlyContinue
    }

    # Stop and disable Windows Search indexing service
    Function DisableIndexing {
    Write-Host "Stopping and disabling Windows Search indexing service..."
    Stop-Service "WSearch" -WarningAction SilentlyContinue
    Set-Service "WSearch" -StartupType Disabled
    }

    # Start and enable Windows Search indexing service
    Function EnableIndexing {
    Write-Host "Starting and enabling Windows Search indexing service..."
    Set-Service "WSearch" -StartupType Automatic
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WSearch" -Name "DelayedAutoStart" -Type DWord -Value 1
    Start-Service "WSearch" -WarningAction SilentlyContinue
    }

    # Set BIOS time to UTC
    Function SetBIOSTimeUTC {
    Write-Host "Setting BIOS time to UTC..."
    @@ -1076,60 +1102,47 @@ Function InstallOneDrive {
    }

    # Uninstall default Microsoft applications
    Function UninstallBloatware {
    Write-Host "Uninstalling Bundled 3rd Party applications..."
    #Get-AppxPackage "Microsoft.3DBuilder" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.BingFinance" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.BingNews" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.BingSports" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.BingWeather" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.Getstarted" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.MicrosoftOfficeHub" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.MicrosoftSolitaireCollection" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.Office.OneNote" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.People" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.SkypeApp" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.Windows.Photos" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.WindowsAlarms" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.WindowsCamera" | Remove-AppxPackage
    #Get-AppxPackage "microsoft.windowscommunicationsapps" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.WindowsMaps" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.WindowsPhone" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.WindowsSoundRecorder" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.ZuneMusic" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.ZuneVideo" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.AppConnector" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.ConnectivityStore" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.Office.Sway" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.Messaging" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.CommsPhone" | Remove-AppxPackage
    Get-AppxPackage "9E2F88E3.Twitter" | Remove-AppxPackage
    Get-AppxPackage "king.com.CandyCrushSodaSaga" | Remove-AppxPackage
    Get-AppxPackage "4DF9E0F8.Netflix" | Remove-AppxPackage
    Get-AppxPackage "Drawboard.DrawboardPDF" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.MicrosoftStickyNotes" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.OneConnect" | Remove-AppxPackage
    Get-AppxPackage "D52A8D61.FarmVille2CountryEscape" | Remove-AppxPackage
    Get-AppxPackage "GAMELOFTSA.Asphalt8Airborne" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.WindowsFeedbackHub" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.MinecraftUWP" | Remove-AppxPackage
    Get-AppxPackage "flaregamesGmbH.RoyalRevolt2" | Remove-AppxPackage
    Get-AppxPackage "AdobeSystemsIncorporated.AdobePhotoshopExpress" | Remove-AppxPackage
    Get-AppxPackage "ActiproSoftwareLLC.562882FEEB491" | Remove-AppxPackage
    Get-AppxPackage "D5EA27B7.Duolingo-LearnLanguagesforFree" | Remove-AppxPackage
    Get-AppxPackage "Facebook.Facebook" | Remove-AppxPackage
    Get-AppxPackage "46928bounde.EclipseManager" | Remove-AppxPackage
    Get-AppxPackage "A278AB0D.MarchofEmpires" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.MicrosoftPowerBIForWindows" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.NetworkSpeedTest" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.MSPaint" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.Microsoft3DViewer" | Remove-AppxPackage
    #Get-AppxPackage "Microsoft.RemoteDesktop" | Remove-AppxPackage
    Function UninstallMsftBloat {
    Write-Host "Uninstalling default Microsoft applications..."
    Get-AppxPackage "Microsoft.3DBuilder" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.BingFinance" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.BingNews" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.BingSports" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.BingWeather" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.Getstarted" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.MicrosoftOfficeHub" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.MicrosoftSolitaireCollection" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.Office.OneNote" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.People" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.SkypeApp" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.Windows.Photos" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.WindowsAlarms" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.WindowsCamera" | Remove-AppxPackage
    Get-AppxPackage "microsoft.windowscommunicationsapps" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.WindowsMaps" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.WindowsPhone" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.WindowsSoundRecorder" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.ZuneMusic" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.ZuneVideo" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.AppConnector" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.ConnectivityStore" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.Office.Sway" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.Messaging" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.CommsPhone" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.MicrosoftStickyNotes" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.OneConnect" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.WindowsFeedbackHub" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.MinecraftUWP" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.MicrosoftPowerBIForWindows" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.NetworkSpeedTest" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.MSPaint" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.Microsoft3DViewer" | Remove-AppxPackage
    Get-AppxPackage "Microsoft.RemoteDesktop" | Remove-AppxPackage
    }

    # Install default Microsoft applications
    Function InstallBloatware {
    Write-Host "Installing 3rd Party Bloatware applications..."
    Function InstallMsftBloat {
    Write-Host "Installing default Microsoft applications..."
    Get-AppxPackage -AllUsers "Microsoft.3DBuilder" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.BingFinance" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.BingNews" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    @@ -1155,23 +1168,10 @@ Function InstallBloatware {
    Get-AppxPackage -AllUsers "Microsoft.Office.Sway" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.Messaging" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.CommsPhone" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "9E2F88E3.Twitter" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "king.com.CandyCrushSodaSaga" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "4DF9E0F8.Netflix" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Drawboard.DrawboardPDF" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.MicrosoftStickyNotes" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.OneConnect" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "D52A8D61.FarmVille2CountryEscape" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "GAMELOFTSA.Asphalt8Airborne" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.WindowsFeedbackHub" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.MinecraftUWP" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "flaregamesGmbH.RoyalRevolt2" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "AdobeSystemsIncorporated.AdobePhotoshopExpress" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "ActiproSoftwareLLC.562882FEEB491" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "D5EA27B7.Duolingo-LearnLanguagesforFree" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Facebook.Facebook" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "46928bounde.EclipseManager" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "A278AB0D.MarchofEmpires" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.MicrosoftPowerBIForWindows" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.NetworkSpeedTest" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Microsoft.MSPaint" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    @@ -1185,6 +1185,41 @@ Function InstallBloatware {
    # dism /Unmount-Image /Discard /MountDir:C:\Mnt
    # Remove-Item -Path C:\Mnt -Recurse

    # Uninstall default third party applications
    function UninstallThirdPartyBloat {

    Get-AppxPackage "9E2F88E3.Twitter" | Remove-AppxPackage
    Get-AppxPackage "king.com.CandyCrushSodaSaga" | Remove-AppxPackage
    Get-AppxPackage "4DF9E0F8.Netflix" | Remove-AppxPackage
    Get-AppxPackage "Drawboard.DrawboardPDF" | Remove-AppxPackage
    Get-AppxPackage "D52A8D61.FarmVille2CountryEscape" | Remove-AppxPackage
    Get-AppxPackage "GAMELOFTSA.Asphalt8Airborne" | Remove-AppxPackage
    Get-AppxPackage "flaregamesGmbH.RoyalRevolt2" | Remove-AppxPackage
    Get-AppxPackage "AdobeSystemsIncorporated.AdobePhotoshopExpress" | Remove-AppxPackage
    Get-AppxPackage "ActiproSoftwareLLC.562882FEEB491" | Remove-AppxPackage
    Get-AppxPackage "D5EA27B7.Duolingo-LearnLanguagesforFree" | Remove-AppxPackage
    Get-AppxPackage "Facebook.Facebook" | Remove-AppxPackage
    Get-AppxPackage "46928bounde.EclipseManager" | Remove-AppxPackage
    Get-AppxPackage "A278AB0D.MarchofEmpires" | Remove-AppxPackage
    }

    # Install default third party applications
    Function InstallThirdPartyBloat {
    Get-AppxPackage -AllUsers "9E2F88E3.Twitter" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "king.com.CandyCrushSodaSaga" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "4DF9E0F8.Netflix" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Drawboard.DrawboardPDF" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "D52A8D61.FarmVille2CountryEscape" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "GAMELOFTSA.Asphalt8Airborne" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "flaregamesGmbH.RoyalRevolt2" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "AdobeSystemsIncorporated.AdobePhotoshopExpress" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "ActiproSoftwareLLC.562882FEEB491" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "D5EA27B7.Duolingo-LearnLanguagesforFree" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "Facebook.Facebook" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "46928bounde.EclipseManager" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    Get-AppxPackage -AllUsers "A278AB0D.MarchofEmpires" | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    }

    # Uninstall Windows Store
    Function UninstallWindowsStore {
    Write-Host "Uninstalling Windows Store..."
  24. @alirobe alirobe revised this gist Jul 29, 2017. No changes.
  25. @alirobe alirobe revised this gist Jul 29, 2017. No changes.
  26. @alirobe alirobe revised this gist Jul 29, 2017. No changes.
  27. @alirobe alirobe renamed this gist Jul 29, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  28. @alirobe alirobe renamed this gist Jul 29, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  29. @alirobe alirobe revised this gist Jul 29, 2017. 1 changed file with 21 additions and 0 deletions.
    21 changes: 21 additions & 0 deletions LICENSE
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    MIT License

    Copyright (c) 2017 Disassembler <[email protected]>

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
  30. @alirobe alirobe revised this gist Jul 29, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion reclaimWindows10.ps1
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@
    # ... while retaining win10 defaults + security features. Aim to be suitable for end-user rollout.
    #
    # If you're a power user looking to tweak your machine, or doing larger roll-out..
    # fork the @Disassembler0 script instead. It'll be more up-to-date than mine:
    # Use the @Disassembler0 script instead. It'll probably be more up-to-date than mine:
    # https://github.com/Disassembler0/Win10-Initial-Setup-Script
    #
    # Note from author: Never run scripts without reading them & understanding what they do.