Change (optimize-optional-features):

- Disable optional features
- Rename functions to match file name (2/2)
- Rename personal-optimizations file
- Change file name on README
- optimize-privacy-and-performance:
- Instead of a hardcoded num, calc svcthreshold
main
Plínio Larrubia 3 years ago committed by Plínio Larrubia
parent 9e8e317872
commit 9c63a5aa63
No known key found for this signature in database
GPG Key ID: 057B0A87CB137C69

@ -98,9 +98,9 @@ Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force; ls -Recurse *.ps*1 |
- Disable heavy Services; ([`optimize-services.ps1`](./src/scripts/optimize-services.ps1))
- Remove Bloatware Apps that comes with Windows 10, except from my choice; ([`remove-bloatware-apps.ps1`](./src/scripts/remove-bloatware-apps.ps1))
- Optimize Privacy and Performance settings disabling more telemetry stuff and changing GPOs; ([`optimize-privacy-and-performance.ps1`](./src/scripts/optimize-privacy-and-performance.ps1))
- Apply General Personalization tweaks via Registry and Powershell commands; ([`personal-optimizations.ps1`](./src/scripts/personal-optimizations.ps1))
- Apply General Personalization tweaks via Registry and Powershell commands; ([`personal-tweaks.ps1`](./src/scripts/personal-tweaks.ps1))
- Help improve the Security of Windows by a little; ([`optimize-security.ps1`](./src/scripts/optimize-security.ps1))
- Enable Optional Features specially for Gaming/Work (including WSL 2); ([`enable-optional-features.ps1`](./src/scripts/enable-optional-features.ps1))
- Disable and Enable Optional Features specially for Gaming/Work (including WSL 2); ([`optimize-optional-features.ps1`](./src/scripts/optimize-optional-features.ps1))
- Remove OneDrive completely from the System, re-install is possible via Win Store; ([`remove-onedrive.ps1`](./src/scripts/remove-onedrive.ps1))
- Install _Chocolatey/Winget_ by default; ([`install-package-managers.ps1`](./src/scripts/install-package-managers.ps1))
- In the End it Locks Script's Usage Permission. (`Win10Script(GUI).ps1`)

@ -59,9 +59,9 @@ function RunScripts() {
"optimize-services.ps1"
"remove-bloatware-apps.ps1"
"optimize-privacy-and-performance.ps1"
"personal-optimizations.ps1"
"personal-tweaks.ps1"
"optimize-security.ps1"
"enable-optional-features.ps1"
"optimize-optional-features.ps1"
"remove-onedrive.ps1"
"install-package-managers.ps1"
)

