Complete rename on `script files`, change script `temp folder` and small changes (#92)

* fix: console background color changing
- Add new background colors which works greatly with Powershell and Windows Terminal

* docs: update ISSUE_TEMPLATEs
- Log folder location
- change label to only Feature Request

* Fix: Tab 1 Panel 2 app order

* refactor: change script tmp folder to actually be on User Temp
- Get the Script Temp folder using a new function

* Delete remaining from old tmp\ folder

* arch: rename all powershell scripts to match PS naming
- Even if it isn't approved

* chore: remove unused code
- Install-HEVCSupport function which doesn't work anymore

* arch: rename remaining scripts
- Also fix an name warning from PSScriptAnalyzer
- Remove Main() functions

* style: change debloat script order
- Remove useless code from Remove-CapabilitiesList

* feat: remove old quick assist if the new one is already installed

* feat: Install Quick Assist by GUI
- Remove some console output which wasn't important

* BREAKING CHANGE: Attempt to correctly rename the remaining files (part 1)

* fix: Attempt to correctly rename the remaining files (part 2)
main
Plínio Larrubia 2 years ago committed by Plínio Larrubia
parent abfc5d2d30
commit b6d284a56a
No known key found for this signature in database
GPG Key ID: 057B0A87CB137C69

@ -180,8 +180,8 @@ _This section contains options to restore the system apps, by downloading them f
_This section contains tools to solve some Windows problems and get info about how much debloated the system is._
- [`Randomize System Color`](./src/scripts/other-scripts/New-SystemColor.ps1): Changes the Windows color pallette to a random generated hex color;
- [`Reinstall Pre-Installed Apps`](./src/scripts/Install-PreInstalledApps.ps1): Rebloat Windows with all the Pre-Installed Apps;
- [`Repair Windows`](./src/scripts/Repair-Windows.ps1): Try to Completely fix the Windows worst problems via Command Line;
- [`Reinstall Pre-Installed Apps`](./src/scripts/Install-DefaultAppsList.ps1): Rebloat Windows with all the Pre-Installed Apps;
- [`Repair Windows`](./src/scripts/Repair-WindowsSystem.ps1): Try to Completely fix the Windows worst problems via Command Line;
- [`Show Debloat Info`](./src/scripts/other-scripts/Show-DebloatInfo.ps1): Make an overall check-up from disabled and enabled Windows Components (Compare before and after applying tweaks, it's a great difference);
#### Windows Update ([Can be found here](src/utils/Individual-Tweaks.psm1))

@ -81,11 +81,11 @@ function Open-DebloatScript {
"Optimize-TaskScheduler.ps1",
"Optimize-ServicesRunning.ps1",
"Remove-BloatwareAppsList.ps1",
"Remove-CapabilitiesList.ps1",
"Optimize-Privacy.ps1",
"Optimize-Performance.ps1",
"Register-PersonalTweaksList.ps1",
"Optimize-Security.ps1",
"Remove-CapabilitiesList.ps1",
"Optimize-WindowsFeaturesList.ps1"
)
@ -115,7 +115,7 @@ function Show-GUI() {
# <===== Specific Layout =====>
$LayoutT1 = New-LayoutPage -NumOfPanels 3 -PanelHeight 960
$LayoutT1 = New-LayoutPage -NumOfPanels 3 -PanelHeight 985
$LayoutT2 = New-LayoutPage -NumOfPanels 4 -PanelHeight 1785
# <===== UI =====>
@ -174,7 +174,8 @@ function Show-GUI() {
$InstallOneDrive = New-Button -Text "OneDrive" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $InstallMicrosoftEdge -MarginTop $LayoutT1.DistanceBetweenElements
$InstallPaintPaint3D = New-Button -Text "Paint + Paint 3D" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $InstallOneDrive -MarginTop $LayoutT1.DistanceBetweenElements
$InstallPhoneLink = New-Button -Text "Phone Link" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $InstallPaintPaint3D -MarginTop $LayoutT1.DistanceBetweenElements
$InstallSoundRecorder = New-Button -Text "Sound Recorder" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $InstallPhoneLink -MarginTop $LayoutT1.DistanceBetweenElements
$InstallQuickAssist = New-Button -Text "Quick Assist" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $InstallPhoneLink -MarginTop $LayoutT1.DistanceBetweenElements
$InstallSoundRecorder = New-Button -Text "Sound Recorder" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $InstallQuickAssist -MarginTop $LayoutT1.DistanceBetweenElements
$InstallTaskbarWidgets = New-Button -Text "Taskbar Widgets" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $InstallSoundRecorder -MarginTop $LayoutT1.DistanceBetweenElements
$InstallUWPWMediaPlayer = New-Button -Text "Windows Media Player (UWP)" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $InstallTaskbarWidgets -MarginTop $LayoutT1.DistanceBetweenElements
$InstallXbox = New-Button -Text "Xbox" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $InstallUWPWMediaPlayer -MarginTop $LayoutT1.DistanceBetweenElements
@ -421,7 +422,7 @@ function Show-GUI() {
# Add Elements to each Tab Panel
$T1Panel1.Controls.AddRange(@($ClCustomizeFeatures, $CbDarkTheme, $CbActivityHistory, $CbBackgroundsApps, $CbClipboardHistory, $CbClipboardSyncAcrossDevice, $CbCortana, $CbHibernate, $CbOldVolumeControl, $CbOnlineSpeechRecognition, $CbPhoneLink, $CbPhotoViewer, $CbSearchAppForUnknownExt, $CbTelemetry, $CbWSearchService, $CbXboxGameBarDVRandMode))
$T1Panel2.Controls.AddRange(@($ClDebloatTools, $ApplyTweaks, $UndoTweaks, $RemoveMSEdge, $RemoveOneDrive, $RemoveXbox, $PictureBox1))
$T1Panel2.Controls.AddRange(@($ClInstallSystemApps, $InstallCortana, $InstallDolbyAudio, $InstallMicrosoftEdge, $InstallOneDrive, $InstallPaintPaint3D, $InstallPhoneLink, $InstallSoundRecorder, $InstallTaskbarWidgets, $InstallUWPWMediaPlayer, $InstallXbox))
$T1Panel2.Controls.AddRange(@($ClInstallSystemApps, $InstallCortana, $InstallDolbyAudio, $InstallMicrosoftEdge, $InstallOneDrive, $InstallPaintPaint3D, $InstallPhoneLink, $InstallQuickAssist, $InstallSoundRecorder, $InstallTaskbarWidgets, $InstallUWPWMediaPlayer, $InstallXbox))
$T1Panel2.Controls.AddRange(@($ClOtherTools, $RandomizeSystemColor, $ReinstallBloatApps, $RepairWindows, $ShowDebloatInfo))
$T1Panel3.Controls.AddRange(@($ClWindowsUpdate, $CbAutomaticWindowsUpdate))
$T1Panel3.Controls.AddRange(@($ClOptionalFeatures, $CbInternetExplorer, $CbPrintToPDFServices, $CbPrintingXPSServices, $CbWindowsMediaPlayer))
@ -473,12 +474,12 @@ function Show-GUI() {
"Use-DebloatSoftware.ps1",
"Optimize-TaskScheduler.ps1",
"Optimize-ServicesRunning.ps1",
"Remove-CapabilitiesList.ps1",
"Optimize-Privacy.ps1",
"Optimize-Performance.ps1",
"Register-PersonalTweaksList.ps1",
"Remove-CapabilitiesList.ps1",
"Optimize-WindowsFeaturesList.ps1",
"Install-PreInstalledApps.ps1"
"Install-DefaultAppsList.ps1"
)
Open-PowerShellFilesCollection -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Set-RevertStatus -Revert $false
@ -504,7 +505,7 @@ function Show-GUI() {
})
$RepairWindows.Add_Click( {
Open-PowerShellFilesCollection -RelativeLocation "src\scripts" -Scripts @("Backup-System.ps1", "Repair-Windows.ps1") -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFilesCollection -RelativeLocation "src\scripts" -Scripts @("Backup-System.ps1", "Repair-WindowsSystem.ps1") -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$InstallCortana.Add_Click( {
@ -531,6 +532,10 @@ function Show-GUI() {
Install-PhoneLink
})
$InstallQuickAssist.Add_Click( {
Install-QuickAssist
})
$InstallSoundRecorder.Add_Click( {
Install-SoundRecorder
})
@ -552,7 +557,7 @@ function Show-GUI() {
})
$ReinstallBloatApps.Add_Click( {
Open-PowerShellFilesCollection -RelativeLocation "src\scripts" -Scripts @("Install-PreInstalledApps.ps1") -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFilesCollection -RelativeLocation "src\scripts" -Scripts @("Install-DefaultAppsList.ps1") -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$ShowDebloatInfo.Add_Click( {

@ -1,5 +1,7 @@
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"Title-Templates.psm1"
$Script:TweakType = "Backup"
function New-RestorePoint() {
Write-Status -Types "+", $TweakType -Status "Enabling system drive Restore Point..."
Enable-ComputerRestore -Drive "$env:SystemDrive\"
@ -25,10 +27,5 @@ function Backup-HostsFile() {
Pop-Location
}
function Main() {
$Script:TweakType = "Backup"
New-RestorePoint # This makes a restoration point before the script begins
Backup-HostsFile # Backup the Hosts file found on "X:\Windows\System32\drivers\etc" of the current system
}
Main
New-RestorePoint # This makes a restoration point before the script begins
Backup-HostsFile # Backup the Hosts file found on "X:\Windows\System32\drivers\etc" of the current system

@ -1,4 +1,4 @@
function Install-PreInstalledApps() {
function Install-DefaultAppsList() {
# The following code is from Microsoft (Adapted): https://go.microsoft.com/fwlink/?LinkId=619547
# Get all the provisioned packages
$Packages = (Get-Item 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Applications') | Get-ChildItem
@ -28,4 +28,4 @@ function Install-PreInstalledApps() {
}
}
Install-PreInstalledApps
Install-DefaultAppsList

@ -93,88 +93,85 @@ function Install-WingetDependency() {
Return $false
}
function Main() {
$WingetParams = @{
Name = "Winget"
CheckExistenceBlock = { winget --version }
InstallCommandBlock =
{
New-Item -Path "$(Get-TempScriptFolder)\downloads\" -Name "winget-install" -ItemType Directory -Force | Out-Null
Push-Location -Path "$(Get-TempScriptFolder)\downloads\winget-install\"
Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted
Install-Script -Name winget-install -Force
winget-install.ps1
Pop-Location
Remove-Item -Path "$(Get-TempScriptFolder)\downloads\winget-install\"
}
Time = "12:00"
UpdateScriptBlock =
{
Remove-Item -Path "$env:TEMP\Win-Debloat-Tools\logs\*" -Include "WingetDailyUpgrade_*.log"
Start-Transcript -Path "$env:TEMP\Win-Debloat-Tools\logs\WingetDailyUpgrade_$(Get-Date -Format "yyyy-MM-dd_HH-mm-ss").log"
Set-ExecutionPolicy Unrestricted -Scope LocalMachine -Force # Only needed to run Winget
winget source update --disable-interactivity | Out-Host
winget upgrade --all --silent | Out-Host
Stop-Transcript
}
$WingetParams = @{
Name = "Winget"
CheckExistenceBlock = { winget --version }
InstallCommandBlock =
{
New-Item -Path "$(Get-TempScriptFolder)\downloads\" -Name "winget-install" -ItemType Directory -Force | Out-Null
Push-Location -Path "$(Get-TempScriptFolder)\downloads\winget-install\"
Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted
Install-Script -Name winget-install -Force
winget-install.ps1
Pop-Location
Remove-Item -Path "$(Get-TempScriptFolder)\downloads\winget-install\"
}
Time = "12:00"
UpdateScriptBlock =
{
Remove-Item -Path "$env:TEMP\Win-Debloat-Tools\logs\*" -Include "WingetDailyUpgrade_*.log"
Start-Transcript -Path "$env:TEMP\Win-Debloat-Tools\logs\WingetDailyUpgrade_$(Get-Date -Format "yyyy-MM-dd_HH-mm-ss").log"
Set-ExecutionPolicy Unrestricted -Scope LocalMachine -Force # Only needed to run Winget
winget source update --disable-interactivity | Out-Host
winget upgrade --all --silent | Out-Host
Stop-Transcript
}
}
$WingetParams2 = @{
Name = "Winget (Method 2)"
CheckExistenceBlock = { winget --version }
InstallCommandBlock =
{
$WingetDepOutput = Install-WingetDependency
$WingetOutput = Get-APIFile -URI "https://api.github.com/repos/microsoft/winget-cli/releases/latest" -ObjectProperty "assets" -FileNameLike "*.msixbundle" -PropertyValue "browser_download_url" -OutputFile "Microsoft.DesktopAppInstaller.msixbundle"
$AppName = Split-Path -Path $WingetOutput -Leaf
Try {
# Method from: https://github.com/microsoft/winget-cli/blob/master/doc/troubleshooting/README.md#machine-wide-provisioning
If ($WingetDepOutput) {
Write-Status -Types "@" -Status "Trying to install the App (w/ dependency): $AppName" -Warning
$InstallPackageCommand = { Add-AppxProvisionedPackage -Online -PackagePath $WingetOutput -SkipLicense -DependencyPackagePath $WingetDepOutput | Out-Null }
Invoke-Expression "$InstallPackageCommand"
}
Write-Status -Types "@" -Status "Trying to install the App (no dependency): $AppName" -Warning
$InstallPackageCommand = { Add-AppxProvisionedPackage -Online -PackagePath $WingetOutput -SkipLicense | Out-Null }
$WingetParams2 = @{
Name = "Winget (Method 2)"
CheckExistenceBlock = { winget --version }
InstallCommandBlock =
{
$WingetDepOutput = Install-WingetDependency
$WingetOutput = Get-APIFile -URI "https://api.github.com/repos/microsoft/winget-cli/releases/latest" -ObjectProperty "assets" -FileNameLike "*.msixbundle" -PropertyValue "browser_download_url" -OutputFile "Microsoft.DesktopAppInstaller.msixbundle"
$AppName = Split-Path -Path $WingetOutput -Leaf
Try {
# Method from: https://github.com/microsoft/winget-cli/blob/master/doc/troubleshooting/README.md#machine-wide-provisioning
If ($WingetDepOutput) {
Write-Status -Types "@" -Status "Trying to install the App (w/ dependency): $AppName" -Warning
$InstallPackageCommand = { Add-AppxProvisionedPackage -Online -PackagePath $WingetOutput -SkipLicense -DependencyPackagePath $WingetDepOutput | Out-Null }
Invoke-Expression "$InstallPackageCommand"
} Catch {
Write-Status -Types "@" -Status "Couldn't install '$AppName' automatically, trying to install the App manually..." -Warning
Start-Process "ms-windows-store://pdp/?ProductId=9NBLGGH4NNS1" -Wait # GUI App installer can't install itself
}
Remove-Item -Path $WingetOutput
Remove-Item -Path $WingetDepOutput
Write-Status -Types "@" -Status "Trying to install the App (no dependency): $AppName" -Warning
$InstallPackageCommand = { Add-AppxProvisionedPackage -Online -PackagePath $WingetOutput -SkipLicense | Out-Null }
Invoke-Expression "$InstallPackageCommand"
} Catch {
Write-Status -Types "@" -Status "Couldn't install '$AppName' automatically, trying to install the App manually..." -Warning
Start-Process "ms-windows-store://pdp/?ProductId=9NBLGGH4NNS1" -Wait # GUI App installer can't install itself
}
}
$ChocolateyParams = @{
Name = "Chocolatey"
CheckExistenceBlock = { choco --version }
InstallCommandBlock =
{
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}
Time = "13:00"
UpdateScriptBlock =
{
Remove-Item -Path "$env:TEMP\Win-Debloat-Tools\logs\*" -Include "ChocolateyDailyUpgrade_*.log"
Start-Transcript -Path "$env:TEMP\Win-Debloat-Tools\logs\ChocolateyDailyUpgrade_$(Get-Date -Format "yyyy-MM-dd_HH-mm-ss").log"
choco upgrade all --ignore-dependencies --yes | Out-Host
Stop-Transcript
}
PostInstallBlock = { choco install --ignore-dependencies --yes "chocolatey-core.extension" "chocolatey-fastanswers.extension" "dependency-windows10" }
Remove-Item -Path $WingetOutput
Remove-Item -Path $WingetDepOutput
}
}
# Install Winget on Windows (Method 1)
Install-PackageManager -PackageManagerFullName $WingetParams.Name -CheckExistenceBlock $WingetParams.CheckExistenceBlock -InstallCommandBlock $WingetParams.InstallCommandBlock -Time $WingetParams.Time -UpdateScriptBlock $WingetParams.UpdateScriptBlock
# Install Winget on Windows (Method 2)
Install-PackageManager -PackageManagerFullName $WingetParams2.Name -CheckExistenceBlock $WingetParams2.CheckExistenceBlock -InstallCommandBlock $WingetParams2.InstallCommandBlock
# Install Chocolatey on Windows
Install-PackageManager -PackageManagerFullName $ChocolateyParams.Name -CheckExistenceBlock $ChocolateyParams.CheckExistenceBlock -InstallCommandBlock $ChocolateyParams.InstallCommandBlock -Time $ChocolateyParams.Time -UpdateScriptBlock $ChocolateyParams.UpdateScriptBlock -PostInstallBlock $ChocolateyParams.PostInstallBlock
$ChocolateyParams = @{
Name = "Chocolatey"
CheckExistenceBlock = { choco --version }
InstallCommandBlock =
{
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}
Time = "13:00"
UpdateScriptBlock =
{
Remove-Item -Path "$env:TEMP\Win-Debloat-Tools\logs\*" -Include "ChocolateyDailyUpgrade_*.log"
Start-Transcript -Path "$env:TEMP\Win-Debloat-Tools\logs\ChocolateyDailyUpgrade_$(Get-Date -Format "yyyy-MM-dd_HH-mm-ss").log"
choco upgrade all --ignore-dependencies --yes | Out-Host
Stop-Transcript
}
PostInstallBlock = { choco install --ignore-dependencies --yes "chocolatey-core.extension" "chocolatey-fastanswers.extension" "dependency-windows10" }
}
Main
# Install Winget on Windows (Method 1)
Install-PackageManager -PackageManagerFullName $WingetParams.Name -CheckExistenceBlock $WingetParams.CheckExistenceBlock -InstallCommandBlock $WingetParams.InstallCommandBlock -Time $WingetParams.Time -UpdateScriptBlock $WingetParams.UpdateScriptBlock
# Install Winget on Windows (Method 2)
Install-PackageManager -PackageManagerFullName $WingetParams2.Name -CheckExistenceBlock $WingetParams2.CheckExistenceBlock -InstallCommandBlock $WingetParams2.InstallCommandBlock
# Install Chocolatey on Windows
Install-PackageManager -PackageManagerFullName $ChocolateyParams.Name -CheckExistenceBlock $ChocolateyParams.CheckExistenceBlock -InstallCommandBlock $ChocolateyParams.InstallCommandBlock -Time $ChocolateyParams.Time -UpdateScriptBlock $ChocolateyParams.UpdateScriptBlock -PostInstallBlock $ChocolateyParams.PostInstallBlock

@ -149,12 +149,9 @@ function Optimize-Performance() {
Set-ItemPropertyVerified -Path "$PathToLMMultimediaSystemProfileOnGameTasks" -Name "Scheduling Category" -Type String -Value "High" # Default: "Medium"
}
function Main() {
If (!$Revert) {
Optimize-Performance # Change from stock configurations that slowdowns the system to improve performance
} Else {
Optimize-Performance -Revert
}
If (!$Revert) {
Optimize-Performance # Change from stock configurations that slowdowns the system to improve performance
} Else {
Optimize-Performance -Revert
}
Main

@ -290,12 +290,9 @@ function Optimize-Privacy() {
}
}
function Main() {
If (!$Revert) {
Optimize-Privacy # Disable Registries that causes slowdowns and privacy invasion
} Else {
Optimize-Privacy -Revert
}
If (!$Revert) {
Optimize-Privacy # Disable Registries that causes slowdowns and privacy invasion
} Else {
Optimize-Privacy -Revert
}
Main

@ -87,8 +87,5 @@ function Optimize-Security() {
#Set-ItemPropertyVerified -Path "HKLM:\SOFTWARE\Microsoft\Windows Script Host\Settings" -Name "Enabled" -Type DWord -Value 0
}
function Main() {
Optimize-Security # Improve the Windows Security
}
Optimize-Security # Improve the Windows Security
Main

@ -108,15 +108,11 @@ function Optimize-ServicesRunning() {
Set-ServiceStartup -State 'Manual' -Services $ServicesToManual
}
function Main() {
# List all services:
#Get-Service | Select-Object StartType, Status, Name, DisplayName, ServiceType | Sort-Object StartType, Status, Name | Format-Table
# List all services:
#Get-Service | Select-Object StartType, Status, Name, DisplayName, ServiceType | Sort-Object StartType, Status, Name | Format-Table
If (!$Revert) {
Optimize-ServicesRunning # Enable essential Services and Disable bloating Services
} Else {
Optimize-ServicesRunning -Revert
}
If (!$Revert) {
Optimize-ServicesRunning # Enable essential Services and Disable bloating Services
} Else {
Optimize-ServicesRunning -Revert
}
Main

@ -61,15 +61,11 @@ function Optimize-TaskScheduler() {
Set-ScheduledTaskState -State 'Enabled' -ScheduledTask $EnableScheduledTasks
}
function Main() {
# List all Scheduled Tasks:
#Get-ScheduledTask | Select-Object -Property State, TaskPath, TaskName, Description | Sort-Object State, TaskPath, TaskName | Format-Table
# List all Scheduled Tasks:
#Get-ScheduledTask | Select-Object -Property State, TaskPath, TaskName, Description | Sort-Object State, TaskPath, TaskName | Format-Table
If (!$Revert) {
Optimize-TaskScheduler # Disable Scheduled Tasks that causes slowdowns
} Else {
Optimize-TaskScheduler -Revert
}
If (!$Revert) {
Optimize-TaskScheduler # Disable Scheduled Tasks that causes slowdowns
} Else {
Optimize-TaskScheduler -Revert
}
Main

@ -42,18 +42,14 @@ function Optimize-WindowsFeaturesList() {
Set-OptionalFeatureState -State 'Enabled' -OptionalFeatures $EnableFeatures
}
function Main() {
# List all Optional Features:
#Get-WindowsOptionalFeature -Online | Select-Object -Property State, FeatureName, DisplayName, Description | Sort-Object State, FeatureName | Format-Table
# List all Optional Features:
#Get-WindowsOptionalFeature -Online | Select-Object -Property State, FeatureName, DisplayName, Description | Sort-Object State, FeatureName | Format-Table
# List all Windows Packages:
#Get-WindowsPackage -Online | Select-Object -Property ReleaseType, PackageName, PackageState, InstallTime | Sort-Object ReleaseType, PackageState, PackageName | Format-Table
# List all Windows Packages:
#Get-WindowsPackage -Online | Select-Object -Property ReleaseType, PackageName, PackageState, InstallTime | Sort-Object ReleaseType, PackageState, PackageName | Format-Table
If (!$Revert) {
Optimize-WindowsFeaturesList # Disable useless features and Enable features claimed as Optional on Windows, but actually, they are useful
} Else {
Optimize-WindowsFeaturesList -Revert
}
If (!$Revert) {
Optimize-WindowsFeaturesList # Disable useless features and Enable features claimed as Optional on Windows, but actually, they are useful
} Else {
Optimize-WindowsFeaturesList -Revert
}
Main

@ -227,12 +227,8 @@ function Register-PersonalTweaksList() {
powercfg -Change Hibernate-Timeout-DC $TimeoutHibernateBattery
}
function Main() {
If (!$Revert) {
Register-PersonalTweaksList # Personal UI, Network, Energy and Accessibility Optimizations
} Else {
Register-PersonalTweaksList -Revert
}
If (!$Revert) {
Register-PersonalTweaksList # Personal UI, Network, Energy and Accessibility Optimizations
} Else {
Register-PersonalTweaksList -Revert
}
Main

@ -154,14 +154,11 @@ function Remove-BloatwareAppsList() {
Remove-UWPApp -AppxPackages $Apps
}
function Main() {
# List all Packages:
#Get-AppxPackage | Select-Object -Property Name, Architecture, Version, Publisher, InstallLocation, IsFramework, IsBundle, IsDevelopmentMode, NonRemovable, SignatureKind, Status, Dependencies | Sort-Object Publisher, Name, Architecture | Format-Table
# List all Packages:
#Get-AppxPackage | Select-Object -Property Name, Architecture, Version, Publisher, InstallLocation, IsFramework, IsBundle, IsDevelopmentMode, NonRemovable, SignatureKind, Status, Dependencies | Sort-Object Publisher, Name, Architecture | Format-Table
# List all Provisioned Packages:
#Get-AppxProvisionedPackage -Online | Select-Object -Property DisplayName, Architecture, Version, PublisherId, InstallLocation, Region, ResourceId | Sort-Object PublisherId, DisplayName, Architecture | Format-Table
# List all Provisioned Packages:
#Get-AppxProvisionedPackage -Online | Select-Object -Property DisplayName, Architecture, Version, PublisherId, InstallLocation, Region, ResourceId | Sort-Object PublisherId, DisplayName, Architecture | Format-Table
Remove-BloatwareAppsList # Remove the main Bloat from Pre-installed Apps
}
Remove-BloatwareAppsList # Remove the main Bloat from Pre-installed Apps
Main

@ -7,40 +7,38 @@ function Remove-CapabilitiesList() {
[Switch] $Revert
)
Begin {
$DisableCapabilities = @(
"App.StepsRecorder*" # Steps Recorder
"Browser.InternetExplorer*" # Internet Explorer (Also has on Optional Features)
"MathRecognizer*" # Math Recognizer
"Microsoft.Windows.PowerShell.ISE*" # PowerShell ISE
"Microsoft.Windows.WordPad*" # WordPad
"Print.Fax.Scan*" # Fax features
"Print.Management.Console*" # printmanagement.msc
)
}
Process {
Write-Title "Windows Capabilities Tweaks"
Write-Section "Uninstall Windows Capabilities from Windows"
$DisableCapabilities = [System.Collections.ArrayList] @(
"App.StepsRecorder*" # Steps Recorder
"Browser.InternetExplorer*" # Internet Explorer (Also has on Optional Features)
"MathRecognizer*" # Math Recognizer
"Microsoft.Windows.PowerShell.ISE*" # PowerShell ISE
"Microsoft.Windows.WordPad*" # WordPad
"Print.Fax.Scan*" # Fax features
"Print.Management.Console*" # printmanagement.msc
)
If ($Revert) {
Write-Status -Types "*", "Capability" -Status "Reverting the tweaks is set to '$Revert'." -Warning
Set-CapabilityState -State Enabled -Capabilities $DisableCapabilities
} Else {
Set-CapabilityState -State Disabled -Capabilities $DisableCapabilities
}
If (Get-AppxPackage -AllUsers -Name "MicrosoftCorporationII.QuickAssist") {
$DisableCapabilities.Add("App.Support.QuickAssist*")
}
}
function Main() {
# List all Windows Capabilities:
#Get-WindowsCapability -Online | Select-Object -Property State, Name, Online, RestartNeeded, LogPath, LogLevel | Sort-Object State, Name | Format-Table
$DisableCapabilities.Sort()
If (!$Revert) {
Remove-CapabilitiesList # Disable useless capabilities which came with Windows, but are legacy now and almost nobody cares
Write-Title "Windows Capabilities Tweaks"
Write-Section "Uninstall Windows Capabilities from Windows"
If ($Revert) {
Write-Status -Types "*", "Capability" -Status "Reverting the tweaks is set to '$Revert'." -Warning
Set-CapabilityState -State Enabled -Capabilities $DisableCapabilities
} Else {
Remove-CapabilitiesList -Revert
Set-CapabilityState -State Disabled -Capabilities $DisableCapabilities
}
}
Main
# List all Windows Capabilities:
#Get-WindowsCapability -Online | Select-Object -Property State, Name, Online, RestartNeeded, LogPath, LogLevel | Sort-Object State, Name | Format-Table
If (!$Revert) {
Remove-CapabilitiesList # Disable useless capabilities which came with Windows, but are legacy now and almost nobody cares
} Else {
Remove-CapabilitiesList -Revert
}

@ -4,22 +4,6 @@ Import-Module -DisableNameChecking $PSScriptRoot\..\lib\debloat-helper\"Remove-I
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\debloat-helper\"Remove-UWPApp.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\debloat-helper\"Set-ItemPropertyVerified.psm1"
function Main() {
$Ask = "Are you sure you want to remove Microsoft Edge from Windows?`nYou can reinstall it anytime.`nNote: all users logged in will remain."
switch (Show-Question -Title "Warning" -Message $Ask -BoxIcon "Warning") {
'Yes' {
Remove-MSEdge
}
'No' {
Write-Host "Aborting..."
}
'Cancel' {
Write-Host "Aborting..." # With Yes, No and Cancel, the user can press Esc to exit
}
}
}
function Remove-MSEdge() {
$PathToLMEdgeUpdate = "HKLM:\SOFTWARE\Microsoft\EdgeUpdate"
@ -57,4 +41,16 @@ function Remove-MSEdge() {
Remove-ItemVerified -Path "$env:SystemDrive\Program Files (x86)\Microsoft\Temp" -Recurse -Force | Out-Host
}
Main
$Ask = "Are you sure you want to remove Microsoft Edge from Windows?`nYou can reinstall it anytime.`nNote: all users logged in will remain."
switch (Show-Question -Title "Warning" -Message $Ask -BoxIcon "Warning") {
'Yes' {
Remove-MSEdge
}
'No' {
Write-Host "Aborting..."
}
'Cancel' {
Write-Host "Aborting..." # With Yes, No and Cancel, the user can press Esc to exit
}
}

@ -5,22 +5,6 @@ Import-Module -DisableNameChecking $PSScriptRoot\..\lib\debloat-helper\"Remove-U
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\debloat-helper\"Set-ItemPropertyVerified.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\..\utils\"Individual-Tweaks.psm1"
function Main() {
$Ask = "This will remove and/or disable all the Xbox:`n - Apps;`n - Services and;`n - GameBar;`n - GameDVR.`n`nDo you want to proceed?"
switch (Show-Question -Title "Warning" -Message $Ask -BoxIcon "Warning") {
'Yes' {
Remove-Xbox # Remove all Xbox related Apps, services, etc.
}
'No' {
Write-Host "Aborting..."
}
'Cancel' {
Write-Host "Aborting..." # With Yes, No and Cancel, the user can press Esc to exit
}
}
}
function Remove-Xbox() {
$PathToLMServicesXbgm = "HKLM:\SYSTEM\CurrentControlSet\Services\xbgm"
$TweakType = "Xbox"
@ -55,4 +39,16 @@ function Remove-Xbox() {
Disable-XboxGameBarDVRandMode
}
Main
$Ask = "This will remove and/or disable all the Xbox:`n - Apps;`n - Services and;`n - GameBar;`n - GameDVR.`n`nDo you want to proceed?"
switch (Show-Question -Title "Warning" -Message $Ask -BoxIcon "Warning") {
'Yes' {
Remove-Xbox # Remove all Xbox related Apps, services, etc.
}
'No' {
Write-Host "Aborting..."
}
'Cancel' {
Write-Host "Aborting..." # With Yes, No and Cancel, the user can press Esc to exit
}
}

@ -3,7 +3,7 @@ Import-Module -DisableNameChecking $PSScriptRoot\..\lib\debloat-helper\"Set-Item
# Adapted from: https://github.com/ChrisTitusTech/win10script
function Repair-Windows() {
function Repair-WindowsSystem() {
Write-Title "Repair major Windows problems"
Write-Section "Reset Windows Hosts file"
@ -72,8 +72,4 @@ function Repair-Windows() {
netsh winsock reset | Out-Host
}
function Main() {
Repair-Windows
}
Main
Repair-WindowsSystem

@ -36,12 +36,9 @@ function Use-DebloatSoftware() {
Pop-Location
}
function Main() {
If (!$Revert) {
Use-DebloatSoftware # [AUTOMATED] ShutUp10 with recommended configs and AdwCleaner for Adware/Virus Scanning.
} Else {
Use-DebloatSoftware -Revert
}
If (!$Revert) {
Use-DebloatSoftware # [AUTOMATED] ShutUp10 with recommended configs and AdwCleaner for Adware/Virus Scanning.
} Else {
Use-DebloatSoftware -Revert
}
Main

@ -1,7 +1,7 @@
function Main() {
function Optimize-SSD() {
# SSD life improvement
fsutil behavior set DisableLastAccess 1
fsutil behavior set EncryptPagingFile 0
}
Main
Optimize-SSD

@ -1,4 +1,4 @@
function Main() {
function Restart-AdvancedMode() {
# -r: Restart after shutdown
# -o: Reboot into the advanced menu
# -t: Time before shutdown
@ -6,4 +6,4 @@ function Main() {
shutdown -o -r -f -t 0
}
Main
Restart-AdvancedMode

@ -7,20 +7,15 @@ $Script:TweakType = "App"
function Install-Cortana() {
$Apps = @("9NFFX4SZZ23L")
Write-Status -Types "*", $TweakType -Status "Installing Cortana..."
Install-Software -Name "Cortana" -Packages $Apps -PackageProvider 'MsStore'
}
function Install-DolbyAudio() {
$Apps = @("9NJZD5S7QN99")
Write-Status -Types "*", $TweakType -Status "Installing Dolby Audio..."
Install-Software -Name "Dolby Audio" -Packages $Apps -PackageProvider 'MsStore'
}
function Install-MicrosoftEdge() {
Write-Status -Types "*", $TweakType -Status "Installing Microsoft Edge..."
Install-Software -Name "Microsoft Edge" -Packages "Microsoft.Edge"
}
@ -32,35 +27,31 @@ function Install-OneDrive() {
function Install-PaintPaint3D() {
$Apps = @("9PCFS5B6T72H", "9NBLGGH5FV99")
Write-Status -Types "*", $TweakType -Status "Installing Paint + Paint 3D..."
Install-Software -Name "Paint + Paint 3D" -Packages $Apps -PackageProvider 'MsStore'
}
function Install-PhoneLink() {
$Apps = @("9NMPJ99VJBWV")
Write-Status -Types "*", $TweakType -Status "Installing Phone Link (Your Phone)..."
Install-Software -Name "Phone Link (Your Phone)" -Packages $Apps -PackageProvider 'MsStore'
Enable-PhoneLink
}
function Install-QuickAssist() {
$Apps = @("9P7BP5VNWKX5")
Install-Software -Name "Quick Assist" -Packages $Apps -PackageProvider 'MsStore'
}
function Install-SoundRecorder() {
$Apps = @("9WZDNCRFHWKN")
Write-Status -Types "*", $TweakType -Status "Installing Sound Recorder..."
Install-Software -Name "Sound Recorder" -Packages $Apps -PackageProvider 'MsStore'
}
function Install-TaskbarWidgetsApp() {
$Apps = @("9MSSGKG348SP")
Write-Status -Types "*", $TweakType -Status "Installing Taskbar Widgets..."
Install-Software -Name "Taskbar Widgets" -Packages $Apps -PackageProvider 'MsStore'
}
function Install-UWPWindowsMediaPlayer() {
Write-Status -Types "*", $TweakType -Status "Installing Windows Media Player (UWP)..."
Install-Software -Name "Windows Media Player (UWP)" -Packages @("9WZDNCRFJ3PT") -PackageProvider 'MsStore'
}
@ -79,8 +70,6 @@ function Install-Xbox() {
Write-Status -Types "*", $TweakType -Status "Enabling ALL Xbox Services..."
Set-ServiceStartup -State 'Manual' -Services $XboxServices
Write-Status -Types "*", $TweakType -Status "Installing Xbox Apps again..."
Install-Software -Name "Missing Xbox Apps" -Packages $XboxApps -PackageProvider 'MsStore' -NoDialog
Write-Status -Types "*", $TweakType -Status "Enabling Xbox Game Monitoring..."
Loading…
Cancel
Save