Convert Figma logo to code with AI

farag2 logoSophia-Script-for-Windows

:zap: The most powerful PowerShell module for fine-tuning Windows

8,467
613
8,467
0

Top Related Projects

PowerShell script for automation of routine tasks done after fresh installations of Windows 10 / Server 2016 / Server 2019

This is the Ultimate Windows 10 Script from a creation from multiple debloat scripts and gists from github.

A Collection of Scripts Which Disable / Remove Windows 10 Features and Apps

Script to remove Windows 10 bloatware.

16,406

The finest Windows Optimizer

👀👮🐢🔥Performs a privacy & security check of Windows 10

Quick Overview

Sophia Script for Windows is a PowerShell script designed to optimize and customize Windows 10 and Windows 11 systems. It offers a wide range of tweaks and modifications to enhance performance, privacy, and user experience, allowing users to tailor their Windows installation to their preferences.

Pros

  • Comprehensive set of customization options for Windows 10 and 11
  • Regularly updated to support the latest Windows versions and features
  • Open-source project with active community contributions
  • Modular design allows users to selectively apply desired tweaks

Cons

  • Advanced users may find some options too simplified
  • Potential for system instability if used incorrectly or without understanding the implications
  • Some tweaks may interfere with Windows updates or specific software functionality
  • Requires careful consideration and backup before applying changes

Getting Started

  1. Download the latest release from the GitHub repository.
  2. Right-click on the downloaded script and select "Run with PowerShell".
  3. Review the available options in the script and uncomment the desired tweaks.
  4. Run the script with administrator privileges to apply the selected modifications.

Note: It's highly recommended to create a system restore point or backup before running the script.

Competitor Comparisons

PowerShell script for automation of routine tasks done after fresh installations of Windows 10 / Server 2016 / Server 2019

Pros of Win10-Initial-Setup-Script

  • More comprehensive set of tweaks and customizations
  • Supports both GUI and command-line interfaces
  • Includes options for enterprise environments

Cons of Win10-Initial-Setup-Script

  • Less frequently updated compared to Sophia-Script-for-Windows
  • May include outdated tweaks for newer Windows versions
  • More complex structure, potentially harder for beginners to navigate

Code Comparison

Win10-Initial-Setup-Script:

Function DisableAdvertisingID {
    Write-Output "Disabling Advertising ID..."
    If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo")) {
        New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" | Out-Null
    }
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" -Name "DisabledByGroupPolicy" -Type DWord -Value 1
}

Sophia-Script-for-Windows:

function DisableAdvertisingID
{
    if (Get-ItemPropertyValue -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled)
    {
        New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -PropertyType DWord -Value 0 -Force
    }
}

Both scripts aim to achieve similar goals but use different approaches and registry paths. Win10-Initial-Setup-Script tends to use more verbose functions, while Sophia-Script-for-Windows often employs more concise code.

This is the Ultimate Windows 10 Script from a creation from multiple debloat scripts and gists from github.

Pros of win10script

  • More comprehensive set of tweaks and optimizations
  • Includes options for installing common applications
  • User-friendly interface with menu-driven options

Cons of win10script

  • Less frequently updated compared to Sophia-Script-for-Windows
  • May include some outdated or deprecated tweaks
  • Less granular control over individual settings

Code Comparison

Sophia-Script-for-Windows:

# Enable/Disable Windows features
[switch]$Disable,
[switch]$Enable,

# Turn on/off features
if ($Disable)
{
    Disable-WindowsOptionalFeature -Online -FeatureName $FeatureName -NoRestart
}

win10script:

Function InstallNET35 {
    Write-Output "Installing .NET 3.5..."
    DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
    Write-Output ".NET 3.5 installed."
}

The code comparison shows that Sophia-Script-for-Windows uses more modern PowerShell cmdlets and provides more flexibility with switch parameters. win10script, on the other hand, uses older DISM commands and focuses on specific tasks without parameterization.

Both scripts aim to customize and optimize Windows, but they differ in their approach and level of granularity. Sophia-Script-for-Windows offers more precise control over individual settings, while win10script provides a broader set of tweaks and optimizations with less fine-tuning options.

A Collection of Scripts Which Disable / Remove Windows 10 Features and Apps

Pros of Debloat-Windows-10

  • More comprehensive debloating approach, targeting a wider range of Windows 10 features and apps
  • Includes additional scripts for privacy enhancements and system tweaks
  • Community-driven with frequent updates and contributions

