Revert Changes 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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"