$EverythingorSpecific="Would you like to remove everything that was preinstalled on your Windows Machine? Select Yes to remove everything, or select No to remove apps via a blacklist."
$EdgePdf="Do you want to stop edge from taking over as the default PDF viewer?"
$EdgePdf2="Do you want to revert changes that disabled Edge as the default PDF viewer?"
$Reboot="For some of the changes to properly take effect it is recommended to reboot your machine. Would you like to restart?"
$OneDriveDelete="Do you want to uninstall One Drive?"
$Unpin="Do you want to unpin all items from the Start menu?"
$InstallNET="Do you want to install .NET 3.5?"
$LastUsedFilesFolders="Do you want to hide last used files and folders in Explorer?"
$LastUsedFilesFolders2="Do you want to show last used files and folders in Explorer?"
$ClearLastUsedFilesFolders="Do you want to clear last used files and folders?"
$AeroShake="Do you want to disable AeroShake?"
$AeroShake2="Do you want to re-enable AeroShake?"
$Prompt1=[Windows.MessageBox]::Show($Ask,"Debloat or Revert",$Button,$ErrorIco)
Switch($Prompt1){
#This will debloat Windows 10
Yes{
#Everything is specific prompt
$Prompt2=[Windows.MessageBox]::Show($EverythingorSpecific,"Everything or Specific",$Button,$Warn)
switch($Prompt2){
Yes{
#Creates a "drive" to access the HKCR (HKEY_CLASSES_ROOT)
Write-Host"Creating PSDrive 'HKCR' (HKEY_CLASSES_ROOT). This will be used for the duration of the script as it is necessary for the removal and modification of specific registry keys."
Write-Host"Checking to see if any Whitelisted Apps were removed, and if so re-adding them."
Start-Sleep1
FixWhitelistedApps
Start-Sleep1
Write-Host"Disabling Cortana from search, disabling feedback to Microsoft, and disabling scheduled tasks that are considered to be telemetry or unnecessary."
Protect-Privacy
Start-Sleep1
DisableCortana
Write-Host"Cortana disabled and removed from search, feedback to Microsoft has been disabled, and scheduled tasks are disabled."
Start-Sleep1
Write-Host"Stopping and disabling Diagnostics Tracking Service"
DisableDiagTrack
Write-Host"Diagnostics Tracking Service disabled"
Start-Sleep1
Write-Host"Disabling WAP push service"
DisableWAPPush
Start-Sleep1
Write-Host"Re-enabling DMWAppushservice if it was disabled"
CheckDMWService
Start-Sleep1
Write-Host"Removing 3D Objects from the 'My Computer' submenu in explorer"
Remove3dObjects
Start-Sleep1
}
No{
#Creates a "drive" to access the HKCR (HKEY_CLASSES_ROOT)
Write-Host"Creating PSDrive 'HKCR' (HKEY_CLASSES_ROOT). This will be used for the duration of the script as it is necessary for the removal and modification of specific registry keys."
Write-Host"Checking to see if any Whitelisted Apps were removed, and if so re-adding them."
Start-Sleep1
FixWhitelistedApps
Start-Sleep1
Write-Host"Disabling Cortana from search, disabling feedback to Microsoft, and disabling scheduled tasks that are considered to be telemetry or unnecessary."
Protect-Privacy
Start-Sleep1
DisableCortana
Write-Host"Cortana disabled and removed from search, feedback to Microsoft has been disabled, and scheduled tasks are disabled."
Start-Sleep1
Write-Host"Stopping and disabling Diagnostics Tracking Service"
DisableDiagTrack
Write-Host"Diagnostics Tracking Service disabled"
Start-Sleep1
Write-Host"Disabling WAP push service"
Start-Sleep1
DisableWAPPush
Write-Host"Re-enabling DMWAppushservice if it was disabled"
$EverythingorSpecific="Would you like to remove everything that was preinstalled on your Windows Machine? Select Yes to remove everything, or select No to remove apps via a blacklist."
$EdgePdf="Do you want to stop edge from taking over as the default PDF viewer?"
$EdgePdf2="Do you want to revert changes that disabled Edge as the default PDF viewer?"
$Reboot="For some of the changes to properly take effect it is recommended to reboot your machine. Would you like to restart?"
$OneDriveDelete="Do you want to uninstall One Drive?"
$Unpin="Do you want to unpin all items from the Start menu?"
$InstallNET="Do you want to install .NET 3.5?"
$LastUsedFilesFolders="Do you want to hide last used files and folders in Explorer?"
$LastUsedFilesFolders2="Do you want to show last used files and folders in Explorer?"
$ClearLastUsedFilesFolders="Do you want to clear last used files and folders?"
$AeroShake="Do you want to disable AeroShake?"
$AeroShake2="Do you want to re-enable AeroShake?"
$Prompt1=[Windows.MessageBox]::Show($Ask,"Debloat or Revert",$Button,$ErrorIco)
Switch($Prompt1){
#This will debloat Windows 10
Yes{
Write-Host"Initializing the installation of .NET 3.5..."
DISM/Online/Enable-Feature/FeatureName:NetFx3/All
Write-Host".NET 3.5 has been successfully installed!"
}
No{
Write-Host"Skipping .NET install."
}
}
# #Prompt asking if you want to deactivate Last Used Files and Folders
# $Prompt7 = [Windows.MessageBox]::Show($LastUsedFilesFolders, "Deactivate Last Used Files and Folders", $Button, $Warn)
# Switch ($Prompt7) {
# Yes {
# DisableLastUsedFilesAndFolders
# Write-Host "Last Used Files and Folders will no longer been shown!"
# }
# No {
# Write-Host "Skipping Hiding Last used Files and Folders."
# }
# }
#Everything is specific prompt
$Prompt2=[Windows.MessageBox]::Show($EverythingorSpecific,"Everything or Specific",$Button,$Warn)
switch($Prompt2){
Yes{
#Creates a "drive" to access the HKCR (HKEY_CLASSES_ROOT)
Write-Host"Creating PSDrive 'HKCR' (HKEY_CLASSES_ROOT). This will be used for the duration of the script as it is necessary for the removal and modification of specific registry keys."
Write-Host"Checking to see if any Whitelisted Apps were removed, and if so re-adding them."
Start-Sleep1
FixWhitelistedApps
Start-Sleep1
Write-Host"Disabling Cortana from search, disabling feedback to Microsoft, and disabling scheduled tasks that are considered to be telemetry or unnecessary."
Protect-Privacy
Start-Sleep1
DisableCortana
Write-Host"Cortana disabled and removed from search, feedback to Microsoft has been disabled, and scheduled tasks are disabled."
Start-Sleep1
Write-Host"Stopping and disabling Diagnostics Tracking Service"
DisableDiagTrack
Write-Host"Diagnostics Tracking Service disabled"
Start-Sleep1
Write-Host"Disabling WAP push service"
DisableWAPPush
Start-Sleep1
Write-Host"Re-enabling DMWAppushservice if it was disabled"
CheckDMWService
Start-Sleep1
Write-Host"Removing 3D Objects from the 'My Computer' submenu in explorer"
Remove3dObjects
Start-Sleep1
}
No{
#Creates a "drive" to access the HKCR (HKEY_CLASSES_ROOT)
Write-Host"Creating PSDrive 'HKCR' (HKEY_CLASSES_ROOT). This will be used for the duration of the script as it is necessary for the removal and modification of specific registry keys."
Write-Host"Checking to see if any Whitelisted Apps were removed, and if so re-adding them."
Start-Sleep1
FixWhitelistedApps
Start-Sleep1
Write-Host"Disabling Cortana from search, disabling feedback to Microsoft, and disabling scheduled tasks that are considered to be telemetry or unnecessary."
Protect-Privacy
Start-Sleep1
DisableCortana
Write-Host"Cortana disabled and removed from search, feedback to Microsoft has been disabled, and scheduled tasks are disabled."
Start-Sleep1
Write-Host"Stopping and disabling Diagnostics Tracking Service"
DisableDiagTrack
Write-Host"Diagnostics Tracking Service disabled"
Start-Sleep1
Write-Host"Disabling WAP push service"
Start-Sleep1
DisableWAPPush
Write-Host"Re-enabling DMWAppushservice if it was disabled"
Write-Host"Creating PSDrive 'HKCR' (HKEY_CLASSES_ROOT). This will be used for the duration of the script as it is necessary for the modification of specific registry keys."
Write-Host"Creating PSDrive 'HKCR' (HKEY_CLASSES_ROOT). This will be used for the duration of the script as it is necessary for the modification of specific registry keys."
if($Silent)
{
#Creates a "drive" to access the HKCR (HKEY_CLASSES_ROOT)
Write-Host"Creating PSDrive 'HKCR' (HKEY_CLASSES_ROOT). This will be used for the duration of the script as it is necessary for the removal and modification of specific registry keys."
Write-Host"Checking to see if any Whitelisted Apps were removed, and if so re-adding them."
FixWhitelistedApps
Write-Host"Disabling Cortana from search, disabling feedback to Microsoft, and disabling scheduled tasks that are considered to be telemetry or unnecessary."
Protect-Privacy
DisableCortana
Write-Host"Cortana disabled and removed from search, feedback to Microsoft has been disabled, and scheduled tasks are disabled."
Write-Host"Stopping and disabling Diagnostics Tracking Service"
DisableDiagTrack
Write-Host"Diagnostics Tracking Service disabled"
Write-Host"Disabling WAP push service"
DisableWAPPush
Write-Host"Re-enabling DMWAppushservice if it was disabled"
CheckDMWService
Write-Host"Removing 3D Objects from the 'My Computer' submenu in explorer"
Remove3dObjects
Stop-EdgePDF
Write-Host"Edge will no longer take over as the default PDF viewer."
UninstallOneDrive
Write-Host"OneDrive is now removed from the computer."
UnpinStart
Write-Host"Start Apps unpined."
Write-Host"Initializing the installation of .NET 3.5..."
DISM/Online/Enable-Feature/FeatureName:NetFx3/All
Write-Host".NET 3.5 has been successfully installed!"