@ -445,9 +445,9 @@ function PrepareGUI() {
"optimize-services.ps1"
"remove-bloatware-apps.ps1"
"optimize-privacy-and-performance.ps1"
"personal-optimizations.ps1"
"personal-tweaks.ps1"
"optimize-security.ps1"
"enable-optional-features.ps1"
"optimize-optional-features.ps1"
"remove-onedrive.ps1"
)
@ -500,7 +500,7 @@ function PrepareGUI() {
"optimize-scheduled-tasks.ps1"
"optimize-services.ps1"
"optimize-privacy-and-performance.ps1"
"personal-optimizations.ps1"
"personal-tweaks.ps1"
)
ForEach ($FileName in $Scripts) {

@ -1,15 +1,40 @@
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1"
function EnableOptionalFeatures() {
# Adapted from: https://github.com/ChrisTitusTech/win10script/pull/131/files
function OptimizeOptionalFeatures() {
Title1 -Text "Install additional features for Windows"
# Dism /online /Get-Features #/Format:Table # To find all features
# Get-WindowsOptionalFeature -Online
$DisableFeatures = @(
"FaxServicesClientPackage" # Windows Fax and Scan
"LegacyComponents" # Legacy Components
"MediaPlayback" # Media Features
"MicrosoftWindowsPowerShellV2" # PowerShell 2.0
"MicrosoftWindowsPowershellV2Root" # PowerShell 2.0
"Printing-PrintToPDFServices-Features" # Microsoft Print to PDF
"Printing-XPSServices-Features" # Microsoft XPS Document Writer
"WorkFolders-Client" # Work Folders Client
)
ForEach ($Feature in $DisableFeatures) {
$FeatureDetails = $(Get-WindowsOptionalFeature -Online -FeatureName $Feature)
Write-Host "[?][Feature] $Feature Status:" $FeatureDetails.State
If ($FeatureDetails.State -like "Enabled") {
Write-Host "[-][Feature] Uninstalling $Feature..."
Disable-WindowsOptionalFeature -Online -NoRestart -FeatureName $Feature
}
}
$Features = @(
"LegacyComponents" # Legacy Components
"DirectPlay" # Direct Play
$EnableFeatures = @(
"Microsoft-Hyper-V-All" # Hyper-V (VT-d (Intel) / SVM (AMD) needed on BIOS)
"NetFx3" # NET Framework 3.5
"NetFx4-AdvSrvs" # NET Framework 4
@ -20,19 +45,18 @@ function EnableOptionalFeatures() {
"VirtualMachinePlatform" # VM Platform
)
ForEach ($Feature in $Features) {
ForEach ($Feature in $EnableFeatures) {
$FeatureDetails = $(Get-WindowsOptionalFeature -Online -FeatureName $Feature)
Write-Host "Checking if $Feature was already installed..."
Write-Host "$Feature Status:" $FeatureDetails.State
If ($FeatureDetails.State -like "Enabled") {
Write-Host "[=][Feature] $Feature was already installed! Skipping..."
}
ElseIf ($FeatureDetails.State -like "Disabled") {
Write-Host "[?][Feature] Checking if $Feature was already installed..."
Write-Host "[?][Feature] $Feature Status:" $FeatureDetails.State
If ($FeatureDetails.State -like "Disabled*") {
Write-Host "[+][Feature] Installing $Feature..."
Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName $Feature
}
Write-Host ""
}
# This is for WSL 2
@ -41,7 +65,6 @@ function EnableOptionalFeatures() {
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowDevelopmentWithoutDevLicense" -Type DWord -Value 1
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name "AllowAllTrustedApps" -Type DWord -Value 1
}
wsl --set-default-version 2
wsl --list --online
@ -49,7 +72,7 @@ function EnableOptionalFeatures() {
function Main() {
EnableOptionalFeatures # Enable features claimed as Optional on Windows, but actually, they are useful
OptimizeOptionalFeatures # Disable useless features and Enable features claimed as Optional on Windows, but actually, they are useful
}

@ -6,7 +6,7 @@ Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1"
# Adapted from this Sycnex script: https://github.com/Sycnex/Windows10Debloater
# Adapted from this kalaspuffar/Daniel Persson script: https://github.com/kalaspuffar/windows-debloat
function TweaksForPrivacyAndPerformance() {
function OptimizePrivacyAndPerformance() {
Title1 -Text "Privacy And Performance Tweaks"
Section1 -Text "Personalization Section"
@ -347,7 +347,7 @@ function TweaksForPrivacyAndPerformance() {
# Details: https://www.tenforums.com/tutorials/94628-change-split-threshold-svchost-exe-windows-10-a.html
Write-Host "[+][Priv&Perf] Splitting SVCHost processes to lower RAM usage..."
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name "SvcHostSplitThresholdInKB" -Type DWord -Value 4194304
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name "SvcHostSplitThresholdInKB" -Type DWord -Value $(4 * 1mb)
Write-Host "[+][Priv&Perf] Unlimiting your network bandwitdh for all your system..." # Based on this Chris Titus video: https://youtu.be/7u1miYJmJ_4
If (!(Test-Path "$PathToPsched")) {
@ -421,7 +421,7 @@ function Main() {
}
TweaksForPrivacyAndPerformance # Disable Registries that causes slowdowns and privacy invasion
OptimizePrivacyAndPerformance # Disable Registries that causes slowdowns and privacy invasion
}

Loading…
Cancel
Save