Cons of Debloat-Windows-10

  • Less user-friendly interface, primarily relies on PowerShell scripts
  • May be too aggressive for some users, potentially removing desired features
  • Limited customization options compared to Sophia Script for Windows

Code Comparison

Debloat-Windows-10:

Get-AppxPackage -AllUsers | Remove-AppxPackage
Get-AppxProvisionedPackage -Online | Remove-AppxProvisionedPackage -Online

Sophia Script for Windows:

if (-not (Get-AppxPackage -Name Microsoft.WindowsCalculator))
{
    Add-AppxPackage -DisableDevelopmentMode -Register "$env:SystemRoot\SystemApps\Microsoft.WindowsCalculator_8wekyb3d8bbwe\AppxManifest.xml"
}

The Debloat-Windows-10 script aggressively removes all AppX packages, while Sophia Script for Windows takes a more selective approach, allowing users to choose which apps to remove or reinstall.

Both projects aim to improve Windows 10 performance and privacy, but Sophia Script for Windows offers a more customizable and user-friendly experience. Debloat-Windows-10 provides a more thorough debloating process but may require more technical knowledge to use effectively.

Script to remove Windows 10 bloatware.

Pros of Windows10Debloater

  • Simpler and more straightforward interface
  • Includes a GUI option for less tech-savvy users
  • Focuses specifically on debloating Windows 10

Cons of Windows10Debloater

  • Less frequently updated compared to Sophia Script
  • More limited in scope and customization options
  • May not be as compatible with the latest Windows versions

Code Comparison

Windows10Debloater:

Function DebloatBlacklist {
    $Bloatware = @(
        "Microsoft.3DBuilder"
        "Microsoft.AppConnector"
    )
    foreach ($Bloat in $Bloatware) {
        Get-AppxPackage -Name $Bloat| Remove-AppxPackage
    }
}

Sophia Script:

function UninstallUWPApps
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory = $false)]
        [string[]]
        $Apps
    )
    foreach ($App in $Apps)
    {
        Get-AppxPackage -Name $App -AllUsers | Remove-AppxPackage -AllUsers
    }
}

Both scripts use similar approaches to remove unwanted UWP apps, but Sophia Script offers more flexibility with optional parameters and removes apps for all users by default.

16,406

The finest Windows Optimizer

Pros of Optimizer

  • User-friendly graphical interface for easier navigation and use
  • More comprehensive set of optimization options, including network tweaks and startup management
  • Regular updates and active community support

Cons of Optimizer

  • Closed-source nature limits transparency and customization options
  • May include unnecessary features for advanced users who prefer granular control
  • Potential for unintended system changes due to bundled optimizations

Code Comparison

Sophia-Script-for-Windows (PowerShell):

# Disable Cortana
Function DisableCortana {
    Write-Output "Disabling Cortana..."
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "CortanaConsent" -Type DWord -Value 0
}

