{"id":124,"date":"2017-08-26T08:44:13","date_gmt":"2017-08-26T08:44:13","guid":{"rendered":"https:\/\/d1m0.com\/?p=124"},"modified":"2017-09-11T12:04:37","modified_gmt":"2017-09-11T12:04:37","slug":"privacy-please","status":"publish","type":"post","link":"https:\/\/d1m0.com\/?p=124","title":{"rendered":"Privacy &#8230;please"},"content":{"rendered":"<p>Tl;dr &#8211; <a href=\"https:\/\/d1m0.com\/wp-content\/uploads\/2017\/08\/privacy.zip\">\u00a0Download Powershell script<\/a> .Open Powershell as admin.Navigate to your download directory. Mark it as executable with\u00a0 &#8216; Set-ExecutionPolicy RemoteSigned\u00a0 &#8216; and execute the script.<\/p>\n<p>&#8220;DisableTelemetry&#8221;, # &#8220;EnableTelemetry&#8221;,<br \/>\n&#8220;DisableWiFiSense&#8221;, # &#8220;EnableWiFiSense&#8221;,<br \/>\n# &#8220;DisableSmartScreen&#8221;, # &#8220;EnableSmartScreen&#8221;,<br \/>\n&#8220;DisableWebSearch&#8221;, # &#8220;EnableWebSearch&#8221;,<br \/>\n&#8220;DisableStartSuggestions&#8221;, # &#8220;EnableStartSuggestions&#8221;,<br \/>\n&#8220;DisableLocationTracking&#8221;, # &#8220;EnableLocationTracking&#8221;,<br \/>\n&#8220;DisableFeedback&#8221;, # &#8220;EnableFeedback&#8221;,<br \/>\n&#8220;DisableAdvertisingID&#8221;, # &#8220;EnableAdvertisingID&#8221;,<br \/>\n&#8220;DisableCortana&#8221;, # &#8220;EnableCortana&#8221;,<br \/>\n&#8220;DisableErrorReporting&#8221;, # &#8220;EnableErrorReporting&#8221;,<br \/>\n&#8220;RestrictUpdateP2P&#8221;, # &#8220;UnrestrictUpdateP2P&#8221;,<br \/>\n&#8220;DisableAutoLogger&#8221;, # &#8220;EnableAutoLogger&#8221;,<br \/>\n&#8220;DisableDiagTrack&#8221;, # &#8220;EnableDiagTrack&#8221;,<br \/>\n&#8220;DisableWAPPush&#8221;, # &#8220;EnableWAPPush&#8221;,<\/p>\n<p><!--more--><\/p>\n<p>### Service Tweaks ###<br \/>\n# &#8220;LowerUAC&#8221;, # &#8220;RaiseUAC&#8221;,<br \/>\n# &#8220;EnableSharingMappedDrives&#8221;, # &#8220;DisableSharingMappedDrives&#8221;,<br \/>\n# &#8220;DisableAdminShares&#8221;, # &#8220;EnableAdminShares&#8221;,<br \/>\n&#8220;DisableSMB1&#8221;, # &#8220;EnableSMB1&#8221;,<br \/>\n&#8220;SetCurrentNetworkPrivate&#8221;, # &#8220;SetCurrentNetworkPublic&#8221;,<br \/>\n# &#8220;SetUnknownNetworksPrivate&#8221;, # &#8220;SetUnknownNetworksPublic&#8221;,<br \/>\n# &#8220;DisableFirewall&#8221;, # &#8220;EnableFirewall&#8221;,<br \/>\n# &#8220;DisableDefender&#8221;, # &#8220;EnableDefender&#8221;,<br \/>\n# &#8220;DisableUpdateMSRT&#8221;, # &#8220;EnableUpdateMSRT&#8221;,<br \/>\n# &#8220;DisableUpdateDriver&#8221;, # &#8220;EnableUpdateDriver&#8221;,<br \/>\n&#8220;DisableUpdateRestart&#8221;, # &#8220;EnableUpdateRestart&#8221;,<br \/>\n&#8220;DisableHomeGroups&#8221;, # &#8220;EnableHomeGroups&#8221;,<br \/>\n# &#8220;DisableRemoteAssistance&#8221;, # &#8220;EnableRemoteAssistance&#8221;,<br \/>\n&#8220;EnableRemoteDesktop&#8221;, # &#8220;DisableRemoteDesktop&#8221;,<br \/>\n&#8220;DisableAutoplay&#8221;, # &#8220;EnableAutoplay&#8221;,<br \/>\n&#8220;DisableAutorun&#8221;, # &#8220;EnableAutorun&#8221;,<br \/>\n# &#8220;DisableDefragmentation&#8221;, # &#8220;EnableDefragmentation&#8221;,<br \/>\n# &#8220;SetBIOSTimeUTC&#8221;, # &#8220;SetBIOSTimeLocal&#8221;,<\/p>\n<p>### UI Tweaks ###<br \/>\n# &#8220;DisableActionCenter&#8221;, # &#8220;EnableActionCenter&#8221;,<br \/>\n# &#8220;DisableLockScreen&#8221;, # &#8220;EnableLockScreen&#8221;,<br \/>\n# &#8220;DisableLockScreenRS1&#8221;, # &#8220;EnableLockScreenRS1&#8221;,<br \/>\n# &#8220;DisableStickyKeys&#8221;, # &#8220;EnableStickyKeys&#8221;,<br \/>\n# &#8220;ShowTaskManagerDetails&#8221; # &#8220;HideTaskManagerDetails&#8221;,<br \/>\n&#8220;ShowFileOperationsDetails&#8221;, # &#8220;HideFileOperationsDetails&#8221;,<br \/>\n# &#8220;HideTaskbarSearchBox&#8221;, # &#8220;ShowTaskbarSearchBox&#8221;,<br \/>\n# &#8220;HideTaskView&#8221;, # &#8220;ShowTaskView&#8221;,<br \/>\n# &#8220;ShowSmallTaskbarIcons&#8221;, # &#8220;ShowLargeTaskbarIcons&#8221;,<br \/>\n# &#8220;ShowTaskbarTitles&#8221;, # &#8220;HideTaskbarTitles&#8221;,<br \/>\n# &#8220;HideTaskbarPeopleIcon&#8221;, # &#8220;ShowTaskbarPeopleIcon&#8221;,<br \/>\n# &#8220;ShowTrayIcons&#8221;, # &#8220;HideTrayIcons&#8221;,<br \/>\n&#8220;ShowKnownExtensions&#8221;, # &#8220;HideKnownExtensions&#8221;,<br \/>\n# &#8220;ShowHiddenFiles&#8221;, # &#8220;HideHiddenFiles&#8221;,<br \/>\n# &#8220;HideSyncNotifications&#8221; # &#8220;ShowSyncNotifications&#8221;,<br \/>\n# &#8220;HideRecentShortcuts&#8221;, # &#8220;ShowRecentShortcuts&#8221;,<br \/>\n&#8220;ExplorerThisPC&#8221;, # &#8220;ExplorerQuickAccess&#8221;,<br \/>\n&#8220;ShowThisPCOnDesktop&#8221;, # &#8220;HideThisPCFromDesktop&#8221;,<br \/>\n# &#8220;HideDesktopFromThisPC&#8221;, # &#8220;ShowDesktopInThisPC&#8221;,<br \/>\n# &#8220;HideDocumentsFromThisPC&#8221;, # &#8220;ShowDocumentsInThisPC&#8221;,<br \/>\n# &#8220;HideDownloadsFromThisPC&#8221;, # &#8220;ShowDownloadsInThisPC&#8221;,<br \/>\n# &#8220;HideMusicFromThisPC&#8221;, # &#8220;ShowMusicInThisPC&#8221;,<br \/>\n# &#8220;HidePicturesFromThisPC&#8221;, # &#8220;ShowPicturesInThisPC&#8221;,<br \/>\n# &#8220;HideVideosFromThisPC&#8221;, # &#8220;ShowVideosInThisPC&#8221;,<br \/>\n# &#8220;AddENKeyboard&#8221;, # &#8220;RemoveENKeyboard&#8221;,<br \/>\n# &#8220;EnableNumlock&#8221;, # &#8220;DisableNumlock&#8221;,<\/p>\n<p>### Application Tweaks ###<br \/>\n# &#8220;DisableOneDrive&#8221;, # &#8220;EnableOneDrive&#8221;,<br \/>\n# &#8220;UninstallOneDrive&#8221;, # &#8220;InstallOneDrive&#8221;,<br \/>\n# &#8220;UninstallMsftBloat&#8221;, # &#8220;InstallMsftBloat&#8221;,<br \/>\n&#8220;UninstallThirdPartyBloat&#8221;, # &#8220;InstallThirdPartyBloat&#8221;,<br \/>\n# &#8220;UninstallWindowsStore&#8221;, # &#8220;InstallWindowsStore&#8221;,<br \/>\n# &#8220;DisableConsumerApps&#8221;, # &#8220;EnableConsumerApps&#8221;,<br \/>\n# &#8220;DisableXboxFeatures&#8221;, # &#8220;EnableXboxFeatures&#8221;,<br \/>\n# &#8220;UninstallMediaPlayer&#8221;, # &#8220;InstallMediaPlayer&#8221;,<br \/>\n# &#8220;UninstallWorkFolders&#8221;, # &#8220;InstallWorkFolders&#8221;,<br \/>\n# &#8220;InstallLinuxSubsystem&#8221;, # &#8220;UninstallLinuxSubsystem&#8221;,<br \/>\n# &#8220;InstallHyperV&#8221;, # &#8220;UninstallHyperV&#8221;,<br \/>\n# &#8220;SetPhotoViewerAssociation&#8221;, # &#8220;UnsetPhotoViewerAssociation&#8221;,<br \/>\n# &#8220;AddPhotoViewerOpenWith&#8221;, # &#8220;RemovePhotoViewerOpenWith&#8221;,<br \/>\n# &#8220;DisableSearchAppInStore&#8221;, # &#8220;EnableSearchAppInStore&#8221;,<br \/>\n&#8220;DisableNewAppPrompt&#8221;, # &#8220;EnableNewAppPrompt&#8221;,<br \/>\n&#8220;EnableF8BootMenu&#8221;, # &#8220;DisableF8BootMenu&#8221;,<br \/>\n# &#8220;SetDEPOptOut&#8221;, # &#8220;SetDEPOptIn&#8221;,<\/p>\n<p>### Server Specific Tweaks ###<br \/>\n# &#8220;HideServerManagerOnLogin&#8221;, # &#8220;ShowServerManagerOnLogin&#8221;,<br \/>\n# &#8220;DisableShutdownTracker&#8221;, # &#8220;EnableShutdownTracker&#8221;,<br \/>\n# &#8220;DisablePasswordPolicy&#8221;, # &#8220;EnablePasswordPolicy&#8221;,<br \/>\n# &#8220;DisableCtrlAltDelLogin&#8221;, # &#8220;EnableCtrlAltDelLogin&#8221;,<br \/>\n# &#8220;DisableIEEnhancedSecurity&#8221;, # &#8220;EnableIEEnhancedSecurity&#8221;,<\/p>\n<p># Disable Telemetry<br \/>\nFunction DisableTelemetry {<br \/>\nWrite-Host &#8220;Disabling Telemetry&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\DataCollection&#8221; -Name &#8220;AllowTelemetry&#8221; -Type DWord -Value 0<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection&#8221; -Name &#8220;AllowTelemetry&#8221; -Type DWord -Value 0<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Policies\\DataCollection&#8221; -Name &#8220;AllowTelemetry&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Disable Wi-Fi Sense<br \/>\nFunction DisableWiFiSense {<br \/>\nWrite-Host &#8220;Disabling Wi-Fi Sense&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\default\\WiFi\\AllowWiFiHotSpotReporting&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\default\\WiFi\\AllowWiFiHotSpotReporting&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\default\\WiFi\\AllowWiFiHotSpotReporting&#8221; -Name &#8220;Value&#8221; -Type DWord -Value 0<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\default\\WiFi\\AllowAutoConnectToWiFiSenseHotspots&#8221; -Name &#8220;Value&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Disable SmartScreen Filter<br \/>\nFunction DisableSmartScreen {<br \/>\nWrite-Host &#8220;Disabling SmartScreen Filter&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer&#8221; -Name &#8220;SmartScreenEnabled&#8221; -Type String -Value &#8220;Off&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AppHost&#8221; -Name &#8220;EnableWebContentEvaluation&#8221; -Type DWord -Value 0<br \/>\n$edge = (Get-AppxPackage -AllUsers &#8220;Microsoft.MicrosoftEdge&#8221;).PackageFamilyName<br \/>\nIf (!(Test-Path &#8220;HKCU:\\SOFTWARE\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\CurrentVersion\\AppContainer\\Storage\\$edge\\MicrosoftEdge\\PhishingFilter&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKCU:\\SOFTWARE\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\CurrentVersion\\AppContainer\\Storage\\$edge\\MicrosoftEdge\\PhishingFilter&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\CurrentVersion\\AppContainer\\Storage\\$edge\\MicrosoftEdge\\PhishingFilter&#8221; -Name &#8220;EnabledV9&#8221; -Type DWord -Value 0<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\CurrentVersion\\AppContainer\\Storage\\$edge\\MicrosoftEdge\\PhishingFilter&#8221; -Name &#8220;PreventOverride&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Disable Web Search in Start Menu<br \/>\nFunction DisableWebSearch {<br \/>\nWrite-Host &#8220;Disabling Bing Search in Start Menu&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Search&#8221; -Name &#8220;BingSearchEnabled&#8221; -Type DWord -Value 0<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Search&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Search&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Search&#8221; -Name &#8220;DisableWebSearch&#8221; -Type DWord -Value 1<br \/>\n}<\/p>\n<p># Disable Start Menu suggestions<br \/>\nFunction DisableStartSuggestions {<br \/>\nWrite-Host &#8220;Disabling Start Menu suggestions&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager&#8221; -Name &#8220;SystemPaneSuggestionsEnabled&#8221; -Type DWord -Value 0<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager&#8221; -Name &#8220;SilentInstalledAppsEnabled&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Disable Location Tracking<br \/>\nFunction DisableLocationTracking {<br \/>\nWrite-Host &#8220;Disabling Location Tracking&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Sensor\\Overrides\\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}&#8221; -Name &#8220;SensorPermissionState&#8221; -Type DWord -Value 0<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SYSTEM\\CurrentControlSet\\Services\\lfsvc\\Service\\Configuration&#8221; -Name &#8220;Status&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Disable Feedback<br \/>\nFunction DisableFeedback {<br \/>\nWrite-Host &#8220;Disabling Feedback&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Siuf\\Rules&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Siuf\\Rules&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Siuf\\Rules&#8221; -Name &#8220;NumberOfSIUFInPeriod&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Disable Advertising ID<br \/>\nFunction DisableAdvertisingID {<br \/>\nWrite-Host &#8220;Disabling Advertising ID&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AdvertisingInfo&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AdvertisingInfo&#8221; | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AdvertisingInfo&#8221; -Name &#8220;Enabled&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Disable Cortana<br \/>\nFunction DisableCortana {<br \/>\nWrite-Host &#8220;Disabling Cortana&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Personalization\\Settings&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Personalization\\Settings&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Personalization\\Settings&#8221; -Name &#8220;AcceptedPrivacyPolicy&#8221; -Type DWord -Value 0<br \/>\nIf (!(Test-Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\InputPersonalization&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\InputPersonalization&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\InputPersonalization&#8221; -Name &#8220;RestrictImplicitTextCollection&#8221; -Type DWord -Value 1<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\InputPersonalization&#8221; -Name &#8220;RestrictImplicitInkCollection&#8221; -Type DWord -Value 1<br \/>\nIf (!(Test-Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\InputPersonalization\\TrainedDataStore&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\InputPersonalization\\TrainedDataStore&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\InputPersonalization\\TrainedDataStore&#8221; -Name &#8220;HarvestContacts&#8221; -Type DWord -Value 0<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Search&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Search&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Search&#8221; -Name &#8220;AllowCortana&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Disable Error reporting<br \/>\nFunction DisableErrorReporting {<br \/>\nWrite-Host &#8220;Disabling Error reporting&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting&#8221; -Name &#8220;Disabled&#8221; -Type DWord -Value 1<br \/>\n}<\/p>\n<p># Enable Error reporting<br \/>\nFunction EnableErrorReporting {<br \/>\nWrite-Host &#8220;Enabling Error reporting&#8230;&#8221;<br \/>\nRemove-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting&#8221; -Name &#8220;Disabled&#8221; -ErrorAction SilentlyContinue<br \/>\n}<\/p>\n<p># Restrict Windows Update P2P only to local network<br \/>\nFunction RestrictUpdateP2P {<br \/>\nWrite-Host &#8220;Restricting Windows Update P2P only to local network&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DeliveryOptimization\\Config&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DeliveryOptimization\\Config&#8221; | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DeliveryOptimization\\Config&#8221; -Name &#8220;DODownloadMode&#8221; -Type DWord -Value 1<br \/>\nIf (!(Test-Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DeliveryOptimization&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DeliveryOptimization&#8221; | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DeliveryOptimization&#8221; -Name &#8220;SystemSettingsDownloadMode&#8221; -Type DWord -Value 3<br \/>\n}<\/p>\n<p># Remove AutoLogger file and restrict directory<br \/>\nFunction DisableAutoLogger {<br \/>\nWrite-Host &#8220;Removing AutoLogger file and restricting directory&#8230;&#8221;<br \/>\n$autoLoggerDir = &#8220;$env:PROGRAMDATA\\Microsoft\\Diagnosis\\ETLLogs\\AutoLogger&#8221;<br \/>\nIf (Test-Path &#8220;$autoLoggerDir\\AutoLogger-Diagtrack-Listener.etl&#8221;) {<br \/>\nRemove-Item &#8220;$autoLoggerDir\\AutoLogger-Diagtrack-Listener.etl&#8221;<br \/>\n}<br \/>\nicacls $autoLoggerDir \/deny SYSTEM:`(OI`)`(CI`)F | Out-Null<br \/>\n}<\/p>\n<p># Stop and disable Diagnostics Tracking Service<br \/>\nFunction DisableDiagTrack {<br \/>\nWrite-Host &#8220;Stopping and disabling Diagnostics Tracking Service&#8230;&#8221;<br \/>\nStop-Service &#8220;DiagTrack&#8221; -WarningAction SilentlyContinue<br \/>\nSet-Service &#8220;DiagTrack&#8221; -StartupType Disabled<br \/>\n}<\/p>\n<p># Stop and disable WAP Push Service<br \/>\nFunction DisableWAPPush {<br \/>\nWrite-Host &#8220;Stopping and disabling WAP Push Service&#8230;&#8221;<br \/>\nStop-Service &#8220;dmwappushservice&#8221; -WarningAction SilentlyContinue<br \/>\nSet-Service &#8220;dmwappushservice&#8221; -StartupType Disabled<br \/>\n}<\/p>\n<p># Lower UAC level<br \/>\nFunction LowerUAC {<br \/>\nWrite-Host &#8220;Lowering UAC level&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System&#8221; -Name &#8220;ConsentPromptBehaviorAdmin&#8221; -Type DWord -Value 0<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System&#8221; -Name &#8220;PromptOnSecureDesktop&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Enable sharing mapped drives between users<br \/>\nFunction EnableSharingMappedDrives {<br \/>\nWrite-Host &#8220;Enabling sharing mapped drives between users&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System&#8221; -Name &#8220;EnableLinkedConnections&#8221; -Type DWord -Value 1<br \/>\n}<\/p>\n<p># Disable sharing mapped drives between users<br \/>\nFunction DisableSharingMappedDrives {<br \/>\nWrite-Host &#8220;Disabling sharing mapped drives between users&#8230;&#8221;<br \/>\nRemove-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System&#8221; -Name &#8220;EnableLinkedConnections&#8221; -ErrorAction SilentlyContinue<br \/>\n}<\/p>\n<p># Disable implicit administrative shares<br \/>\nFunction DisableAdminShares {<br \/>\nWrite-Host &#8220;Disabling implicit administrative shares&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters&#8221; -Name &#8220;AutoShareWks&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Disable obsolete SMB 1.0 protocol<br \/>\nFunction DisableSMB1 {<br \/>\nWrite-Host &#8220;Disabling SMB 1.0 protocol&#8230;&#8221;<br \/>\nSet-SmbServerConfiguration -EnableSMB1Protocol $false -Force<br \/>\n}<\/p>\n<p># Set current network profile to private (allow file sharing, device discovery, etc.)<br \/>\nFunction SetCurrentNetworkPrivate {<br \/>\nWrite-Host &#8220;Setting current network profile to private&#8230;&#8221;<br \/>\nSet-NetConnectionProfile -NetworkCategory Private<br \/>\n}<\/p>\n<p># Set unknown networks profile to private (allow file sharing, device discovery, etc.)<br \/>\nFunction SetUnknownNetworksPrivate {<br \/>\nWrite-Host &#8220;Setting unknown networks profile to private&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\NetworkList\\Signatures\\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\NetworkList\\Signatures\\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\NetworkList\\Signatures\\010103000F0000F0010000000F0000F0C967A3643C3AD745950DA7859209176EF5B87C875FA20DF21951640E807D7C24&#8221; -Name &#8220;Category&#8221; -Type DWord -Value 1<br \/>\n}<\/p>\n<p># Disable Firewall<br \/>\nFunction DisableFirewall {<br \/>\nWrite-Host &#8220;Disabling Firewall&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\WindowsFirewall\\StandardProfile&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\WindowsFirewall\\StandardProfile&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\WindowsFirewall\\StandardProfile&#8221; -Name &#8220;EnableFirewall&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Disable Windows Defender<br \/>\nFunction DisableDefender {<br \/>\nWrite-Host &#8220;Disabling Windows Defender&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows Defender&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows Defender&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows Defender&#8221; -Name &#8220;DisableAntiSpyware&#8221; -Type DWord -Value 1<br \/>\nRemove-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run&#8221; -Name &#8220;SecurityHealth&#8221; -ErrorAction SilentlyContinue<br \/>\n}<\/p>\n<p># Enable Windows Defender<br \/>\nFunction EnableDefender {<br \/>\nWrite-Host &#8220;Enabling Windows Defender&#8230;&#8221;<br \/>\nRemove-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows Defender&#8221; -Name &#8220;DisableAntiSpyware&#8221; -ErrorAction SilentlyContinue<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run&#8221; -Name &#8220;SecurityHealth&#8221; -Type ExpandString -Value &#8220;`&#8221;%ProgramFiles%\\Windows Defender\\MSASCuiL.exe`&#8221;&#8221;<br \/>\n}<\/p>\n<p># Disable offering of Malicious Software Removal Tool through Windows Update<br \/>\nFunction DisableUpdateMSRT {<br \/>\nWrite-Host &#8220;Disabling Malicious Software Removal Tool offering&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\MRT&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\MRT&#8221; | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\MRT&#8221; -Name &#8220;DontOfferThroughWUAU&#8221; -Type DWord -Value 1<br \/>\n}<\/p>\n<p># Disable offering of drivers through Windows Update<br \/>\nFunction DisableUpdateDriver {<br \/>\nWrite-Host &#8220;Disabling driver offering through Windows Update&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching&#8221; -Name &#8220;SearchOrderConfig&#8221; -Type DWord -Value 0<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate&#8221; | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate&#8221; -Name &#8220;ExcludeWUDriversInQualityUpdate&#8221; -Type DWord -Value 1<br \/>\n}<\/p>\n<p># Disable Windows Update automatic restart<br \/>\nFunction DisableUpdateRestart {<br \/>\nWrite-Host &#8220;Disabling Windows Update automatic restart&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\WindowsUpdate\\UX\\Settings&#8221; -Name &#8220;UxOption&#8221; -Type DWord -Value 1<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU&#8221; -Name &#8220;NoAutoRebootWithLoggedOnUsers&#8221; -Type DWord -Value 1<br \/>\n}<\/p>\n<p># Stop and disable Home Groups services &#8211; Not applicable to Server<br \/>\nFunction DisableHomeGroups {<br \/>\nWrite-Host &#8220;Stopping and disabling Home Groups services&#8230;&#8221;<br \/>\nStop-Service &#8220;HomeGroupListener&#8221; -WarningAction SilentlyContinue<br \/>\nSet-Service &#8220;HomeGroupListener&#8221; -StartupType Disabled<br \/>\nStop-Service &#8220;HomeGroupProvider&#8221; -WarningAction SilentlyContinue<br \/>\nSet-Service &#8220;HomeGroupProvider&#8221; -StartupType Disabled<br \/>\n}<\/p>\n<p># Enable and start Home Groups services &#8211; Not applicable to Server<br \/>\nFunction EnableHomeGroups {<br \/>\nWrite-Host &#8220;Starting and enabling Home Groups services&#8230;&#8221;<br \/>\nSet-Service &#8220;HomeGroupListener&#8221; -StartupType Manual<br \/>\nSet-Service &#8220;HomeGroupProvider&#8221; -StartupType Manual<br \/>\nStart-Service &#8220;HomeGroupProvider&#8221; -WarningAction SilentlyContinue<br \/>\n}<\/p>\n<p># Disable Remote Assistance &#8211; Not applicable to Server (unless Remote Assistance is explicitly installed)<br \/>\nFunction DisableRemoteAssistance {<br \/>\nWrite-Host &#8220;Disabling Remote Assistance&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Remote Assistance&#8221; -Name &#8220;fAllowToGetHelp&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Disable Autoplay<br \/>\nFunction DisableAutoplay {<br \/>\nWrite-Host &#8220;Disabling Autoplay&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\AutoplayHandlers&#8221; -Name &#8220;DisableAutoplay&#8221; -Type DWord -Value 1<br \/>\n}<\/p>\n<p># Disable Autorun for all drives<br \/>\nFunction DisableAutorun {<br \/>\nWrite-Host &#8220;Disabling Autorun for all drives&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer&#8221; | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer&#8221; -Name &#8220;NoDriveTypeAutoRun&#8221; -Type DWord -Value 255<br \/>\n}<\/p>\n<p># Disable scheduled defragmentation task<br \/>\nFunction DisableDefragmentation {<br \/>\nWrite-Host &#8220;Disabling scheduled defragmentation&#8230;&#8221;<br \/>\nDisable-ScheduledTask -TaskName &#8220;\\Microsoft\\Windows\\Defrag\\ScheduledDefrag&#8221; | Out-Null<br \/>\n}<\/p>\n<p># Stop and disable Superfetch service &#8211; Not applicable to Server<br \/>\nFunction DisableSuperfetch {<br \/>\nWrite-Host &#8220;Stopping and disabling Superfetch service&#8230;&#8221;<br \/>\nStop-Service &#8220;SysMain&#8221; -WarningAction SilentlyContinue<br \/>\nSet-Service &#8220;SysMain&#8221; -StartupType Disabled<br \/>\n}<\/p>\n<p># Start and enable Superfetch service &#8211; Not applicable to Server<br \/>\nFunction EnableSuperfetch {<br \/>\nWrite-Host &#8220;Starting and enabling Superfetch service&#8230;&#8221;<br \/>\nSet-Service &#8220;SysMain&#8221; -StartupType Automatic<br \/>\nStart-Service &#8220;SysMain&#8221; -WarningAction SilentlyContinue<br \/>\n}<\/p>\n<p># Stop and disable Windows Search indexing service<br \/>\nFunction DisableIndexing {<br \/>\nWrite-Host &#8220;Stopping and disabling Windows Search indexing service&#8230;&#8221;<br \/>\nStop-Service &#8220;WSearch&#8221; -WarningAction SilentlyContinue<br \/>\nSet-Service &#8220;WSearch&#8221; -StartupType Disabled<br \/>\n}<\/p>\n<p># Disable Action Center<br \/>\nFunction DisableActionCenter {<br \/>\nWrite-Host &#8220;Disabling Action Center&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer&#8221; | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer&#8221; -Name &#8220;DisableNotificationCenter&#8221; -Type DWord -Value 1<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\PushNotifications&#8221; -Name &#8220;ToastEnabled&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Enable Action Center<br \/>\nFunction EnableActionCenter {<br \/>\nWrite-Host &#8220;Enabling Action Center&#8230;&#8221;<br \/>\nRemove-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer&#8221; -Name &#8220;DisableNotificationCenter&#8221; -ErrorAction SilentlyContinue<br \/>\nRemove-ItemProperty -Path &#8220;HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\PushNotifications&#8221; -Name &#8220;ToastEnabled&#8221; -ErrorAction SilentlyContinue<br \/>\n}<\/p>\n<p># Disable Lock screen<br \/>\nFunction DisableLockScreen {<br \/>\nWrite-Host &#8220;Disabling Lock screen&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Personalization&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Personalization&#8221; | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Personalization&#8221; -Name &#8220;NoLockScreen&#8221; -Type DWord -Value 1<br \/>\n}<\/p>\n<p># Disable NumLock after startup<br \/>\nFunction DisableNumlock {<br \/>\nWrite-Host &#8220;Disabling NumLock after startup&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKU:&#8221;)) {<br \/>\nNew-PSDrive -Name HKU -PSProvider Registry -Root HKEY_USERS | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKU:\\.DEFAULT\\Control Panel\\Keyboard&#8221; -Name &#8220;InitialKeyboardIndicators&#8221; -Type DWord -Value 2147483648<br \/>\nAdd-Type -AssemblyName System.Windows.Forms<br \/>\nIf ([System.Windows.Forms.Control]::IsKeyLocked(&#8216;NumLock&#8217;)) {<br \/>\n$wsh = New-Object -ComObject WScript.Shell<br \/>\n$wsh.SendKeys(&#8216;{NUMLOCK}&#8217;)<br \/>\n}<br \/>\n}<\/p>\n<p># Disable OneDrive<br \/>\nFunction DisableOneDrive {<br \/>\nWrite-Host &#8220;Disabling OneDrive&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\OneDrive&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\OneDrive&#8221; | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\OneDrive&#8221; -Name &#8220;DisableFileSyncNGSC&#8221; -Type DWord -Value 1<br \/>\n}<\/p>\n<p># Uninstall default Microsoft applications<br \/>\nFunction UninstallMsftBloat {<br \/>\nWrite-Host &#8220;Uninstalling default Microsoft applications&#8230;&#8221;<br \/>\nGet-AppxPackage &#8220;Microsoft.3DBuilder&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.BingFinance&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.BingNews&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.BingSports&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.BingWeather&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.Getstarted&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.MicrosoftOfficeHub&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.MicrosoftSolitaireCollection&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.Office.OneNote&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.People&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.SkypeApp&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.Windows.Photos&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.WindowsAlarms&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.WindowsCamera&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;microsoft.windowscommunicationsapps&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.WindowsMaps&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.WindowsPhone&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.WindowsSoundRecorder&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.ZuneMusic&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.ZuneVideo&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.AppConnector&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.ConnectivityStore&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.Office.Sway&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.Messaging&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.CommsPhone&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.MicrosoftStickyNotes&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.OneConnect&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.WindowsFeedbackHub&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.MinecraftUWP&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.MicrosoftPowerBIForWindows&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.NetworkSpeedTest&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.MSPaint&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.Microsoft3DViewer&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.RemoteDesktop&#8221; | Remove-AppxPackage<br \/>\n}<\/p>\n<p># Install default Microsoft applications<br \/>\nFunction InstallMsftBloat {<br \/>\nWrite-Host &#8220;Installing default Microsoft applications&#8230;&#8221;<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.3DBuilder&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.BingFinance&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.BingNews&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.BingSports&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.BingWeather&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.Getstarted&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.MicrosoftOfficeHub&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.MicrosoftSolitaireCollection&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.Office.OneNote&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.People&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.SkypeApp&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.Windows.Photos&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.WindowsAlarms&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.WindowsCamera&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.windowscommunicationsapps&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.WindowsMaps&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.WindowsPhone&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.WindowsSoundRecorder&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.ZuneMusic&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.ZuneVideo&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.AppConnector&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.ConnectivityStore&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.Office.Sway&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.Messaging&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.CommsPhone&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.MicrosoftStickyNotes&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.OneConnect&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.WindowsFeedbackHub&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.MinecraftUWP&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.MicrosoftPowerBIForWindows&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.NetworkSpeedTest&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.MSPaint&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.Microsoft3DViewer&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.RemoteDesktop&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\n}<\/p>\n<p>Get-AppxPackage &#8220;9E2F88E3.Twitter&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;king.com.CandyCrushSodaSaga&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;4DF9E0F8.Netflix&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Drawboard.DrawboardPDF&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;D52A8D61.FarmVille2CountryEscape&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;GAMELOFTSA.Asphalt8Airborne&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;flaregamesGmbH.RoyalRevolt2&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;AdobeSystemsIncorporated.AdobePhotoshopExpress&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;ActiproSoftwareLLC.562882FEEB491&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;D5EA27B7.Duolingo-LearnLanguagesforFree&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Facebook.Facebook&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;46928bounde.EclipseManager&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;A278AB0D.MarchofEmpires&#8221; | Remove-AppxPackage<br \/>\n}<\/p>\n<p># Install default third party applications<br \/>\nFunction InstallThirdPartyBloat {<br \/>\nGet-AppxPackage -AllUsers &#8220;9E2F88E3.Twitter&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;king.com.CandyCrushSodaSaga&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;4DF9E0F8.Netflix&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Drawboard.DrawboardPDF&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;D52A8D61.FarmVille2CountryEscape&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;GAMELOFTSA.Asphalt8Airborne&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;flaregamesGmbH.RoyalRevolt2&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;AdobeSystemsIncorporated.AdobePhotoshopExpress&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;ActiproSoftwareLLC.562882FEEB491&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;D5EA27B7.Duolingo-LearnLanguagesforFree&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Facebook.Facebook&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;46928bounde.EclipseManager&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;A278AB0D.MarchofEmpires&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\n}<\/p>\n<p># Uninstall Windows Store<br \/>\nFunction UninstallWindowsStore {<br \/>\nWrite-Host &#8220;Uninstalling Windows Store&#8230;&#8221;<br \/>\nGet-AppxPackage &#8220;Microsoft.DesktopAppInstaller&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.WindowsStore&#8221; | Remove-AppxPackage<br \/>\n}<\/p>\n<p># Install Windows Store<br \/>\nFunction InstallWindowsStore {<br \/>\nWrite-Host &#8220;Installing Windows Store&#8230;&#8221;<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.DesktopAppInstaller&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.WindowsStore&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\n}<\/p>\n<p># Disable installation of consumer experience applications<br \/>\nFunction DisableConsumerApps {<br \/>\nWrite-Host &#8220;Disabling installation of consumer experience applications&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent&#8221; -Name &#8220;DisableWindowsConsumerFeatures&#8221; -Type DWord -Value 1<br \/>\n}<\/p>\n<p># Enable installation of consumer experience applications<br \/>\nFunction EnableConsumerApps {<br \/>\nWrite-Host &#8220;Enabling installation of consumer experience applications&#8230;&#8221;<br \/>\nRemove-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent&#8221; -Name &#8220;DisableWindowsConsumerFeatures&#8221; -ErrorAction SilentlyContinue<br \/>\n}<\/p>\n<p># Disable Xbox features<br \/>\nFunction DisableXboxFeatures {<br \/>\nWrite-Host &#8220;Disabling Xbox features&#8230;&#8221;<br \/>\nGet-AppxPackage &#8220;Microsoft.XboxApp&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.XboxIdentityProvider&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.XboxSpeechToTextOverlay&#8221; | Remove-AppxPackage<br \/>\nGet-AppxPackage &#8220;Microsoft.XboxGameOverlay&#8221; | Remove-AppxPackage<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\System\\GameConfigStore&#8221; -Name &#8220;GameDVR_Enabled&#8221; -Type DWord -Value 0<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\GameDVR&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\GameDVR&#8221; | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\GameDVR&#8221; -Name &#8220;AllowGameDVR&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Enable Xbox features<br \/>\nFunction EnableXboxFeatures {<br \/>\nWrite-Host &#8220;Enabling Xbox features&#8230;&#8221;<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.XboxApp&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.XboxIdentityProvider&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.XboxSpeechToTextOverlay&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nGet-AppxPackage -AllUsers &#8220;Microsoft.XboxGameOverlay&#8221; | ForEach {Add-AppxPackage -DisableDevelopmentMode -Register &#8220;$($_.InstallLocation)\\AppXManifest.xml&#8221;}<br \/>\nSet-ItemProperty -Path &#8220;HKCU:\\System\\GameConfigStore&#8221; -Name &#8220;GameDVR_Enabled&#8221; -Type DWord -Value 1<br \/>\nRemove-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\GameDVR&#8221; -Name &#8220;AllowGameDVR&#8221; -ErrorAction SilentlyContinue<br \/>\n}<\/p>\n<p># Uninstall Windows Media Player<br \/>\nFunction UninstallMediaPlayer {<br \/>\nWrite-Host &#8220;Uninstalling Windows Media Player&#8230;&#8221;<br \/>\nDisable-WindowsOptionalFeature -Online -FeatureName &#8220;WindowsMediaPlayer&#8221; -NoRestart -WarningAction SilentlyContinue | Out-Null<br \/>\n}<\/p>\n<p># Uninstall Work Folders Client &#8211; Not applicable to Server<br \/>\nFunction UninstallWorkFolders {<br \/>\nWrite-Host &#8220;Uninstalling Work Folders Client&#8230;&#8221;<br \/>\nDisable-WindowsOptionalFeature -Online -FeatureName &#8220;WorkFolders-Client&#8221; -NoRestart -WarningAction SilentlyContinue | Out-Null<br \/>\n}<\/p>\n<p># Install Linux Subsystem &#8211; Applicable to RS1 or newer, not applicable to Server yet<br \/>\nFunction InstallLinuxSubsystem {<br \/>\nWrite-Host &#8220;Installing Linux Subsystem&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AppModelUnlock&#8221; -Name &#8220;AllowDevelopmentWithoutDevLicense&#8221; -Type DWord -Value 1<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AppModelUnlock&#8221; -Name &#8220;AllowAllTrustedApps&#8221; -Type DWord -Value 1<br \/>\nEnable-WindowsOptionalFeature -Online -FeatureName &#8220;Microsoft-Windows-Subsystem-Linux&#8221; -NoRestart -WarningAction SilentlyContinue | Out-Null<br \/>\n}<\/p>\n<p># Uninstall Linux Subsystem &#8211; Applicable to RS1 or newer, not applicable to Server yet<br \/>\nFunction UninstallLinuxSubsystem {<br \/>\nWrite-Host &#8220;Uninstalling Linux Subsystem&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AppModelUnlock&#8221; -Name &#8220;AllowDevelopmentWithoutDevLicense&#8221; -Type DWord -Value 0<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AppModelUnlock&#8221; -Name &#8220;AllowAllTrustedApps&#8221; -Type DWord -Value 0<br \/>\nDisable-WindowsOptionalFeature -Online -FeatureName &#8220;Microsoft-Windows-Subsystem-Linux&#8221; -NoRestart -WarningAction SilentlyContinue | Out-Null<br \/>\n}<\/p>\n<p># Set Photo Viewer association for bmp, gif, jpg, png and tif<br \/>\nFunction SetPhotoViewerAssociation {<br \/>\nWrite-Host &#8220;Setting Photo Viewer association for bmp, gif, jpg, png and tif&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKCR:&#8221;)) {<br \/>\nNew-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null<br \/>\n}<br \/>\nForEach ($type in @(&#8220;Paint.Picture&#8221;, &#8220;giffile&#8221;, &#8220;jpegfile&#8221;, &#8220;pngfile&#8221;)) {<br \/>\nNew-Item -Path $(&#8220;HKCR:\\$type\\shell\\open&#8221;) -Force | Out-Null<br \/>\nNew-Item -Path $(&#8220;HKCR:\\$type\\shell\\open\\command&#8221;) | Out-Null<br \/>\nSet-ItemProperty -Path $(&#8220;HKCR:\\$type\\shell\\open&#8221;) -Name &#8220;MuiVerb&#8221; -Type ExpandString -Value &#8220;@%ProgramFiles%\\Windows Photo Viewer\\photoviewer.dll,-3043&#8221;<br \/>\nSet-ItemProperty -Path $(&#8220;HKCR:\\$type\\shell\\open\\command&#8221;) -Name &#8220;(Default)&#8221; -Type ExpandString -Value &#8220;%SystemRoot%\\System32\\rundll32.exe `&#8221;%ProgramFiles%\\Windows Photo Viewer\\PhotoViewer.dll`&#8221;, ImageView_Fullscreen %1&#8243;<br \/>\n}<br \/>\n}<\/p>\n<p># Unset Photo Viewer association for bmp, gif, jpg, png and tif<br \/>\nFunction UnsetPhotoViewerAssociation {<br \/>\nWrite-Host &#8220;Unsetting Photo Viewer association for bmp, gif, jpg, png and tif&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKCR:&#8221;)) {<br \/>\nNew-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null<br \/>\n}<br \/>\nRemove-Item -Path &#8220;HKCR:\\Paint.Picture\\shell\\open&#8221; -Recurse -ErrorAction SilentlyContinue<br \/>\nRemove-ItemProperty -Path &#8220;HKCR:\\giffile\\shell\\open&#8221; -Name &#8220;MuiVerb&#8221; -ErrorAction SilentlyContinue<br \/>\nSet-ItemProperty -Path &#8220;HKCR:\\giffile\\shell\\open&#8221; -Name &#8220;CommandId&#8221; -Type String -Value &#8220;IE.File&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKCR:\\giffile\\shell\\open\\command&#8221; -Name &#8220;(Default)&#8221; -Type String -Value &#8220;`&#8221;$env:SystemDrive\\Program Files\\Internet Explorer\\iexplore.exe`&#8221; %1&#8243;<br \/>\nSet-ItemProperty -Path &#8220;HKCR:\\giffile\\shell\\open\\command&#8221; -Name &#8220;DelegateExecute&#8221; -Type String -Value &#8220;{17FE9752-0B5A-4665-84CD-569794602F5C}&#8221;<br \/>\nRemove-Item -Path &#8220;HKCR:\\jpegfile\\shell\\open&#8221; -Recurse -ErrorAction SilentlyContinue<br \/>\nRemove-Item -Path &#8220;HKCR:\\pngfile\\shell\\open&#8221; -Recurse -ErrorAction SilentlyContinue<br \/>\n}<\/p>\n<p># Add Photo Viewer to &#8220;Open with&#8230;&#8221;<br \/>\nFunction AddPhotoViewerOpenWith {<br \/>\nWrite-Host &#8220;Adding Photo Viewer to `&#8221;Open with&#8230;`&#8221;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKCR:&#8221;)) {<br \/>\nNew-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null<br \/>\n}<br \/>\nNew-Item -Path &#8220;HKCR:\\Applications\\photoviewer.dll\\shell\\open\\command&#8221; -Force | Out-Null<br \/>\nNew-Item -Path &#8220;HKCR:\\Applications\\photoviewer.dll\\shell\\open\\DropTarget&#8221; -Force | Out-Null<br \/>\nSet-ItemProperty -Path &#8220;HKCR:\\Applications\\photoviewer.dll\\shell\\open&#8221; -Name &#8220;MuiVerb&#8221; -Type String -Value &#8220;@photoviewer.dll,-3043&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKCR:\\Applications\\photoviewer.dll\\shell\\open\\command&#8221; -Name &#8220;(Default)&#8221; -Type ExpandString -Value &#8220;%SystemRoot%\\System32\\rundll32.exe `&#8221;%ProgramFiles%\\Windows Photo Viewer\\PhotoViewer.dll`&#8221;, ImageView_Fullscreen %1&#8243;<br \/>\nSet-ItemProperty -Path &#8220;HKCR:\\Applications\\photoviewer.dll\\shell\\open\\DropTarget&#8221; -Name &#8220;Clsid&#8221; -Type String -Value &#8220;{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}&#8221;<br \/>\n}<\/p>\n<p># Remove Photo Viewer from &#8220;Open with&#8230;&#8221;<br \/>\nFunction RemovePhotoViewerOpenWith {<br \/>\nWrite-Host &#8220;Removing Photo Viewer from `&#8221;Open with&#8230;`&#8221;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKCR:&#8221;)) {<br \/>\nNew-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null<br \/>\n}<br \/>\nRemove-Item -Path &#8220;HKCR:\\Applications\\photoviewer.dll\\shell\\open&#8221; -Recurse -ErrorAction SilentlyContinue<br \/>\n}<\/p>\n<p># Enable F8 boot menu options<br \/>\nFunction EnableF8BootMenu {<br \/>\nWrite-Host &#8220;Enabling F8 boot menu options&#8230;&#8221;<br \/>\nbcdedit \/set `{current`} bootmenupolicy Legacy | Out-Null<br \/>\n}<\/p>\n<p># Disable F8 boot menu options<br \/>\nFunction DisableF8BootMenu {<br \/>\nWrite-Host &#8220;Disabling F8 boot menu options&#8230;&#8221;<br \/>\nbcdedit \/set `{current`} bootmenupolicy Standard | Out-Null<br \/>\n}<\/p>\n<p># Set Data Execution Prevention (DEP) policy to OptOut<br \/>\nFunction SetDEPOptOut {<br \/>\nWrite-Host &#8220;Setting Data Execution Prevention (DEP) policy to OptOut&#8230;&#8221;<br \/>\nbcdedit \/set `{current`} nx OptOut | Out-Null<br \/>\n}<\/p>\n<p># Set Data Execution Prevention (DEP) policy to OptIn<br \/>\nFunction SetDEPOptIn {<br \/>\nWrite-Host &#8220;Setting Data Execution Prevention (DEP) policy to OptIn&#8230;&#8221;<br \/>\nbcdedit \/set `{current`} nx OptIn | Out-Null<br \/>\n}<\/p>\n<p>##########<br \/>\n# Server specific Tweaks<br \/>\n##########<\/p>\n<p># Hide Server Manager after login<br \/>\nFunction HideServerManagerOnLogin {<br \/>\nWrite-Host &#8220;Hiding Server Manager after login&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Server\\ServerManager&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Server\\ServerManager&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Server\\ServerManager&#8221; -Name &#8220;DoNotOpenAtLogon&#8221; -Type DWord -Value 1<br \/>\n}<\/p>\n<p># Hide Server Manager after login<br \/>\nFunction ShowServerManagerOnLogin {<br \/>\nWrite-Host &#8220;Showing Server Manager after login&#8230;&#8221;<br \/>\nRemove-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Server\\ServerManager&#8221; -Name &#8220;DoNotOpenAtLogon&#8221; -ErrorAction SilentlyContinue<br \/>\n}<\/p>\n<p># Disable Shutdown Event Tracker<br \/>\nFunction DisableShutdownTracker {<br \/>\nWrite-Host &#8220;Disabling Shutdown Event Tracker&#8230;&#8221;<br \/>\nIf (!(Test-Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows NT\\Reliability&#8221;)) {<br \/>\nNew-Item -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows NT\\Reliability&#8221; -Force | Out-Null<br \/>\n}<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows NT\\Reliability&#8221; -Name &#8220;ShutdownReasonOn&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Enable password complexity and maximum age requirements<br \/>\nFunction EnablePasswordPolicy {<br \/>\nWrite-Host &#8220;Enabling password complexity and maximum age requirements&#8230;&#8221;<br \/>\n$tmpfile = New-TemporaryFile<br \/>\nsecedit \/export \/cfg $tmpfile \/quiet<br \/>\n(Get-Content $tmpfile).Replace(&#8220;PasswordComplexity = 0&#8221;, &#8220;PasswordComplexity = 1&#8221;).Replace(&#8220;MaximumPasswordAge = -1&#8221;, &#8220;MaximumPasswordAge = 42&#8221;) | Out-File $tmpfile<br \/>\nsecedit \/configure \/db &#8220;$env:SYSTEMROOT\\security\\database\\local.sdb&#8221; \/cfg $tmpfile \/areas SECURITYPOLICY | Out-Null<br \/>\nRemove-Item -Path $tmpfile<br \/>\n}<\/p>\n<p># Disable Ctrl+Alt+Del requirement before login<br \/>\nFunction DisableCtrlAltDelLogin {<br \/>\nWrite-Host &#8220;Disabling Ctrl+Alt+Del requirement before login&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System&#8221; -Name &#8220;DisableCAD&#8221; -Type DWord -Value 1<br \/>\n}<\/p>\n<p># Enable Ctrl+Alt+Del requirement before login<br \/>\nFunction EnableCtrlAltDelLogin {<br \/>\nWrite-Host &#8220;Enabling Ctrl+Alt+Del requirement before login&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System&#8221; -Name &#8220;DisableCAD&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n<p># Disable Internet Explorer Enhanced Security Configuration (IE ESC)<br \/>\nFunction DisableIEEnhancedSecurity {<br \/>\nWrite-Host &#8220;Disabling Internet Explorer Enhanced Security Configuration (IE ESC)&#8230;&#8221;<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}&#8221; -Name &#8220;IsInstalled&#8221; -Type DWord -Value 0<br \/>\nSet-ItemProperty -Path &#8220;HKLM:\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}&#8221; -Name &#8220;IsInstalled&#8221; -Type DWord -Value 0<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tl;dr &#8211; \u00a0Download Powershell script .Open Powershell as admin.Navigate to your download directory. Mark it as executable with\u00a0 &#8216; Set-ExecutionPolicy RemoteSigned\u00a0 &#8216; and execute the script. &#8220;DisableTelemetry&#8221;, # &#8220;EnableTelemetry&#8221;, &#8220;DisableWiFiSense&#8221;, # &#8220;EnableWiFiSense&#8221;, # &#8220;DisableSmartScreen&#8221;, # &#8220;EnableSmartScreen&#8221;, &#8220;DisableWebSearch&#8221;, # &#8220;EnableWebSearch&#8221;, &#8220;DisableStartSuggestions&#8221;, # &#8220;EnableStartSuggestions&#8221;, &#8220;DisableLocationTracking&#8221;, # &#8220;EnableLocationTracking&#8221;, &#8220;DisableFeedback&#8221;, # &#8220;EnableFeedback&#8221;, &#8220;DisableAdvertisingID&#8221;, # &#8220;EnableAdvertisingID&#8221;, &#8220;DisableCortana&#8221;, # &#8220;EnableCortana&#8221;, &#8220;DisableErrorReporting&#8221;, &#8230;<\/p>\n<p><a href=\"https:\/\/d1m0.com\/?p=124\" class=\"more-link\">Continue reading &lsquo;Privacy &#8230;please&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"aside","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-124","post","type-post","status-publish","format-aside","hentry","category-windows","post_format-post-format-aside"],"_links":{"self":[{"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/posts\/124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/d1m0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=124"}],"version-history":[{"count":10,"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/posts\/124\/revisions"}],"predecessor-version":[{"id":300,"href":"https:\/\/d1m0.com\/index.php?rest_route=\/wp\/v2\/posts\/124\/revisions\/300"}],"wp:attachment":[{"href":"https:\/\/d1m0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/d1m0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/d1m0.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}