Revert Changes 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. #This function will revert the changes you made when running the Start-Debloat function.
  2. #This line reinstalls all of the bloatware that was removed
  3. Get-AppxPackage -AllUsers | ForEach {Add-AppxPackage -Verbose -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
  4. #Tells Windows to enable your advertising information.
  5. Write-Output "Re-enabling key to show advertisement information"
  6. $Advertising = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo"
  7. If (Test-Path $Advertising) {
  8. Set-ItemProperty $Advertising Enabled -Value 1
  9. }
  10. #Enables Cortana to be used as part of your Windows Search Function
  11. Write-Output "Re-enabling Cortana to be used in your Windows Search"
  12. $Search = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"
  13. If (Test-Path $Search) {
  14. Set-ItemProperty $Search AllowCortana -Value 1
  15. }
  16. #Re-enables the Windows Feedback Experience for sending anonymous data
  17. Write-Output "Re-enabling Windows Feedback Experience"
  18. $Period = "HKCU:\Software\Microsoft\Siuf\Rules"
  19. If (!(Test-Path $Period)) {
  20. New-Item $Period
  21. }
  22. Set-ItemProperty $Period PeriodInNanoSeconds -Value 1
  23. #Enables bloatware applications
  24. Write-Output "Adding Registry key to allow bloatware apps to return"
  25. $registryPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent"
  26. If (!(Test-Path $registryPath)) {
  27. New-Item $registryPath
  28. }
  29. Set-ItemProperty $registryPath DisableWindowsConsumerFeatures -Value 0
  30. #Changes Mixed Reality Portal Key 'FirstRunSucceeded' to 1
  31. Write-Output "Setting Mixed Reality Portal value to 1"
  32. $Holo = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Holographic"
  33. If (Test-Path $Holo) {
  34. Set-ItemProperty $Holo FirstRunSucceeded -Value 1
  35. }
  36. #Re-enables live tiles
  37. Write-Output "Enabling live tiles"
  38. $Live = "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications"
  39. If (!(Test-Path $Live)) {
  40. New-Item $Live
  41. }
  42. Set-ItemProperty $Live NoTileApplicationNotification -Value 0
  43. #Re-enables data collection
  44. Write-Output "Re-enabling data collection"
  45. $DataCollection = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection"
  46. If (!(Test-Path $DataCollection)) {
  47. New-Item $DataCollection
  48. }
  49. Set-ItemProperty $DataCollection AllowTelemetry -Value 1
  50. #Re-enables People Icon on Taskbar
  51. Write-Output "Enabling People icon on Taskbar"
  52. $People = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People"
  53. If (!(Test-Path $People)) {
  54. New-Item $People
  55. }
  56. Set-ItemProperty $People PeopleBand -Value 1
  57. #Re-enables suggestions on start menu
  58. Write-Output "Enabling suggestions on the Start Menu"
  59. $Suggestions = "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
  60. If (!(Test-Path $Suggestions)) {
  61. New-Item $Suggestions
  62. }
  63. Set-ItemProperty $Suggestions SystemPaneSuggestionsEnabled -Value 1
  64. #Re-enables scheduled tasks that were disabled when running the Debloat switch
  65. Write-Output "Enabling scheduled tasks that were disabled"
  66. Get-ScheduledTask XblGameSaveTaskLogon | Enable-ScheduledTask
  67. Get-ScheduledTask XblGameSaveTask | Enable-ScheduledTask
  68. Get-ScheduledTask Consolidator | Enable-ScheduledTask
  69. Get-ScheduledTask UsbCeip | Enable-ScheduledTask
  70. Get-ScheduledTask DmClient | Enable-ScheduledTask
  71. Get-ScheduledTask DmClientOnScenarioDownload | Enable-ScheduledTask
  72. Write-Output "Re-enabling and starting WAP Push Service"
  73. #Enable and start WAP Push Service
  74. Set-Service "dmwappushservice" -StartupType Automatic
  75. Start-Service "dmwappushservice"
  76. Write-Output "Re-enabling and starting the Diagnostics Tracking Service"
  77. #Enabling the Diagnostics Tracking Service
  78. Set-Service "DiagTrack" -StartupType Automatic
  79. Start-Service "DiagTrack"
  80. # # Re-Enable the showing of last used files and folders (luff)
  81. # Write-Output "Re-enabling keys to show last used files and folders"
  82. # $luffKeys = @(
  83. # "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{3134ef9c-6b18-4996-ad04-ed5912e00eb5}"
  84. # "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{3936E9E4-D92C-4EEE-A85A-BC16D5EA0819}"
  85. # )
  86. # ForEach ($luffKey in $luffKeys) {
  87. # If (! (Test-Path $lastUsedFiles)) {
  88. # Write-Output "Adding $luffKey to registry"
  89. # New-Item $luffKey
  90. # }
  91. # }
  92. # Write-Output "Re-enabling explorer to show last used files and folders"
  93. # $explorerLastUsed = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer"
  94. # Set-ItemProperty $explorerLastUsed HubMode -Value 0
  95. #
  96. # # Re-Enable AeroShake
  97. # Write-Output "Re-enabling AeroShake"
  98. # $aeroShake = "HKCU:\Software\Policies\Microsoft\Windows\Explorer"
  99. # Set-ItemProperty $aeroShake NoWindowMinimizingShortcuts -Value 0
  100. #
  101. # # Re-Locate Explorer LaunchTo
  102. # Write-Output "Re-Locate the Explorers Launch To (Entry Point)"
  103. # $LaunchTo = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
  104. # Set-ItemProperty $LaunchTo LaunchTo -Value 2