Optimizer (C#):

// Disable Cortana
private void DisableCortana()
{
    Utilities.TryDeleteRegistryValue(Registry.LocalMachine, @"SOFTWARE\Policies\Microsoft\Windows\Windows Search", "AllowCortana");
    Utilities.TryDeleteRegistryValue(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Search", "CortanaEnabled");
}

Both projects aim to optimize Windows, but they take different approaches. Sophia-Script-for-Windows offers a more customizable, script-based solution for advanced users, while Optimizer provides a user-friendly GUI with a broader range of optimization options. The code comparison shows how they achieve similar tasks using different programming languages and methods.

👀👮🐢🔥Performs a privacy & security check of Windows 10

Pros of Privatezilla

  • User-friendly graphical interface, making it more accessible for non-technical users
  • Offers a wider range of customization options for Windows privacy and security settings
  • Regularly updated with new features and improvements

Cons of Privatezilla

  • Less flexible for advanced users who prefer command-line control
  • May not offer as deep system-level customizations as Sophia Script
  • Slightly larger file size due to the GUI components

Code Comparison

Sophia Script (PowerShell):

# Disable Cortana
Function DisableCortana {
    Write-Output "Disabling Cortana..."
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "CortanaConsent" -Type DWord -Value 0
}

Privatezilla (C#):

// Disable Cortana
private void DisableCortana()
{
    try
    {
        Registry.SetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Search", "CortanaConsent", 0, RegistryValueKind.DWord);
        SetStatus("Cortana disabled successfully.");
    }
    catch (Exception ex)
    {
        SetStatus("Error disabling Cortana: " + ex.Message);
    }
}

Both projects aim to enhance Windows privacy and security, but they cater to different user preferences. Sophia Script offers more granular control through PowerShell, while Privatezilla provides a more user-friendly approach with its graphical interface.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Sophia Script for Windows

Sophia Script for Windows

The most powerful PowerShell module for fine-tuning Windows on GitHub

Made with of Windows.





This page is also available in other languages

Sophia Script for Windows

About Sophia Script

Sophia Script for Windows is the most powerful PowerShell module for fine-tuning Windows and automating the routine tasks on GitHub. It offers more than 150 unique tweaks, and shows how Windows can be configured without making any harm to it.

[!IMPORTANT] Every tweak in the preset file has its' corresponding function to restore the default settings. Running the script is best done on a fresh install because running it on wrong tweaked system may result in errors occurring.

[!WARNING] It's allowed to be logged in as one admin user only during application startup.

Sophia Script for Windows may not work on a homebrew Windows.

Table of Contents

How to download

Download via PowerShell

The command will download and expand the latest Sophia Script archive (without running) according which Windows and PowerShell versions it is run on. If you run it on, e.g., Windows 11 via PowerShell 5.1, it will download Sophia Script for Windows 11 PowerShell 5.1.

iwr script.sophia.team -useb | iex

The command will download and expand the latest Sophia Script archive (without running) from the last commit available according which Windows and PowerShell versions it is run on.

iwr sl.sophia.team -useb | iex

Download via Chocolatey

The command will download and expand the latest Sophia Script archive (without running) according which Windows it is run on. If you run it on Windows 11, it will download Sophia Script for Windows 11. For PowerShell 5.1 by default is not otherwise specified.

choco install sophia --force -y

Download Sophia Script for Windows for PowerShell 7.

choco install sophia --params "/PS7" --force -y
# Uninstall Sophia Script
# Then remove downloaded folder manually
choco uninstall sophia --force -y

Download via WinGet

The command downloads only Windows 11 (PowerShell 5.1) archive to your Downloads folder unlike the Chocolatey script and expands it.

$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
winget install --id TeamSophia.SophiaScript --location $DownloadsFolder --accept-source-agreements --force
# Uninstall Sophia Script
winget uninstall --id TeamSophia.SophiaScript --force

From release page

Download archive according to your Windows and PowerShell versions.

How to use

  • Download archive and expand it;
  • Look through the Sophia.ps1 file to configure functions that you want to be run;
    • Place the # char before function if you don't want it to be run.
    • Remove the # char before function if you want it to be run.
  • Copy the whole path to Sophia.ps1
    • On Windows 10 press and hold the Shift key, right click on Sophia.ps1, and click on Copy as path;
    • On Windows 11 right click on Sophia.ps1 and click on Copy as path.
  • Open Windows PowerShell
    • On Windows 10 click File in the File Explorer, hover over Open Windows PowerShell, and select Open Windows PowerShell as Administrator (how-to with screenshots)
    • On Windows 11 right-click on the Windows icon and open Windows Terminal (Admin);
  • Set execution policy to be able to run scripts only in the current PowerShell session;
  Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
  • Type .\Sophia.ps1and press Enter;
  .\Sophia.ps1

Windows 11

https://github.com/user-attachments/assets/2654b005-9577-4e56-ac9e-501d3e8a18bd

Windows 10

https://github.com/user-attachments/assets/f5bda68f-9509-41dc-b3b1-1518aeaee36f

How to run the specific function(s)

  • Do all steps from How to use section and stop at setting execution policy in PowerShell;
  • Dot source the Import-TabCompletion.ps1 file first:
# With a dot at the beginning
. .\Import-TabCompletion.ps1
  • Now you can do like this (the quotation marks required)
Sophia -Functions<TAB>
Sophia -Functions temp<TAB>
Sophia -Functions unin<TAB>
Sophia -Functions uwp<TAB>
Sophia -Functions "DiagTrackService -Disable", "DiagnosticDataLevel -Minimal", UninstallUWPApps

UninstallUWPApps, "PinToStart -UnpinAll"

Or use an old-style format without the TAB functions autocomplete (the quotation marks required)

.\Sophia.ps1 -Functions CreateRestorePoint, "ScheduledTasks -Disable", "WindowsCapabilities -Uninstall"

https://github.com/user-attachments/assets/ea90122a-bdb3-4687-bf8b-9b6e7af46826

Wrapper

Image

@BenchTweakGaming

  • Download the latest Wrapper version;
  • Expand archive;
  • Run SophiaScriptWrapper.exe and import Sophia.ps1;
    • Sophia.ps1 has to be in Sophia Script folder;
    • The Wrapper has a real time UI rendering;
  • Configure every function;
  • Open the Console Output tab and press Run PowerShell.

How to revert changes

  • Do all steps from How to use section and stop at setting execution policy in PowerShell;
  • Dot source the Import-TabCompletion.ps1 file first:
# With a dot at the beginning
. .\Import-TabCompletion.ps1
  • Call functions from Sophia.ps1 you want to revert like this.
Sophia -Functions "DiagTrackService -Enable", UninstallUWPApps

Donations

ko-fi⠀⠀⠀

System Requirements

VersionBuildEdition
Windows 11 24H2Latest stableHome/Pro/Enterprise
Windows 10 x64 22H2Latest stableHome/Pro/Enterprise
Windows 11 Enterprise LTSC 2024Latest stableEnterprise
Windows 10 x64 21H2 Enterprise LTSC 2021Latest stableEnterprise
Windows 10 x64 1809 Enterprise LTSC 2019Latest stableEnterprise

Key features

  • All archives are being built via GitHub Actions automatically;
  • Set up Privacy & Telemetry;
  • Enable DNS-over-HTTPS for IPv4;
  • Turn off diagnostics tracking scheduled tasks with pop-up form written in WPF;
  • Set up UI & Personalization;
  • Uninstall OneDrive "correctly";
  • Interactive prompts;
  • The TAB completion for functions and their arguments (if using the Import-TabCompletion.ps1 file);
  • Change location of the user folders programmatically (without moving user files) within interactive menu using arrows to select a drive
    • Desktop
    • Documents
    • Downloads
    • Music
    • Pictures
    • Videos
  • Install free (light and dark) "Windows 11 Cursors Concept v2" cursors from Jepri Creations on-the-fly;
  • Uninstall UWP apps displaying thier localized packages names;
  • Disable Windows features displaying friendly packages names with pop-up form written in WPF;
  • Uninstall Windows capabilities displaying friendly packages names with pop-up form written in WPF;
  • Download and install the HEVC Video Extensions from Device Manufacturer to be able to open HEVC format;
  • Set an app as default one for specific extension without the "How do you want to open this" pop-up using special function;
  • Export all Windows associations. Associations will be exported as Application_Associations.json file in script root folder;
  • Import exported JSON file after a clean installation. You need to install all apps according to exported JSON file to restore all associations;
  • Install any supported Linux distribution for WSL displaying friendly distro names with pop-up form written in WPF;
  • Create scheduled tasks with a native toast notification, where you will be able to run or dismiss tasks;
    • Create scheduled tasks Windows Cleanup and Windows Cleanup Notification for cleaning up Windows of unused files and Windows updates files;
    • Create a scheduled task SoftwareDistribution for cleaning up %SystemRoot%\SoftwareDistribution\Download;
    • Create a scheduled task Temp for cleaning up %TEMP%.
  • Create tasks in the Task Scheduler to clear
    • %SystemRoot%\SoftwareDistribution\Download
    • %TEMP%
  • Install the latest provided Microsoft Visual C++ 2015–2022 x86/x64;
  • Install the latest provided .NET Desktop Runtime 8, 9 x86/x64;
  • Configure the Windows security;
  • Display all policy registry keys (even manually created ones) in the Local Group Policy Editor snap-in (gpedit.msc);
  • Many more File Explorer and context menu "deep" tweaks.

Screenshots

The TAB autocomplete. Read more here

https://user-images.githubusercontent.com/10544660/225270281-908abad1-d125-4cae-a19b-2cf80d5d2751.mp4

Change user folders location programmatically using the interactive menu

https://user-images.githubusercontent.com/10544660/253818031-b7ce6bf1-d968-41ea-a5c0-27f6845de402.mp4

Localized UWP packages names

Image

Localized Windows features names

Image Image

Download and install any supported Linux distribution in automatic mode

Image

Native interactive toasts for the scheduled tasks

Image

Videos

YT

YT YT

How to translate

  • Get your OS UI culture by invoking $PSUICulture in PowerShell;
  • Create a folder with the UI culture name;
  • Place your localized SophiaScript.psd1 file into this folder.

Media


SophiApp 2 (C# + WinUI 3)

SophiApp 2.0 is in ongoing development. 🚀

Image Image