* We opened our official [Discord](https://discord.gg/sSryhaEv79) channel! Feel free to chat and talk! [![Discord](https://discordapp.com/api/guilds/1006179075263561779/widget.png?style=shield)](https://discord.gg/sSryhaEv79)
* Now it uses officially documented feature to make Windows Terminal to launch as administrator by default by editing `%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json` file.
## Windows 11 21H2/22H2 | Windows 10 2004/20H2/21H1/21H2/22H2 | Enterprise LTSC 2021 | Enterprise LTSC 2019
* Now the repo doesn't keep any 3rd party libraries, and all scripts are built using an updated GitHub Action [config](https://github.com/farag2/Sophia-Script-for-Windows/blob/master/.github/workflows/Sophia.yml);
* 3rd party tools that are downloaded and used;
* [PolicyFileEditor](https://github.com/dlwyatt/PolicyFileEditor) made by @dlwyatt;
* Added awesome `UpdateLGPEPolicies` function :ghost:
* It's common known, that the `gpedit.msc` snap-in doesn't read settings from the Windows registry keys if they were made manually, bypassing the snap-in. This new function lets you update gpedit.msc to make all your policies created manually displayed regardless when registry keys were created. There is no need to run the whole `Sophia Script` — just call `UpdateLGPEPolicies` function. By default this function will be invoked at very end of script running to make all policies registry keys used in the script displayed.
* To check all policies applied to your OS (if they have a record in `gpedit.msc`) after invoking `UpdateLGPEPolicies`, open `gpedit.msc` and navigate to:
* Now it uses `gpedit.msc` path: `HKLM:\Software\Policies\Microsoft\Windows\DataCollection` instead of `HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection`;
* To updated registry keys run `DiagnosticDataLevel -Minimal`.
* Added `SearchHighlights` function to hide search highlights for Windows 10;
* Fixed `UnpinAllStartApps` function;
* Now it's working for Windows 11 22H2 Insider Preview too.
* Removed `Windows10FileExplorer` to enabled `Windows 10 File Explorer` in Windows 11;
* Updated `TaskManagerWindow` function to make it not to be run on Windows 11 22H2;
* Closes #348.
* Fixed a bug in `OpenWindowsTerminalAdminContext` function when you cannot open Windows Terminal as admin in a path ends in a backslash `\`;
* Closes #340. Read more [here](https://github.com/microsoft/terminal/issues/4571).
* Signed all PowerShell files by a self-signed certificates;
* ![image](https://i.imgur.com/9JX5Tvn.png)
*#345 closed;
* Minor changes;
* Updated descriptions;
* Thanks to @THEBOSSMAGNUS
### Sophia Script Wrapper 2.5.4
* Updated translations;
* Works with the latest Sophia Script preset files;
## Windows 11 21H2 | Windows 10 2004/20H2/21H1/21H2 | Enterprise LTSC 2021 | Enterprise LTSC 2019
* Added the checking whether Defender wasn't disabled;
* Fixed `XboxGameBar`;
* To prevent popping up the "You'll need a new app to open this `ms-gamingoverlay`" warning, you need to disable the `Xbox Game Bar` app, even if you uninstalled it before.
* Updated descriptions.
* Check out [SophiApp](https://github.com/Sophia-Community/SophiApp) 1.0.0.23 beta 3 :rocket:
## Windows 11 21H2 | Windows 10 2004/20H2/21H1/21H2 | Enterprise LTSC 2021 | Enterprise LTSC 2019
* Fixed a typo in the `DefaultTerminalApp -WindowsTerminal` function that prevents the function to get the Windows Terminal `PackageFullName` variable value;
* The `WinPrtScrFolder -Desktop` function was improved;
* The `Windows 10 Enterprise LTSC 2019` version is now deprecated and won't be supported. Please, if you an ortodox who likes outdated and abandoned Windows, switch to `Windows 3.11` back, or at least `Windows 10 Enterprise LTSC 2021`;
## Windows 11 21H2 | Windows 10 2004/20H2/21H1/21H2 | Enterprise LTSC 2021 | Enterprise LTSC 2019
* Fixed small bug in the `OneDrive` function that prevents a folder to be removed;
* Fixed small bug in the `OneDrive` function that prevents OneDrive to be downloaded (Microsoft changed the cloud XML silently);
* The `WinPrtScrFolder` function was improved;
* Now it doesn't matter how your preset was named: the fucntion will parse the preset that was loaded into session to find whether the `OneDrive -Uninstall` function was commented out or not;
* Minor changes.
## Sophia Script Wrapper 2.5.3
* More validation for JSON added;
* Backup of `Sophia.ps1` to `Sophia-original.ps1` if using import ps1 file called `Sophia.ps1`;
* Otherwise if importing `x.ps1`, the file will be overwritten if the `Run PowerShell` button is used.
* Added support for Windows 10 Enterprise LTSC 2021;
* Added the `UninstallPCHealthCheck` funtion;
* This application is installed with the [KB5005463](https://support.microsoft.com/en-us/topic/kb5005463-pc-health-check-application-e33cf4e2-49e2-4727-b913-f3c5b1ee0e56) update to check if PC meets the system requirements of Windows 11;
* For Windows 10 only.
* Added the `InstallVCRedistx64` funtion;
* Install the latest supported Microsoft Visual C++ Redistributable 2015—2022 x64;
* The `NotificationAreaIcons`, `TaskbarSize`, `RecentlyAddedAppsAdded` funtions were removed due to lack of necessity;
* Fixed typo in `FileExplorerCompactMode`;
* The values for `Disable` and `Enable` were switched places by mistake;
* Fixed bug in `UpdateMicrosoftProducts`;
* Fixed bug in `IPv6Component`;
* The parameter uses `U+2013` instead of `U+2010` character (hyphen)
* Fixed major in `WinPrtScrFolder` (closes #260);
* It turned out that it has an influence on the OneDrive behavoir. Now the function will be applied only if the preset is configured to remove OneDrive, otherwise the backup functionality for the "Desktop" and "Pictures" folders in OneDrive breaks;
* Merged #264;
* Added `Spotify` for removing to `UninstallUWPApps`;
*`ShareContext` now uses another method that doesn't have an influence on `Windows10FileExplorer`
* And then invoke a new `OpenWindowsTerminalAdminContext` [(how-to)](https://github.com/farag2/Sophia-Script-for-Windows#how-to-run-the-specific-functions);
* Added function to set the Windows 10 style context menu (closes #267);
* Minor changes.
* Check out the 3rd [SophiApp](https://github.com/Sophia-Community/SophiApp) public alpha build :rocket:
* The 4th alpha version 0.0.0.5x will be released soon
* The command will download and expand the archive (`without running`) the latest Sophia Script according which Windows and PowerShell versions it is run on. If you run it on Windows 11 via PowerShell 5.1, it will download Sophia Script for `Windows 11 PowerShell 5.1`.
* Removed `Windows10FileExplorerRibbon` because I "feel" the classic Windows 10 File Explorer days are near and the code will be removed sooner or later in the next Windows 11 builds;
* Add the `OpenWindowsTerminalAdminContext -Show` function for Windows 11 only to allow opening `Windows Terminal` as admin in the Desktop and folders context menu;
* The command will download and expand the archive (`without running`) the latest Sophia Script according which Windows and PowerShell versions it is run on. If you run it on Windows 11 via PowerShell 5.1, it will download Sophia Script for `Windows 11 PowerShell 5.1`.
* Updated functions
*`FirstLogonAnimation`;
*`MappedDrivesAppElevatedAccess`;
*`BackgroundUWPApps`
*`OneDrive -Install`
* Now the function parses the Microsoft official [XML](https://g.live.com/1rewlive5skydrive/OneDriveProduction) to get the link to the latest OneDrive installer
* Closed #240, #241, and #246 as fixed;
* Minor changes.
## Sophia Script Wrapper 2.4
* Updated the German translation again;
* Thanks to @Henry2o1o&@uDEV2019
* You must import `Sophia.ps1` before using the Wrapper now. Disabled controls to do this;
* UI changes (color to highlight important controls);
* Special thanks to `usser_namme` for bug reporting;
* Fixed bug when the `Errors output` function couldn't get path to a file with an error;
* Updated translations;
* Closed #234, #235, and #236 as fixed;
* Now script gets the latest version from [sophia_script_versions.json](https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json) to compare with;
* Added the `IPv6Component -Enable`, `IPv6Component -Disable` functions;
* Disable the Internet Protocol Version 6 (TCP/IPv6) component for all network connections. Before invoking the function, a check will be run whether your ISP supports the IPv6 protocol using https://ipv6-test.com
* Added the `AeroShaking -Enable`, `AeroShaking -Disable` functions;
* When I grab a windows's title bar and shake it, minimize all other windows
*@Inestic has re-writen the `WSL` functions into one with a `WPF form` with list of supported Linux distributions to install. Microsoft has allowed the supported Windows 10 versions to install Linux distributions with [one command](https://devblogs.microsoft.com/commandline/install-wsl-with-a-single-command-now-available-in-windows-10-version-2004-and-higher/) `wsl --install`;
* Windows 10 `19041.1151` (Windows 11) build is minimum needed;
* ![Image](https://i.imgur.com/j2KLZm0.png)
* The `XboxGameBar` function removed;
* Descriptions updated;
* Fixed typos;
* Minor changes.
***
## Windows 11 21H2
<details>
<summary>Features removed compared to Windows 10</summary>
* Hide the Windows welcome experiences after updates and occasionally when I sign in to highlight what's new and suggested
*`WindowsWelcomeExperience -Hide`
* Hide Cortana button on the taskbar
* C`ortanaButton -Hide`
* Hide the "3D Objects" folder in "This PC" and Quick access
*`3DObjects -Hide`
* Hide People button on the taskbar
*`PeopleTaskbar -Hide`
* Hide seconds on the taskbar clock
*`SecondsInSystemClock -Show`
* Hide the search on the taskbar
*`TaskbarSearch -Hide`
* Hide the Windows Ink Workspace button on the taskbar
* Added online check for the latest Wrapper version. If you are using old version it will exit;
* Added online check for the latest imported script version. If you are using old version it will disable directly running (run PowerShell button disabled);
* Added functions `NewsInterests -Hide`&`NewsInterests -Show` to configure "News and Interests" on the taskbar;
*#184 closed.
* Updated the `CABInstallContext -Add` function;
* If the .cab file extension type associated to open with a third party app by default, the "Install" context menu item won't be displayed, so the default association for the .cab file type will be restored forcedly.
* Updated the French translation;
*#181 closed. Thanks @couleurm.
* Minor changes. :feelsgood:
***
* Sophia Script Wrapper was rewritten from the scratch;
* Redefined UI and UX;
* Many bugs fixed.
* Supports LTSC and the current supported Windows 10 editions;
* Dark and light themes;
* Just import the `Sophia.ps1` file and all functions will be set up automatically.
* Moved all localization files to the `Localizations` folder;
![image](https://i.imgur.com/kQDktvj.png)
* Fixed bug in the `EventViewerCustomView` function when the `ProcessCreation.xml` file was being created with a wrong encodings;
* You may invoke the function again: `EventViewerCustomView -Enable`.
* Updated the GitHub Action [config](https://github.com/farag2/Windows-10-Sophia-Script/blob/master/.github/workflows/Sophia.yml) to automate the SHA256 file creation and uploading to the release page. As @aaronhatesregex wanted 😄
* Updated the Turkish translation. Thanks to @v30xy;
* Added the Hungarian translation <imgsrc="https://upload.wikimedia.org/wikipedia/commons/c/c1/Flag_of_Hungary.svg"height="11px"/>. Thanks to @84stangman;
* Updated Sophia Script Wrapper to 1.1 build 5;
* The read/edit button function can now edit all functions in 'Sophia.psm1' file;
* The wrapper now creates a 'Sophia_edited.ps1' file in Sophia Script folder to run instead of overwriting the existing one.
* The code from moved to the `Functions.ps1` file;
* If you want to call the specific function you need to [dot source](https://docs.microsoft.com/ru-ru/powershell/module/microsoft.powershell.core/about/about_operators#dot-sourcing-operator-) the `Functions.ps1` first
* The `TempFolders` and the `OneDrive` functions update
*`TempFolders` totally rewritten using the `MoveFileExA` [function](https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-movefileexa)
* Now with the `MOVEFILE_DELAY_UNTIL_REBOOT` flag all unremovable files and folder will be removed after reboot (log off) automatically. After that the temporary scheduled task will create a symobolic link and remove itself;
* By loading the `WinRT.Runtime.dll` (289 KB) and `Microsoft.Windows.SDK.NET.dll` (25,4 MB) assemblies (both are being downloaded and archived by GitHub Actions) it becomes possible to get localized UWP apps packages names too;
* Splited into two functions: `Windows Cleanup` and `Windows Cleanup Notification`. `Windows Cleanup Notification` enables you the option to run the cleanup task or not. The `Windows Cleanup Notification` function runs once every month and displays native toast notification where you can choose to snooze (with drop down menu time reminder), run the cleanup task now or dismiss. You will be asked for this notification about Windows cleanup once a month.
![Image](https://i.imgur.com/cZC40Fi.png)
* To update the existing `Windows Cleanup` function run (no need to restart)
```powershell
.\Sophia.ps1 -Functions "CleanUpTask -Register"
```
* Added `MeetNow` function;
* Hide or show the `Meet Now` icon in the system tray;
* Updated Sophia Script Wrapper
* Fixed `LeaveAlone` outputting to script when pressing `Output PowerShell`;
* Moved Tooltips `ControlPanelView` to `Other` section;
* Now, wherever the `-UnpinAll` (unpin all tiles) argument is placed, it will always be executed first, to avoid the situation when the tiles were pinned and then all were unpinned;
* The `HEIF` function huge update
* Now it's possible to open Microsoft Store extension page manually (`-Manual` argument) or download and install (`-Install` argument) appx package directly from Microsoft server using the <https://store.rg-adguard.net> parser;
* Built upon awesome @KaiWalter [function](https://dev.to/kaiwalter/download-windows-store-apps-with-powershell-from-https-store-rg-adguard-net-155m); :rocket:
* Thanks to [iNNOKENTIY21](https://forum.ru-board.com/profile.cgi?action=show&member=iNNOKENTIY21) for the tips.
* Now it's able to register an app, calculate special hash, and set as default for specific extension without the ["How do you want to open this"](https://filestore.community.support.microsoft.com/api/images/2383a021-b035-40b5-8d9b-b935cbb713e3) pop-up
* Built upon awesome @Danyfirex [function](https://github.com/DanysysTeam/PS-SFTA); :rocket:
* Learn more about the problem: <https://stackoverflow.com/a/49256437/8315671>;
* At last we created the video how to use Sophia Script!
* The `PinControlPanel`, `PinDevicesPrinters`, `PinCommandPrompt`, and `UnpinAllStartTiles` functions were rewritten into one, `PinToStart`
* Now it's possible to pin Control Panel, Device and Printers, and PowerShell shortcuts without using the `syspin` app — just pure PowerShell! syspin was removed.
* Now all archives are being created and uploaded to the release page via [GitHub Actions](https://github.com/farag2/Windows-10-Sophia-Script/blob/master/.github/workflows/Sophia.yml);
* When running the script using ```.\Sophia.ps1 -Functions "FunctionName1 -Parameter"``` regardless of the functions entered as an argument, the `Checks` function will be executed first, and the ```Refresh``` and ```Errors``` functions will be executed at the end;
* Code refactoring for the ```ScheduledTasks```, ```WindowsFeatures```, ```WindowsCapabilities``` & ```UninstallUWPApps```
* The ```WindowsFeatures``` function generates **friendly** Windows features names instead of packages names :rocket:
* The ```WindowsCapabilities``` function generates **friendly** Windows capabilities names instead of packages names :rocket:
* The ```UninstallUWPApps``` function generates **friendly** UWP apps names instead of packages names :rocket:
* Clicking on "Uninstall for all users" dynamically generates UWP apps list for all users and vice versa. Currently works only on PowerShell 5.1 :thinking:
* Thanks to [iNNOKENTIY21](https://forum.ru-board.com/profile.cgi?action=show&member=iNNOKENTIY21) &@oz-zo
* Thnx to [YuS 2](https://forum.ru-board.com/profile.cgi?action=show&member=YuS%202) & [iNNOKENTIY21](https://forum.ru-board.com/profile.cgi?action=show&member=iNNOKENTIY21) for spending their time.
* The ```MediaPlayback``` feature in the ```WindowsFeatures``` function is unchecked now by default. Thnx to [Nevals](https://forums.mydigitallife.net/members/nevals.1442013)
* Added ```Logging``` function using the ```Start-Transcript``` cmdlet. Commented out by default.
* To stop logging just close the console or type ```Stop-Transcript```. The log will be being recorded into the script folder
* Added ```AppsLanguageSwitch``` function. Lets use a different input method for each app window. Thanks to [WindR](https://forum.ru-board.com/profile.cgi?action=show&member=WindR)
* Updated the Italian translation. Closed #103. Thanks to @garf02;
* Updated syspin app up to the 0.99.9.1;
* Minor changes. :feelsgood:
* Added the New Year ```easter egg``` to the console title! :hand_over_mouth:
* Some functions were updated and improved, especially
* ```ScheduledTasks```, ```WindowsFeatures```, ```WindowsCapabilities``` now support arguments to load pop-up dialog box;
* ```SetUserShellFolderLocation``` gets ```-Custom``` argument (commented out by default) to select a folder for the location of the user folders manually using a folder browser dialog. Closed #98;
* Fixed and changed method for saving code for creating the "Windows Cleanup" task in ```CleanUpTask``` function;
* There won't be any more AV false positives. Better to reregistre task again. Sometimes a toast didn't even load and the task runs forever. LOL
* Updated the ```Sophia.ps1``` preset file. Use the new one;
* Added Spanish localization :es:. Thanks to @AnxoMJ;
* Updated, improved and simplified all localizations. Thanks to all translators;
* Now available in: :uk: :cn: :de: :fr: :it: :ru: :ukraine: :tr: :es:
* Now available in: Available in: <imgsrc="https://upload.wikimedia.org/wikipedia/commons/a/ae/Flag_of_the_United_Kingdom.svg"height="11px"/><imgsrc="https://upload.wikimedia.org/wikipedia/commons/f/fa/Flag_of_the_People's_Republic_of_China.svg"height="11px"/><imgsrc="https://upload.wikimedia.org/wikipedia/commons/b/ba/Flag_of_Germany.svg"height="11px"/><imgsrc="https://upload.wikimedia.org/wikipedia/commons/c/c3/Flag_of_France.svg"height="11px"/><imgsrc="https://upload.wikimedia.org/wikipedia/commons/0/03/Flag_of_Italy.svg"height="11px"/><imgsrc="https://upload.wikimedia.org/wikipedia/commons/f/f3/Flag_of_Russia.svg"height="11px"/><imgsrc="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg"height="11px"/><imgsrc="https://upload.wikimedia.org/wikipedia/commons/b/b4/Flag_of_Turkey.svg"height="11px"/>
Also guy from [benchtweakgaming.com](https://benchtweakgaming.com/2020/11/12/windows-10-debloat-tool/) created a GUI wrapper for the script. Hope it'll help! 🗡️
* The translations are moved to separate files ```Sophia.psd1```;
* To translate into your language you should
* Create a folder with the appropriate future localization name;
```powershell
$PSUICulture
```
* Place the translation into this folder without changing the file name (```Sophia.psd1```)
* Thanks to [FrankSinatra](https://habr.com/ru/users/FrankSinatra/) & [westlife](http://forum.ru-board.com/profile.cgi?action=show&member=westlife) for the tip.
* "DisableSuggestedContent" function renamed into "DisableWhatsNewInWindows";
* "EnableSuggestedContent" function renamed into "EnableWhatsNewInWindows";
* Closed #65, #71, #72 thanks to [westlife](http://forum.ru-board.com/profile.cgi?action=show&member=westlife);
* Added "Turn on Windows 10 20H2 new Start style" section. The new Start style described [here](https://www.windowslatest.com/2020/08/02/windows-10-2004-gets-20h2-features/);
* Added "Install the Windows Subsystem for Linux (WSL)" section;
* Added new package "Microsoft.Photos.MediaEngineDLC" to the $UncheckedAppxPackages variable in "Uninstall UWP apps" section;
* region Edge removed (only for 1903/1909 Version);
* In Windows 10 the "Turn on automatic recommended troubleshooting and tell when problems get fixed" feature was renamed into "Run troubleshooters automatically, then notify"
* Fixed bug in "Show accent color on Start, taskbar, and action center" section;
* The "Change location of the user folders" section was rewritten into interactive menu using up/down arrows and Enter key to make a selection (menu by [MaxKozlov](https://qna.habr.com/user/MaxKozlov))
* A user will be prompted to select the drive letter where the user folders will be moved programmatically
* The task "Update cleanup" in the Task Scheduler renamed into "Windows Cleanup";
* Comments;
* Minor changes;
* Thanks [YuS_2](http://forum.ru-board.com/profile.cgi?action=show&member=YuS_2) and [westlife](http://forum.ru-board.com/profile.cgi?action=show&member=westlife) for the tips.
## 4.2.1 — 16.05.2020
## Windows 10 2004 | 1903/1909
* Now the form for removing capabilities and UWP apps will not be initialized if there are no elements for removal;
* Added for the all tasks in the Task Scheduler a description displayed in the "Description" section;
* Fixed bug in "Include command line in process creation events" section
* Minor changes;
* Thanks [4r0](http://forum.ru-board.com/profile.cgi?action=show&member=4r0) for found bugs.
## 4.2 — 12.05.2020
## Windows 10 2004 | 1903/1909
* Now the script will not be executed by PowerShell ISE;
* Moved from the "Read-Host" cmdlet to $Host.UI.PromptForChoice();
* Updated "Create a task in the Task Scheduler to start Windows cleaning up";
* A [toast notification](https://docs.microsoft.com/ru-ru/windows/uwp/design/shell/tiles-and-notifications/adaptive-interactive-toasts) will be activated before starting cleaning up;
* Now cleanmgr.exe window starts minimized;
* Now using DISM to clean up unused Windows updates instead of cleanmgr.exe
* Added Internet connection test in "Pin the shortcuts to Start" section to ensure syspin.exe will be downloaded from GitHub. Anyway it can be loaded locally;
* The following sections transferred from CLI to GUI
* Turn on Controlled folder access and add protected folders;
* Allow an app through Controlled folder access;
* Add exclusion folder from Microsoft Defender Antivirus scanning;
* Add exclusion file from Windows Defender Antivirus scanning.
* Now even after restarting File Explorer your opened folders will be restored
* "Uninstall all UWP apps from all accounts, except the followings..." section
* "Uninstall all provisioned UWP apps from System account, except the followings..." section
* Now displays progress bar while uninstalling
* Deleted "Checking whether the script was saved in UTF-8 with BOM encoding if it runs locally" section
* There is [no way](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/staging/reference/docs-conceptual/components/vscode/understanding-file-encoding.md#common-causes-of-encoding-issues) for PowerShell to automatically determine the file encoding
* The "Save screenshots by pressing Win+PrtScr to the Desktop" section was moved to the "Set location of the "Desktop", "Documents" "Downloads" "Music", "Pictures", and "Videos"" section
* Fixes saving a screenshot when it was saved in the old desktop folder if the path to the desktop was changed after that.
* Reorganized the "UI & Personalization" directive
* Translations
* Removed unnecessary keys in the "OneDrive" section. To remove them, execute
command to "Turn on automatic recommended troubleshooting and tell when problems get fixed" section due to the diagnostic data level needs to be set to "Full" in order to work;