Browse Source

6.2.2 02.11.2022

pull/411/head
Dmitry Nefedov 2 years ago
parent
commit
5eb0d7a132
  1. 4
      src/Sophia_Script_for_Windows_10/Functions.ps1
  2. 2
      src/Sophia_Script_for_Windows_10/Localizations/de-DE/Sophia.psd1
  3. 2
      src/Sophia_Script_for_Windows_10/Localizations/en-US/Sophia.psd1
  4. 2
      src/Sophia_Script_for_Windows_10/Localizations/es-ES/Sophia.psd1
  5. 2
      src/Sophia_Script_for_Windows_10/Localizations/fr-FR/Sophia.psd1
  6. 2
      src/Sophia_Script_for_Windows_10/Localizations/hu-HU/Sophia.psd1
  7. 2
      src/Sophia_Script_for_Windows_10/Localizations/it-IT/Sophia.psd1
  8. 2
      src/Sophia_Script_for_Windows_10/Localizations/pt-BR/Sophia.psd1
  9. 2
      src/Sophia_Script_for_Windows_10/Localizations/ru-RU/Sophia.psd1
  10. 2
      src/Sophia_Script_for_Windows_10/Localizations/tr-TR/Sophia.psd1
  11. 2
      src/Sophia_Script_for_Windows_10/Localizations/uk-UA/Sophia.psd1
  12. 2
      src/Sophia_Script_for_Windows_10/Localizations/zh-CN/Sophia.psd1
  13. 2
      src/Sophia_Script_for_Windows_10/Manifest/Sophia.psd1
  14. 66
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  15. 4
      src/Sophia_Script_for_Windows_10/Sophia.ps1
  16. 4
      src/Sophia_Script_for_Windows_10_LTSC_2019/Functions.ps1
  17. 2
      src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/de-DE/Sophia.psd1
  18. 2
      src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/en-US/Sophia.psd1
  19. 2
      src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/es-ES/Sophia.psd1
  20. 2
      src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/fr-FR/Sophia.psd1
  21. 2
      src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/hu-HU/Sophia.psd1
  22. 2
      src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/it-IT/Sophia.psd1
  23. 2
      src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/pt-BR/Sophia.psd1
  24. 2
      src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/ru-RU/Sophia.psd1
  25. 2
      src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/tr-TR/Sophia.psd1
  26. 2
      src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/uk-UA/Sophia.psd1
  27. 2
      src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/zh-CN/Sophia.psd1
  28. 2
      src/Sophia_Script_for_Windows_10_LTSC_2019/Manifest/Sophia.psd1
  29. 16
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  30. 4
      src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1
  31. 4
      src/Sophia_Script_for_Windows_10_LTSC_2021/Functions.ps1
  32. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/de-DE/Sophia.psd1
  33. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/en-US/Sophia.psd1
  34. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/es-ES/Sophia.psd1
  35. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/fr-FR/Sophia.psd1
  36. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/hu-HU/Sophia.psd1
  37. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/it-IT/Sophia.psd1
  38. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/pt-BR/Sophia.psd1
  39. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/ru-RU/Sophia.psd1
  40. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/tr-TR/Sophia.psd1
  41. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/uk-UA/Sophia.psd1
  42. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/zh-CN/Sophia.psd1
  43. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Manifest/Sophia.psd1
  44. 16
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  45. 4
      src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1
  46. 4
      src/Sophia_Script_for_Windows_10_PowerShell_7/Functions.ps1
  47. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/de-DE/Sophia.psd1
  48. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/en-US/Sophia.psd1
  49. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/es-ES/Sophia.psd1
  50. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/fr-FR/Sophia.psd1
  51. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/hu-HU/Sophia.psd1
  52. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/it-IT/Sophia.psd1
  53. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/pt-BR/Sophia.psd1
  54. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/ru-RU/Sophia.psd1
  55. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/tr-TR/Sophia.psd1
  56. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/uk-UA/Sophia.psd1
  57. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/zh-CN/Sophia.psd1
  58. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Manifest/Sophia.psd1
  59. 66
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  60. 4
      src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1
  61. 4
      src/Sophia_Script_for_Windows_11/Functions.ps1
  62. 2
      src/Sophia_Script_for_Windows_11/Localizations/de-DE/Sophia.psd1
  63. 2
      src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1
  64. 2
      src/Sophia_Script_for_Windows_11/Localizations/es-ES/Sophia.psd1
  65. 2
      src/Sophia_Script_for_Windows_11/Localizations/fr-FR/Sophia.psd1
  66. 2
      src/Sophia_Script_for_Windows_11/Localizations/hu-HU/Sophia.psd1
  67. 2
      src/Sophia_Script_for_Windows_11/Localizations/it-IT/Sophia.psd1
  68. 2
      src/Sophia_Script_for_Windows_11/Localizations/pt-BR/Sophia.psd1
  69. 2
      src/Sophia_Script_for_Windows_11/Localizations/ru-RU/Sophia.psd1
  70. 2
      src/Sophia_Script_for_Windows_11/Localizations/tr-TR/Sophia.psd1
  71. 2
      src/Sophia_Script_for_Windows_11/Localizations/uk-UA/Sophia.psd1
  72. 2
      src/Sophia_Script_for_Windows_11/Localizations/zh-CN/Sophia.psd1
  73. 2
      src/Sophia_Script_for_Windows_11/Manifest/Sophia.psd1
  74. 66
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  75. 4
      src/Sophia_Script_for_Windows_11/Sophia.ps1
  76. 4
      src/Sophia_Script_for_Windows_11_PowerShell_7/Functions.ps1
  77. 2
      src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/de-DE/Sophia.psd1
  78. 2
      src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/en-US/Sophia.psd1
  79. 2
      src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/es-ES/Sophia.psd1
  80. 2
      src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/fr-FR/Sophia.psd1
  81. 2
      src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/hu-HU/Sophia.psd1
  82. 2
      src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/it-IT/Sophia.psd1
  83. 2
      src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/pt-BR/Sophia.psd1
  84. 2
      src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/ru-RU/Sophia.psd1
  85. 2
      src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/tr-TR/Sophia.psd1
  86. 2
      src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/uk-UA/Sophia.psd1
  87. 2
      src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/zh-CN/Sophia.psd1
  88. 2
      src/Sophia_Script_for_Windows_11_PowerShell_7/Manifest/Sophia.psd1
  89. 66
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1
  90. 4
      src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

4
src/Sophia_Script_for_Windows_10/Functions.ps1

@ -2,7 +2,7 @@
.SYNOPSIS
The TAB completion for functions and their arguments
Version: v5.14.1
Version: v5.14.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -54,7 +54,7 @@ function Sophia
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.14.1 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.14.2 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

2
src/Sophia_Script_for_Windows_10/Localizations/de-DE/Sophia.psd1

@ -12,7 +12,7 @@ bin = Im Ordner "bin" befinden sich keine
RebootPending = Der PC wartet darauf, neu gestartet zu werden
UnsupportedRelease = Neue Version gefunden
CustomizationWarning = \nHaben Sie alle Funktionen in der voreingestellten Datei {0} angepasst, bevor Sie Sophia Script ausführen?
WindowsBroken = \nEinige Windows-Komponenten sind möglicherweise beschädigt
WindowsBroken = Einige Windows-Komponenten sind möglicherweise beschädigt
ControlledFolderAccessDisabled = Kontrollierter Ordnerzugriff deaktiviert
ScheduledTasks = Geplante Aufgaben
OneDriveUninstalling = OneDrive deinstallieren

2
src/Sophia_Script_for_Windows_10/Localizations/en-US/Sophia.psd1

@ -12,7 +12,7 @@ bin = There are no files in the bin folder
RebootPending = The PC is waiting to be restarted
UnsupportedRelease = A new version found
CustomizationWarning = \nHave you customized every function in the {0} preset file before running Sophia Script?
WindowsBroken = \nSome Windows components may have been broken
WindowsBroken = Some Windows components may have been broken
ControlledFolderAccessDisabled = Controlled folder access disabled
ScheduledTasks = Scheduled tasks
OneDriveUninstalling = Uninstalling OneDrive...

2
src/Sophia_Script_for_Windows_10/Localizations/es-ES/Sophia.psd1

@ -12,7 +12,7 @@ bin = No hay archivos en la carpeta bin. P
RebootPending = El PC está esperando a ser reiniciado
UnsupportedRelease = Una nueva versión encontrada
CustomizationWarning = \n¿Ha personalizado todas las funciones del archivo predeterminado {0} antes de ejecutar Sophia Script?
WindowsBroken = \nEs posible que se hayan roto algunos componentes de Windows
WindowsBroken = Es posible que se hayan roto algunos componentes de Windows
ControlledFolderAccessDisabled = Acceso a la carpeta controlada deshabilitado
ScheduledTasks = Tareas programadas
OneDriveUninstalling = Desinstalar OneDrive...

2
src/Sophia_Script_for_Windows_10/Localizations/fr-FR/Sophia.psd1

@ -12,7 +12,7 @@ bin = Il n'y a pas de fichiers dans le dos
RebootPending = Le PC attend d'être redémarré
UnsupportedRelease = Nouvelle version trouvée
CustomizationWarning = \nAvez-vous personnalisé chaque fonction du fichier de préréglage {0} avant d'exécuter Sophia Script?
WindowsBroken = \nCertains composants Windows peuvent avoir été endommagés
WindowsBroken = Certains composants Windows peuvent avoir été endommagés
ControlledFolderAccessDisabled = Contrôle d'accès aux dossiers désactivé
ScheduledTasks = Tâches planifiées
OneDriveUninstalling = Désinstalltion de OneDrive...

2
src/Sophia_Script_for_Windows_10/Localizations/hu-HU/Sophia.psd1

@ -12,7 +12,7 @@ bin = A bin mappában nincsenek fájlok. K
RebootPending = A számítógép újraindításra vár
UnsupportedRelease = Új verzió érhető el
CustomizationWarning = \nSzemélyre szabott minden opciót a {0} preset fájlban, mielőtt futtatni kívánja a Sophia szkriptet?
WindowsBroken = \nElőfordulhat, hogy a Windows egyes összetevői elromoltak
WindowsBroken = Előfordulhat, hogy a Windows egyes összetevői elromoltak
ControlledFolderAccessDisabled = Vezérelt mappához való hozzáférés kikapcsolva
ScheduledTasks = Ütemezett feladatok
OneDriveUninstalling = OneDrive eltávolítása...

2
src/Sophia_Script_for_Windows_10/Localizations/it-IT/Sophia.psd1

@ -12,7 +12,7 @@ bin = Non ci sono file nella cartella bin.
RebootPending = Il PC è in attesa di essere riavviato
UnsupportedRelease = Nuova versione trovata
CustomizationWarning = \nSono state personalizzate tutte le funzioni nel file di configurazione {0} prima di eseguire Sophia Script?
WindowsBroken = \nAlcuni componenti di Windows potrebbero essere rotti
WindowsBroken = Alcuni componenti di Windows potrebbero essere rotti
ControlledFolderAccessDisabled = l'accesso alle cartelle controllata disattivata
ScheduledTasks = Attività pianificate
OneDriveUninstalling = Disinstallazione di OneDrive...

2
src/Sophia_Script_for_Windows_10/Localizations/pt-BR/Sophia.psd1

@ -12,7 +12,7 @@ bin = Não existem ficheiros na pasta bin.
RebootPending = O PC está esperando para ser reiniciado
UnsupportedRelease = Nova versão encontrada
CustomizationWarning = \nVocê personalizou todas as funções no arquivo de predefinição {0} antes de executar o Sophia Script?
WindowsBroken = \nAlguns componentes do Windows podem ter sido quebrados
WindowsBroken = Alguns componentes do Windows podem ter sido quebrados
ControlledFolderAccessDisabled = Acesso controlado a pasta desativada
ScheduledTasks = Tarefas agendadas
OneDriveUninstalling = Desinstalar OneDrive...

2
src/Sophia_Script_for_Windows_10/Localizations/ru-RU/Sophia.psd1

@ -12,7 +12,7 @@ bin = В папке bin отсутству
RebootPending = Компьютер ожидает перезагрузки
UnsupportedRelease = Обнаружена новая версия
CustomizationWarning = \nВы настроили все функции в пресет-файле {0} перед запуском Sophia Script?
WindowsBroken = \nНекоторые компоненты Windows могли быть повреждены
WindowsBroken = Некоторые компоненты Windows могли быть повреждены
ControlledFolderAccessDisabled = Контролируемый доступ к папкам выключен
ScheduledTasks = Запланированные задания
OneDriveUninstalling = Удаление OneDrive...

2
src/Sophia_Script_for_Windows_10/Localizations/tr-TR/Sophia.psd1

@ -12,7 +12,7 @@ bin = bin klasöründe dosya yok. Lütfen
RebootPending = PC yeniden başlatılmayı bekliyor
UnsupportedRelease = Yeni sürüm bulundu
CustomizationWarning = \nSophia Script'i çalıştırmadan önce {0} ön ayar dosyasındaki her işlevi özelleştirdiniz mi?
WindowsBroken = \nBazı Windows bileşenleri bozulmuş olabilir
WindowsBroken = Bazı Windows bileşenleri bozulmuş olabilir
ControlledFolderAccessDisabled = Kontrollü klasör erişimi devre dışı bırakıldı
ScheduledTasks = Zamanlanan görevler
OneDriveUninstalling = OneDrive kaldırılıyor...

2
src/Sophia_Script_for_Windows_10/Localizations/uk-UA/Sophia.psd1

@ -12,7 +12,7 @@ bin = У папці bin немає фай
RebootPending = Комп'ютер очікує на перезавантаження
UnsupportedRelease = Виявлено нову версію
CustomizationWarning = \nВи налаштували всі функції в пресет-файлі {0} перед запуском Sophia Script?
WindowsBroken = \nДеякі компоненти Windows можуть бути пошкоджені
WindowsBroken = Деякі компоненти Windows можуть бути пошкоджені
ControlledFolderAccessDisabled = Контрольований доступ до папок вимкнений
ScheduledTasks = Заплановані задачі
OneDriveUninstalling = Видалення OneDrive...

2
src/Sophia_Script_for_Windows_10/Localizations/zh-CN/Sophia.psd1

@ -12,7 +12,7 @@ bin = bin文件夹中没有文件。请重
RebootPending = 计算机正在等待重新启动
UnsupportedRelease = 找到新版本
CustomizationWarning = \n在运行Sophia Script之前您是否已自定义{0}预设文件中的每个函数
WindowsBroken = \n某些 Windows 组件可能已损坏
WindowsBroken = 某些 Windows 组件可能已损坏
ControlledFolderAccessDisabled = 受控文件夹访问已禁用
ScheduledTasks = 计划任务
OneDriveUninstalling = 卸载OneDrive

2
src/Sophia_Script_for_Windows_10/Manifest/Sophia.psd1

@ -1,6 +1,6 @@
@{
RootModule = '..\Module\Sophia.psm1'
ModuleVersion = '5.14.1'
ModuleVersion = '5.14.2'
GUID = '109cc881-c42b-45af-a74a-550781989d6a'
Author = 'Dmitry "farag" Nefedov'
Copyright = '(c) 2014—2022 farag & Inestic. All rights reserved'

66
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -2,7 +2,7 @@
.SYNOPSIS
Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks
Version: v5.14.1
Version: v5.14.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -10,9 +10,6 @@
Thanks to all https://forum.ru-board.com members involved
.NOTES
Running the script is best done on a fresh install because running it on wrong tweaked system may result in errors occurring
.NOTES
Supported Windows 10 versions
Versions: 21H2/22H2+
@ -20,10 +17,6 @@
Editions: Home/Pro/Enterprise
Architecture: x64
.NOTES
Set execution policy to be able to run scripts only in the current PowerShell session:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
.LINK GitHub
https://github.com/farag2/Sophia-Script-for-Windows
@ -572,6 +565,11 @@ function script:Set-Policy
$Value
)
if (-not (Test-Path -Path "$env:SystemRoot\System32\gpedit.msc"))
{
return
}
switch ($Type)
{
"CLEAR"
@ -6260,6 +6258,8 @@ function NetworkAdaptersSavePower
$Enable
)
Write-Verbose -Message $Localization.Patient -Verbose
if (Get-NetAdapter -Physical | Where-Object -FilterScript {$_.Status -eq "Up"})
{
$PhysicalAdaptersStatusUp = @((Get-NetAdapter -Physical | Where-Object -FilterScript {$_.Status -eq "Up"}).Name)
@ -10695,7 +10695,7 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
<#
.SYNOPSIS
Install "HEVC Video Extensions from Device Manufacturer" to be able to open .heic and .heif formats
"HEVC Video Extensions from Device Manufacturer" extension
.PARAMETER Install
Download and install the "HEVC Video Extensions from Device Manufacturer" extension
@ -10745,7 +10745,7 @@ function HEIF
"Install"
{
# Check whether the extension is already installed
if ((Get-AppxPackage -Name Microsoft.HEVCVideoExtension) -and (Get-AppxPackage -Name Microsoft.Windows.Photos))
if (-not ((Get-AppxPackage -Name Microsoft.HEVCVideoExtension) -and (Get-AppxPackage -Name Microsoft.Windows.Photos)))
{
return
}
@ -10766,9 +10766,9 @@ function HEIF
try
{
# Check whether https://github.com is alive
# Check whether https://store.rg-adguard.net is alive
$Parameters = @{
Uri = "https://github.com"
Uri = "https://store.rg-adguard.net/api/GetFiles"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
@ -10778,20 +10778,44 @@ function HEIF
return
}
# https://github.com/farag2/Sophia-Script-for-Windows/tree/master/Misc
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Body = @{
type = "url"
url = "https://www.microsoft.com/store/productId/9n4wgh0z6vhq"
ring = "Retail"
lang = "en-US"
}
$Parameters = @{
Uri = "https://github.com/farag2/Sophia-Script-for-Windows/raw/master/Misc/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
UseBasicParsing = $true
Verbose = $true
Uri = "https://store.rg-adguard.net/api/GetFiles"
Method = "Post"
ContentType = "application/x-www-form-urlencoded"
Body = $Body
Verbose = $true
}
$Raw = Invoke-WebRequest @Parameters
# Parsing the page
$Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process {
$TempURL = ($_.Groups | Select-Object -Index 1).Value
$HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1
}
Invoke-WebRequest @Parameters
# Installing "HEVC Video Extensions from Device Manufacturer"
Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Verbose
if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
{
Write-Verbose -Message $Localization.Patient -Verbose
Write-Verbose -Message $Localization.HEVCDownloading -Verbose
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Parameters = @{
Uri = $TempURL
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx"
Verbose = $true
}
Invoke-WebRequest @Parameters
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Force
Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Verbose
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
}
}
catch [System.Net.WebException]
{

4
src/Sophia_Script_for_Windows_10/Sophia.ps1

@ -2,7 +2,7 @@
.SYNOPSIS
Default preset file for "Sophia Script for Windows 10"
Version: v5.14.1
Version: v5.14.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -74,7 +74,7 @@ param
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.14.1 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.14.2 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

4
src/Sophia_Script_for_Windows_10_LTSC_2019/Functions.ps1

@ -2,7 +2,7 @@
.SYNOPSIS
The TAB completion for functions and their arguments
Version: v5.4.1
Version: v5.4.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -54,7 +54,7 @@ function Sophia
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC 2019 v5.4.1 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC 2019 v5.4.2 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows 10 | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

2
src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/de-DE/Sophia.psd1

@ -12,7 +12,7 @@ bin = Im Ordner "bin" befinden sich keine
RebootPending = Der PC wartet darauf, neu gestartet zu werden
UnsupportedRelease = Neue Version gefunden
CustomizationWarning = \nHaben Sie alle Funktionen in der voreingestellten Datei {0} angepasst, bevor Sie Sophia Script ausführen?
WindowsBroken = \nEinige Windows-Komponenten sind möglicherweise beschädigt
WindowsBroken = Einige Windows-Komponenten sind möglicherweise beschädigt
ControlledFolderAccessDisabled = Kontrollierter Ordnerzugriff deaktiviert
ScheduledTasks = Geplante Aufgaben
WindowsFeaturesTitle = Windows-Features

2
src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/en-US/Sophia.psd1

@ -12,7 +12,7 @@ bin = There are no files in the bin folder
RebootPending = The PC is waiting to be restarted
UnsupportedRelease = A new version found
CustomizationWarning = \nHave you customized every function in the {0} preset file before running Sophia Script?
WindowsBroken = \nSome Windows components may have been broken
WindowsBroken = Some Windows components may have been broken
ControlledFolderAccessDisabled = Controlled folder access disabled
ScheduledTasks = Scheduled tasks
WindowsFeaturesTitle = Windows features

2
src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/es-ES/Sophia.psd1

@ -12,7 +12,7 @@ bin = No hay archivos en la carpeta bin. P
RebootPending = El PC está esperando a ser reiniciado
UnsupportedRelease = Una nueva versión encontrada
CustomizationWarning = \n¿Ha personalizado todas las funciones del archivo predeterminado {0} antes de ejecutar Sophia Script?
WindowsBroken = \nEs posible que se hayan roto algunos componentes de Windows
WindowsBroken = Es posible que se hayan roto algunos componentes de Windows
ControlledFolderAccessDisabled = Acceso a la carpeta controlada deshabilitado
ScheduledTasks = Tareas programadas
WindowsFeaturesTitle = Características de Windows

2
src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/fr-FR/Sophia.psd1

@ -12,7 +12,7 @@ bin = Il n'y a pas de fichiers dans le dos
RebootPending = Le PC attend d'être redémarré
UnsupportedRelease = Nouvelle version trouvée
CustomizationWarning = \nAvez-vous personnalisé chaque fonction du fichier de préréglage {0} avant d'exécuter Sophia Script?
WindowsBroken = \nCertains composants Windows peuvent avoir été endommagés
WindowsBroken = Certains composants Windows peuvent avoir été endommagés
ControlledFolderAccessDisabled = Contrôle d'accès aux dossiers désactivé
ScheduledTasks = Tâches planifiées
WindowsFeaturesTitle = Fonctionnalités

2
src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/hu-HU/Sophia.psd1

@ -12,7 +12,7 @@ bin = A bin mappában nincsenek fájlok. K
RebootPending = A számítógép újraindításra vár
UnsupportedRelease = Új verzió érhető el
CustomizationWarning = \nSzemélyre szabott minden opciót a {0} preset fájlban, mielőtt futtatni kívánja a Sophia szkriptet?
WindowsBroken = \nElőfordulhat, hogy a Windows egyes összetevői elromoltak
WindowsBroken = Előfordulhat, hogy a Windows egyes összetevői elromoltak
ControlledFolderAccessDisabled = Vezérelt mappához való hozzáférés kikapcsolva
ScheduledTasks = Ütemezett feladatok
WindowsFeaturesTitle = Windows szolgáltatások

2
src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/it-IT/Sophia.psd1

@ -12,7 +12,7 @@ bin = Non ci sono file nella cartella bin.
RebootPending = Il PC è in attesa di essere riavviato
UnsupportedRelease = Nuova versione trovata
CustomizationWarning = \nSono state personalizzate tutte le funzioni nel file di configurazione {0} prima di eseguire Sophia Script?
WindowsBroken = \nAlcuni componenti di Windows potrebbero essere rotti
WindowsBroken = Alcuni componenti di Windows potrebbero essere rotti
ControlledFolderAccessDisabled = l'accesso alle cartelle controllata disattivata
ScheduledTasks = Attività pianificate
WindowsFeaturesTitle = Funzionalità di Windows

2
src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/pt-BR/Sophia.psd1

@ -12,7 +12,7 @@ bin = Não existem ficheiros na pasta bin.
RebootPending = O PC está esperando para ser reiniciado
UnsupportedRelease = Nova versão encontrada
CustomizationWarning = \nVocê personalizou todas as funções no arquivo de predefinição {0} antes de executar o Sophia Script?
WindowsBroken = \nAlguns componentes do Windows podem ter sido quebrados
WindowsBroken = Alguns componentes do Windows podem ter sido quebrados
ControlledFolderAccessDisabled = Acesso controlado a pasta desativada
ScheduledTasks = Tarefas agendadas
WindowsFeaturesTitle = Recursos do Windows

2
src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/ru-RU/Sophia.psd1

@ -12,7 +12,7 @@ bin = В папке bin отсутству
RebootPending = Компьютер ожидает перезагрузки
UnsupportedRelease = Обнаружена новая версия
CustomizationWarning = \nВы настроили все функции в пресет-файле {0} перед запуском Sophia Script?
WindowsBroken = \nНекоторые компоненты Windows могли быть повреждены
WindowsBroken = Некоторые компоненты Windows могли быть повреждены
ControlledFolderAccessDisabled = Контролируемый доступ к папкам выключен
ScheduledTasks = Запланированные задания
WindowsFeaturesTitle = Компоненты Windows

2
src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/tr-TR/Sophia.psd1

@ -12,7 +12,7 @@ bin = bin klasöründe dosya yok. Lütfen
RebootPending = PC yeniden başlatılmayı bekliyor
UnsupportedRelease = Yeni sürüm bulundu
CustomizationWarning = \nSophia Script'i çalıştırmadan önce {0} ön ayar dosyasındaki her işlevi özelleştirdiniz mi?
WindowsBroken = \nBazı Windows bileşenleri bozulmuş olabilir
WindowsBroken = Bazı Windows bileşenleri bozulmuş olabilir
ControlledFolderAccessDisabled = Kontrollü klasör erişimi devre dışı bırakıldı
ScheduledTasks = Zamanlanan görevler
WindowsFeaturesTitle = Características do Windows

2
src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/uk-UA/Sophia.psd1

@ -12,7 +12,7 @@ bin = У папці bin немає фай
RebootPending = Комп'ютер очікує на перезавантаження
UnsupportedRelease = Виявлено нову версію
CustomizationWarning = \nВи налаштували всі функції в пресет-файлі {0} перед запуском Sophia Script?
WindowsBroken = \nДеякі компоненти Windows можуть бути пошкоджені
WindowsBroken = Деякі компоненти Windows можуть бути пошкоджені
ControlledFolderAccessDisabled = Контрольований доступ до папок вимкнений
ScheduledTasks = Заплановані задачі
WindowsFeaturesTitle = Компоненти Windows

2
src/Sophia_Script_for_Windows_10_LTSC_2019/Localizations/zh-CN/Sophia.psd1

@ -12,7 +12,7 @@ bin = bin文件夹中没有文件。请重
RebootPending = 计算机正在等待重新启动
UnsupportedRelease = 找到新版本
CustomizationWarning = \n在运行Sophia Script之前您是否已自定义{0}预设文件中的每个函数
WindowsBroken = \n某些 Windows 组件可能已损坏
WindowsBroken = 某些 Windows 组件可能已损坏
ControlledFolderAccessDisabled = 受控文件夹访问已禁用
ScheduledTasks = 计划任务
WindowsFeaturesTitle = Windows功能

2
src/Sophia_Script_for_Windows_10_LTSC_2019/Manifest/Sophia.psd1

@ -1,6 +1,6 @@
@{
RootModule = '..\Module\Sophia.psm1'
ModuleVersion = '5.4.1'
ModuleVersion = '5.4.2'
GUID = 'a36a65ca-70f9-43df-856c-3048fc5e7f01'
Author = 'Dmitry "farag" Nefedov'
Copyright = '(c) 2014—2022 farag & Inestic. All rights reserved'

16
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -2,7 +2,7 @@
.SYNOPSIS
Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks
Version: v5.4.1
Version: v5.4.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -10,9 +10,6 @@
Thanks to all https://forum.ru-board.com members involved
.NOTES
Running the script is best done on a fresh install because running it on wrong tweaked system may result in errors occurring
.NOTES
Supported Windows 10 version
Version: 1809
@ -20,10 +17,6 @@
Edition: Enterprise LTSC
Architecture: x64
.NOTES
Set execution policy to be able to run scripts only in the current PowerShell session:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
.LINK GitHub
https://github.com/farag2/Sophia-Script-for-Windows
@ -533,6 +526,11 @@ function script:Set-Policy
$Value
)
if (-not (Test-Path -Path "$env:SystemRoot\System32\gpedit.msc"))
{
return
}
switch ($Type)
{
"CLEAR"
@ -4949,6 +4947,8 @@ function NetworkAdaptersSavePower
$Enable
)
Write-Verbose -Message $Localization.Patient -Verbose
if (Get-NetAdapter -Physical | Where-Object -FilterScript {$_.Status -eq "Up"})
{
$PhysicalAdaptersStatusUp = @((Get-NetAdapter -Physical | Where-Object -FilterScript {$_.Status -eq "Up"}).Name)

4
src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1

@ -2,7 +2,7 @@
.SYNOPSIS
Default preset file for "Sophia Script for Windows 10 LTSC 2019"
Version: v5.4.1
Version: v5.4.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -74,7 +74,7 @@ param
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC 2019 v5.4.1 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC 2019 v5.4.2 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

4
src/Sophia_Script_for_Windows_10_LTSC_2021/Functions.ps1

@ -2,7 +2,7 @@
.SYNOPSIS
The TAB completion for functions and their arguments
Version: v5.14.1
Version: v5.14.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -54,7 +54,7 @@ function Sophia
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC 2021 v5.14.1 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC 2021 v5.14.2 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/de-DE/Sophia.psd1

@ -12,7 +12,7 @@ bin = Im Ordner "bin" befinden sich keine
RebootPending = Der PC wartet darauf, neu gestartet zu werden
UnsupportedRelease = Neue Version gefunden
CustomizationWarning = \nHaben Sie alle Funktionen in der voreingestellten Datei {0} angepasst, bevor Sie Sophia Script ausführen?
WindowsBroken = \nEinige Windows-Komponenten sind möglicherweise beschädigt
WindowsBroken = Einige Windows-Komponenten sind möglicherweise beschädigt
ControlledFolderAccessDisabled = Kontrollierter Ordnerzugriff deaktiviert
ScheduledTasks = Geplante Aufgaben
WindowsFeaturesTitle = Windows-Features

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/en-US/Sophia.psd1

@ -12,7 +12,7 @@ bin = There are no files in the bin folder
RebootPending = The PC is waiting to be restarted
UnsupportedRelease = A new version found
CustomizationWarning = \nHave you customized every function in the {0} preset file before running Sophia Script?
WindowsBroken = \nSome Windows components may have been broken
WindowsBroken = Some Windows components may have been broken
ControlledFolderAccessDisabled = Controlled folder access disabled
ScheduledTasks = Scheduled tasks
WindowsFeaturesTitle = Windows features

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/es-ES/Sophia.psd1

@ -12,7 +12,7 @@ bin = No hay archivos en la carpeta bin. P
RebootPending = El PC está esperando a ser reiniciado
UnsupportedRelease = Una nueva versión encontrada
CustomizationWarning = \n¿Ha personalizado todas las funciones del archivo predeterminado {0} antes de ejecutar Sophia Script?
WindowsBroken = \nEs posible que se hayan roto algunos componentes de Windows
WindowsBroken = Es posible que se hayan roto algunos componentes de Windows
ControlledFolderAccessDisabled = Acceso a la carpeta controlada deshabilitado
ScheduledTasks = Tareas programadas
WindowsFeaturesTitle = Características de Windows

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/fr-FR/Sophia.psd1

@ -12,7 +12,7 @@ bin = Il n'y a pas de fichiers dans le dos
RebootPending = Le PC attend d'être redémarré
UnsupportedRelease = Nouvelle version trouvée
CustomizationWarning = \nAvez-vous personnalisé chaque fonction du fichier de préréglage {0} avant d'exécuter Sophia Script?
WindowsBroken = \nCertains composants Windows peuvent avoir été endommagés
WindowsBroken = Certains composants Windows peuvent avoir été endommagés
ControlledFolderAccessDisabled = Contrôle d'accès aux dossiers désactivé
ScheduledTasks = Tâches planifiées
WindowsFeaturesTitle = Fonctionnalités

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/hu-HU/Sophia.psd1

@ -12,7 +12,7 @@ bin = A bin mappában nincsenek fájlok. K
RebootPending = A számítógép újraindításra vár
UnsupportedRelease = Új verzió érhető el
CustomizationWarning = \nSzemélyre szabott minden opciót a {0} preset fájlban, mielőtt futtatni kívánja a Sophia szkriptet?
WindowsBroken = \nElőfordulhat, hogy a Windows egyes összetevői elromoltak
WindowsBroken = Előfordulhat, hogy a Windows egyes összetevői elromoltak
ControlledFolderAccessDisabled = Vezérelt mappához való hozzáférés kikapcsolva
ScheduledTasks = Ütemezett feladatok
WindowsFeaturesTitle = Windows szolgáltatások

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/it-IT/Sophia.psd1

@ -12,7 +12,7 @@ bin = Non ci sono file nella cartella bin.
RebootPending = Il PC è in attesa di essere riavviato
UnsupportedRelease = Nuova versione trovata
CustomizationWarning = \nSono state personalizzate tutte le funzioni nel file di configurazione {0} prima di eseguire Sophia Script?
WindowsBroken = \nAlcuni componenti di Windows potrebbero essere rotti
WindowsBroken = Alcuni componenti di Windows potrebbero essere rotti
ControlledFolderAccessDisabled = l'accesso alle cartelle controllata disattivata
ScheduledTasks = Attività pianificate
WindowsFeaturesTitle = Funzionalità di Windows

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/pt-BR/Sophia.psd1

@ -12,7 +12,7 @@ bin = Não existem ficheiros na pasta bin.
RebootPending = O PC está esperando para ser reiniciado
UnsupportedRelease = Nova versão encontrada
CustomizationWarning = \nVocê personalizou todas as funções no arquivo de predefinição {0} antes de executar o Sophia Script?
WindowsBroken = \nAlguns componentes do Windows podem ter sido quebrados
WindowsBroken = Alguns componentes do Windows podem ter sido quebrados
ControlledFolderAccessDisabled = Acesso controlado a pasta desativada
ScheduledTasks = Tarefas agendadas
WindowsFeaturesTitle = Recursos do Windows

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/ru-RU/Sophia.psd1

@ -12,7 +12,7 @@ bin = В папке bin отсутству
RebootPending = Компьютер ожидает перезагрузки
UnsupportedRelease = Обнаружена новая версия
CustomizationWarning = \nВы настроили все функции в пресет-файле {0} перед запуском Sophia Script?
WindowsBroken = \nНекоторые компоненты Windows могли быть повреждены
WindowsBroken = Некоторые компоненты Windows могли быть повреждены
ControlledFolderAccessDisabled = Контролируемый доступ к папкам выключен
ScheduledTasks = Запланированные задания
WindowsFeaturesTitle = Компоненты Windows

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/tr-TR/Sophia.psd1

@ -12,7 +12,7 @@ bin = bin klasöründe dosya yok. Lütfen
RebootPending = PC yeniden başlatılmayı bekliyor
UnsupportedRelease = Yeni sürüm bulundu
CustomizationWarning = \nSophia Script'i çalıştırmadan önce {0} ön ayar dosyasındaki her işlevi özelleştirdiniz mi?
WindowsBroken = \nBazı Windows bileşenleri bozulmuş olabilir
WindowsBroken = Bazı Windows bileşenleri bozulmuş olabilir
ControlledFolderAccessDisabled = Kontrollü klasör erişimi devre dışı bırakıldı
ScheduledTasks = Zamanlanan görevler
WindowsFeaturesTitle = Características do Windows

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/uk-UA/Sophia.psd1

@ -12,7 +12,7 @@ bin = У папці bin немає фай
RebootPending = Комп'ютер очікує на перезавантаження
UnsupportedRelease = Виявлено нову версію
CustomizationWarning = \nВи налаштували всі функції в пресет-файлі {0} перед запуском Sophia Script?
WindowsBroken = \nДеякі компоненти Windows можуть бути пошкоджені
WindowsBroken = Деякі компоненти Windows можуть бути пошкоджені
ControlledFolderAccessDisabled = Контрольований доступ до папок вимкнений
ScheduledTasks = Заплановані задачі
WindowsFeaturesTitle = Компоненти Windows

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Localizations/zh-CN/Sophia.psd1

@ -12,7 +12,7 @@ bin = bin文件夹中没有文件。请重
RebootPending = 计算机正在等待重新启动
UnsupportedRelease = 找到新版本
CustomizationWarning = \n在运行Sophia Script之前您是否已自定义{0}预设文件中的每个函数
WindowsBroken = \n某些 Windows 组件可能已损坏
WindowsBroken = 某些 Windows 组件可能已损坏
ControlledFolderAccessDisabled = 受控文件夹访问已禁用
ScheduledTasks = 计划任务
WindowsFeaturesTitle = Windows功能

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Manifest/Sophia.psd1

@ -1,6 +1,6 @@
@{
RootModule = '..\Module\Sophia.psm1'
ModuleVersion = '5.14.1'
ModuleVersion = '5.14.2'
GUID = '109cc881-c42b-45af-a74a-550781989d6a'
Author = 'Dmitry "farag" Nefedov'
Copyright = '(c) 2014—2022 farag & Inestic. All rights reserved'

16
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -2,7 +2,7 @@
.SYNOPSIS
Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks
Version: v5.14.1
Version: v5.14.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -10,9 +10,6 @@
Thanks to all https://forum.ru-board.com members involved
.NOTES
Running the script is best done on a fresh install because running it on wrong tweaked system may result in errors occurring
.NOTES
Supported Windows 10 version
Version: 21H2
@ -20,10 +17,6 @@
Edition: Enterprise LTSC 2021
Architecture: x64
.NOTES
Set execution policy to be able to run scripts only in the current PowerShell session:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
.LINK GitHub
https://github.com/farag2/Sophia-Script-for-Windows
@ -533,6 +526,11 @@ function script:Set-Policy
$Value
)
if (-not (Test-Path -Path "$env:SystemRoot\System32\gpedit.msc"))
{
return
}
switch ($Type)
{
"CLEAR"
@ -5336,6 +5334,8 @@ function NetworkAdaptersSavePower
$Enable
)
Write-Verbose -Message $Localization.Patient -Verbose
if (Get-NetAdapter -Physical | Where-Object -FilterScript {$_.Status -eq "Up"})
{
$PhysicalAdaptersStatusUp = @((Get-NetAdapter -Physical | Where-Object -FilterScript {$_.Status -eq "Up"}).Name)

4
src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1

@ -2,7 +2,7 @@
.SYNOPSIS
Default preset file for "Sophia Script for Windows 10 LTSC 2021"
Version: v5.14.1
Version: v5.14.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -74,7 +74,7 @@ param
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC 2021 v5.14.1 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 LTSC 2021 v5.14.2 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

4
src/Sophia_Script_for_Windows_10_PowerShell_7/Functions.ps1

@ -2,7 +2,7 @@
.SYNOPSIS
The TAB completion for functions and their arguments
Version: v5.14.1
Version: v5.14.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -54,7 +54,7 @@ function Sophia
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.14.1 (PowerShell 7) | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.14.2 (PowerShell 7) | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/de-DE/Sophia.psd1

@ -12,7 +12,7 @@ bin = Im Ordner "bin" befinden sich keine
RebootPending = Der PC wartet darauf, neu gestartet zu werden
UnsupportedRelease = Neue Version gefunden
CustomizationWarning = \nHaben Sie alle Funktionen in der voreingestellten Datei {0} angepasst, bevor Sie Sophia Script ausführen?
WindowsBroken = \nEinige Windows-Komponenten sind möglicherweise beschädigt
WindowsBroken = Einige Windows-Komponenten sind möglicherweise beschädigt
ControlledFolderAccessDisabled = Kontrollierter Ordnerzugriff deaktiviert
ScheduledTasks = Geplante Aufgaben
OneDriveUninstalling = OneDrive deinstallieren

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/en-US/Sophia.psd1

@ -12,7 +12,7 @@ bin = There are no files in the bin folder
RebootPending = The PC is waiting to be restarted
UnsupportedRelease = A new version found
CustomizationWarning = \nHave you customized every function in the {0} preset file before running Sophia Script?
WindowsBroken = \nSome Windows components may have been broken
WindowsBroken = Some Windows components may have been broken
ControlledFolderAccessDisabled = Controlled folder access disabled
ScheduledTasks = Scheduled tasks
OneDriveUninstalling = Uninstalling OneDrive...

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/es-ES/Sophia.psd1

@ -12,7 +12,7 @@ bin = No hay archivos en la carpeta bin. P
RebootPending = El PC está esperando a ser reiniciado
UnsupportedRelease = Una nueva versión encontrada
CustomizationWarning = \n¿Ha personalizado todas las funciones del archivo predeterminado {0} antes de ejecutar Sophia Script?
WindowsBroken = \nEs posible que se hayan roto algunos componentes de Windows
WindowsBroken = Es posible que se hayan roto algunos componentes de Windows
ControlledFolderAccessDisabled = Acceso a la carpeta controlada deshabilitado
ScheduledTasks = Tareas programadas
OneDriveUninstalling = Desinstalar OneDrive...

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/fr-FR/Sophia.psd1

@ -12,7 +12,7 @@ bin = Il n'y a pas de fichiers dans le dos
RebootPending = Le PC attend d'être redémarré
UnsupportedRelease = Nouvelle version trouvée
CustomizationWarning = \nAvez-vous personnalisé chaque fonction du fichier de préréglage {0} avant d'exécuter Sophia Script?
WindowsBroken = \nCertains composants Windows peuvent avoir été endommagés
WindowsBroken = Certains composants Windows peuvent avoir été endommagés
ControlledFolderAccessDisabled = Contrôle d'accès aux dossiers désactivé
ScheduledTasks = Tâches planifiées
OneDriveUninstalling = Désinstalltion de OneDrive...

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/hu-HU/Sophia.psd1

@ -12,7 +12,7 @@ bin = A bin mappában nincsenek fájlok. K
RebootPending = A számítógép újraindításra vár
UnsupportedRelease = Új verzió érhető el
CustomizationWarning = \nSzemélyre szabott minden opciót a {0} preset fájlban, mielőtt futtatni kívánja a Sophia szkriptet?
WindowsBroken = \nElőfordulhat, hogy a Windows egyes összetevői elromoltak
WindowsBroken = Előfordulhat, hogy a Windows egyes összetevői elromoltak
ControlledFolderAccessDisabled = Vezérelt mappához való hozzáférés kikapcsolva
ScheduledTasks = Ütemezett feladatok
OneDriveUninstalling = OneDrive eltávolítása...

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/it-IT/Sophia.psd1

@ -12,7 +12,7 @@ bin = Non ci sono file nella cartella bin.
RebootPending = Il PC è in attesa di essere riavviato
UnsupportedRelease = Nuova versione trovata
CustomizationWarning = \nSono state personalizzate tutte le funzioni nel file di configurazione {0} prima di eseguire Sophia Script?
WindowsBroken = \nAlcuni componenti di Windows potrebbero essere rotti
WindowsBroken = Alcuni componenti di Windows potrebbero essere rotti
ControlledFolderAccessDisabled = l'accesso alle cartelle controllata disattivata
ScheduledTasks = Attività pianificate
OneDriveUninstalling = Disinstallazione di OneDrive...

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/pt-BR/Sophia.psd1

@ -12,7 +12,7 @@ bin = Não existem ficheiros na pasta bin.
RebootPending = O PC está esperando para ser reiniciado
UnsupportedRelease = Nova versão encontrada
CustomizationWarning = \nVocê personalizou todas as funções no arquivo de predefinição {0} antes de executar o Sophia Script?
WindowsBroken = \nAlguns componentes do Windows podem ter sido quebrados
WindowsBroken = Alguns componentes do Windows podem ter sido quebrados
ControlledFolderAccessDisabled = Acesso controlado a pasta desativada
ScheduledTasks = Tarefas agendadas
OneDriveUninstalling = Desinstalar OneDrive...

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/ru-RU/Sophia.psd1

@ -12,7 +12,7 @@ bin = В папке bin отсутству
RebootPending = Компьютер ожидает перезагрузки
UnsupportedRelease = Обнаружена новая версия
CustomizationWarning = \nВы настроили все функции в пресет-файле {0} перед запуском Sophia Script?
WindowsBroken = \nНекоторые компоненты Windows могли быть повреждены
WindowsBroken = Некоторые компоненты Windows могли быть повреждены
ControlledFolderAccessDisabled = Контролируемый доступ к папкам выключен
ScheduledTasks = Запланированные задания
OneDriveUninstalling = Удаление OneDrive...

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/tr-TR/Sophia.psd1

@ -12,7 +12,7 @@ bin = bin klasöründe dosya yok. Lütfen
RebootPending = PC yeniden başlatılmayı bekliyor
UnsupportedRelease = Yeni sürüm bulundu
CustomizationWarning = \nSophia Script'i çalıştırmadan önce {0} ön ayar dosyasındaki her işlevi özelleştirdiniz mi?
WindowsBroken = \nBazı Windows bileşenleri bozulmuş olabilir
WindowsBroken = Bazı Windows bileşenleri bozulmuş olabilir
ControlledFolderAccessDisabled = Kontrollü klasör erişimi devre dışı bırakıldı
ScheduledTasks = Zamanlanan görevler
OneDriveUninstalling = OneDrive kaldırılıyor...

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/uk-UA/Sophia.psd1

@ -12,7 +12,7 @@ bin = У папці bin немає фай
RebootPending = Комп'ютер очікує на перезавантаження
UnsupportedRelease = Виявлено нову версію
CustomizationWarning = \nВи налаштували всі функції в пресет-файлі {0} перед запуском Sophia Script?
WindowsBroken = \nДеякі компоненти Windows можуть бути пошкоджені
WindowsBroken = Деякі компоненти Windows можуть бути пошкоджені
ControlledFolderAccessDisabled = Контрольований доступ до папок вимкнений
ScheduledTasks = Заплановані задачі
OneDriveUninstalling = Видалення OneDrive...

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Localizations/zh-CN/Sophia.psd1

@ -12,7 +12,7 @@ bin = bin文件夹中没有文件。请重
RebootPending = 计算机正在等待重新启动
UnsupportedRelease = 找到新版本
CustomizationWarning = \n在运行Sophia Script之前您是否已自定义{0}预设文件中的每个函数
WindowsBroken = \n某些 Windows 组件可能已损坏
WindowsBroken = 某些 Windows 组件可能已损坏
ControlledFolderAccessDisabled = 受控文件夹访问已禁用
ScheduledTasks = 计划任务
OneDriveUninstalling = 卸载OneDrive

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Manifest/Sophia.psd1

@ -1,6 +1,6 @@
@{
RootModule = '..\Module\Sophia.psm1'
ModuleVersion = '5.14.1'
ModuleVersion = '5.14.2'
GUID = 'aa0b47a7-1770-4b5d-8c9f-cc6c505bcc7a'
Author = 'Dmitry "farag" Nefedov'
Copyright = '(c) 2014—2022 farag & Inestic. All rights reserved'

66
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -2,7 +2,7 @@
.SYNOPSIS
Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks
Version: v5.14.1
Version: v5.14.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -10,9 +10,6 @@
Thanks to all https://forum.ru-board.com members involved
.NOTES
Running the script is best done on a fresh install because running it on wrong tweaked system may result in errors occurring
.NOTES
Supported Windows 10 versions
Versions: 21H2/22H2+
@ -20,10 +17,6 @@
Editions: Home/Pro/Enterprise
Architecture: x64
.NOTES
Set execution policy to be able to run scripts only in the current PowerShell session:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
.LINK GitHub
https://github.com/farag2/Sophia-Script-for-Windows
@ -574,6 +567,11 @@ function script:Set-Policy
$Value
)
if (-not (Test-Path -Path "$env:SystemRoot\System32\gpedit.msc"))
{
return
}
switch ($Type)
{
"CLEAR"
@ -6278,6 +6276,8 @@ function NetworkAdaptersSavePower
$Enable
)
Write-Verbose -Message $Localization.Patient -Verbose
if (Get-NetAdapter -Physical | Where-Object -FilterScript {$_.Status -eq "Up"})
{
$PhysicalAdaptersStatusUp = @((Get-NetAdapter -Physical | Where-Object -FilterScript {$_.Status -eq "Up"}).Name)
@ -10733,7 +10733,7 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
<#
.SYNOPSIS
Install "HEVC Video Extensions from Device Manufacturer" to be able to open .heic and .heif formats
"HEVC Video Extensions from Device Manufacturer" extension
.PARAMETER Install
Download and install the "HEVC Video Extensions from Device Manufacturer" extension
@ -10783,7 +10783,7 @@ function HEIF
"Install"
{
# Check whether the extension is already installed
if ((Get-AppxPackage -Name Microsoft.HEVCVideoExtension) -and (Get-AppxPackage -Name Microsoft.Windows.Photos))
if (-not ((Get-AppxPackage -Name Microsoft.HEVCVideoExtension) -and (Get-AppxPackage -Name Microsoft.Windows.Photos)))
{
return
}
@ -10804,9 +10804,9 @@ function HEIF
try
{
# Check whether https://github.com is alive
# Check whether https://store.rg-adguard.net is alive
$Parameters = @{
Uri = "https://github.com"
Uri = "https://store.rg-adguard.net/api/GetFiles"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
@ -10816,20 +10816,44 @@ function HEIF
return
}
# https://github.com/farag2/Sophia-Script-for-Windows/tree/master/Misc
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Body = @{
type = "url"
url = "https://www.microsoft.com/store/productId/9n4wgh0z6vhq"
ring = "Retail"
lang = "en-US"
}
$Parameters = @{
Uri = "https://github.com/farag2/Sophia-Script-for-Windows/raw/master/Misc/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
UseBasicParsing = $true
Verbose = $true
Uri = "https://store.rg-adguard.net/api/GetFiles"
Method = "Post"
ContentType = "application/x-www-form-urlencoded"
Body = $Body
Verbose = $true
}
$Raw = Invoke-WebRequest @Parameters
# Parsing the page
$Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process {
$TempURL = ($_.Groups | Select-Object -Index 1).Value
$HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1
}
Invoke-WebRequest @Parameters
# Installing "HEVC Video Extensions from Device Manufacturer"
Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Verbose
if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
{
Write-Verbose -Message $Localization.Patient -Verbose
Write-Verbose -Message $Localization.HEVCDownloading -Verbose
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Parameters = @{
Uri = $TempURL
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx"
Verbose = $true
}
Invoke-WebRequest @Parameters
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Force
Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Verbose
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
}
}
catch [System.Net.WebException]
{

4
src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1

@ -2,7 +2,7 @@
.SYNOPSIS
Default preset file for "Sophia Script for Windows 10 (PowerShell 7)"
Version: v5.14.1
Version: v5.14.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -74,7 +74,7 @@ param
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.14.1 (PowerShell 7) | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.14.2 (PowerShell 7) | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

4
src/Sophia_Script_for_Windows_11/Functions.ps1

@ -2,7 +2,7 @@
.SYNOPSIS
The TAB completion for functions and their arguments
Version: v6.2.1
Version: v6.2.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -54,7 +54,7 @@ function Sophia
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.2.1 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.2.2 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

2
src/Sophia_Script_for_Windows_11/Localizations/de-DE/Sophia.psd1

@ -11,7 +11,7 @@ bin = Im Ordner "bin" befinden sich keine
RebootPending = Der PC wartet darauf, neu gestartet zu werden
UnsupportedRelease = Neue Version gefunden
CustomizationWarning = \nHaben Sie alle Funktionen in der voreingestellten Datei {0} angepasst, bevor Sie Sophia Script ausführen?
WindowsBroken = \nEinige Windows-Komponenten sind möglicherweise beschädigt
WindowsBroken = Einige Windows-Komponenten sind möglicherweise beschädigt
ControlledFolderAccessDisabled = Kontrollierter Ordnerzugriff deaktiviert
ScheduledTasks = Geplante Aufgaben
OneDriveUninstalling = OneDrive deinstallieren

2
src/Sophia_Script_for_Windows_11/Localizations/en-US/Sophia.psd1

@ -11,7 +11,7 @@ bin = There are no files in the bin folder
RebootPending = The PC is waiting to be restarted
UnsupportedRelease = A new version found
CustomizationWarning = \nHave you customized every function in the {0} preset file before running Sophia Script?
WindowsBroken = \nSome Windows components may have been broken
WindowsBroken = Some Windows components may have been broken
ControlledFolderAccessDisabled = Controlled folder access disabled
ScheduledTasks = Scheduled tasks
OneDriveUninstalling = Uninstalling OneDrive...

2
src/Sophia_Script_for_Windows_11/Localizations/es-ES/Sophia.psd1

@ -11,7 +11,7 @@ bin = No hay archivos en la carpeta bin. P
RebootPending = El PC está esperando a ser reiniciado
UnsupportedRelease = Una nueva versión encontrada
CustomizationWarning = \n¿Ha personalizado todas las funciones del archivo predeterminado {0} antes de ejecutar Sophia Script?
WindowsBroken = \nEs posible que se hayan roto algunos componentes de Windows
WindowsBroken = Es posible que se hayan roto algunos componentes de Windows
ControlledFolderAccessDisabled = Acceso a la carpeta controlada deshabilitado
ScheduledTasks = Tareas programadas
OneDriveUninstalling = Desinstalar OneDrive...

2
src/Sophia_Script_for_Windows_11/Localizations/fr-FR/Sophia.psd1

@ -11,7 +11,7 @@ bin = Il n'y a pas de fichiers dans le dos
RebootPending = Le PC attend d'être redémarré
UnsupportedRelease = Nouvelle version trouvée
CustomizationWarning = \nAvez-vous personnalisé chaque fonction du fichier de préréglage {0} avant d'exécuter Sophia Script?
WindowsBroken = \nCertains composants Windows peuvent avoir été endommagés
WindowsBroken = Certains composants Windows peuvent avoir été endommagés
ControlledFolderAccessDisabled = Contrôle d'accès aux dossiers désactivé
ScheduledTasks = Tâches planifiées
OneDriveUninstalling = Désinstalltion de OneDrive...

2
src/Sophia_Script_for_Windows_11/Localizations/hu-HU/Sophia.psd1

@ -11,7 +11,7 @@ bin = A bin mappában nincsenek fájlok. K
RebootPending = A számítógép újraindításra vár
UnsupportedRelease = Új verzió érhető el
CustomizationWarning = \nSzemélyre szabott minden opciót a {0} preset fájlban, mielőtt futtatni kívánja a Sophia szkriptet?
WindowsBroken = \nElőfordulhat, hogy a Windows egyes összetevői elromoltak
WindowsBroken = Előfordulhat, hogy a Windows egyes összetevői elromoltak
ControlledFolderAccessDisabled = Vezérelt mappához való hozzáférés kikapcsolva
ScheduledTasks = Ütemezett feladatok
OneDriveUninstalling = OneDrive eltávolítása...

2
src/Sophia_Script_for_Windows_11/Localizations/it-IT/Sophia.psd1

@ -11,7 +11,7 @@ bin = Non ci sono file nella cartella bin.
RebootPending = Il PC è in attesa di essere riavviato
UnsupportedRelease = Nuova versione trovata
CustomizationWarning = \nSono state personalizzate tutte le funzioni nel file di configurazione {0} prima di eseguire Sophia Script?
WindowsBroken = \nAlcuni componenti di Windows potrebbero essere rotti
WindowsBroken = Alcuni componenti di Windows potrebbero essere rotti
ControlledFolderAccessDisabled = l'accesso alle cartelle controllata disattivata
ScheduledTasks = Attività pianificate
OneDriveUninstalling = Disinstallazione di OneDrive...

2
src/Sophia_Script_for_Windows_11/Localizations/pt-BR/Sophia.psd1

@ -11,7 +11,7 @@ bin = Não existem ficheiros na pasta bin.
RebootPending = O PC está esperando para ser reiniciado
UnsupportedRelease = Nova versão encontrada
CustomizationWarning = \nVocê personalizou todas as funções no arquivo de predefinição {0} antes de executar o Sophia Script?
WindowsBroken = \nAlguns componentes do Windows podem ter sido quebrados
WindowsBroken = Alguns componentes do Windows podem ter sido quebrados
ControlledFolderAccessDisabled = Acesso controlado a pasta desativada
ScheduledTasks = Tarefas agendadas
OneDriveUninstalling = Desinstalar OneDrive...

2
src/Sophia_Script_for_Windows_11/Localizations/ru-RU/Sophia.psd1

@ -11,7 +11,7 @@ bin = В папке bin отсутству
RebootPending = Компьютер ожидает перезагрузки
UnsupportedRelease = Обнаружена новая версия
CustomizationWarning = \nВы настроили все функции в пресет-файле {0} перед запуском Sophia Script?
WindowsBroken = \nНекоторые компоненты Windows могли быть повреждены
WindowsBroken = Некоторые компоненты Windows могли быть повреждены
ControlledFolderAccessDisabled = Контролируемый доступ к папкам выключен
ScheduledTasks = Запланированные задания
OneDriveUninstalling = Удаление OneDrive...

2
src/Sophia_Script_for_Windows_11/Localizations/tr-TR/Sophia.psd1

@ -11,7 +11,7 @@ bin = bin klasöründe dosya yok. Lütfen
RebootPending = PC yeniden başlatılmayı bekliyor
UnsupportedRelease = Yeni sürüm bulundu
CustomizationWarning = \nSophia Script'i çalıştırmadan önce {0} ön ayar dosyasındaki her işlevi özelleştirdiniz mi?
WindowsBroken = \nBazı Windows bileşenleri bozulmuş olabilir
WindowsBroken = Bazı Windows bileşenleri bozulmuş olabilir
ControlledFolderAccessDisabled = Kontrollü klasör erişimi devre dışı bırakıldı
ScheduledTasks = Zamanlanan görevler
OneDriveUninstalling = OneDrive kaldırılıyor...

2
src/Sophia_Script_for_Windows_11/Localizations/uk-UA/Sophia.psd1

@ -11,7 +11,7 @@ bin = У папці bin немає фай
RebootPending = Комп'ютер очікує на перезавантаження
UnsupportedRelease = Виявлено нову версію
CustomizationWarning = \nВи налаштували всі функції в пресет-файлі {0} перед запуском Sophia Script?
WindowsBroken = \nДеякі компоненти Windows можуть бути пошкоджені
WindowsBroken = Деякі компоненти Windows можуть бути пошкоджені
ControlledFolderAccessDisabled = Контрольований доступ до папок вимкнений
ScheduledTasks = Заплановані задачі
OneDriveUninstalling = Видалення OneDrive...

2
src/Sophia_Script_for_Windows_11/Localizations/zh-CN/Sophia.psd1

@ -11,7 +11,7 @@ bin = bin文件夹中没有文件。请重
RebootPending = 计算机正在等待重新启动
UnsupportedRelease = 找到新版本
CustomizationWarning = \n在运行Sophia Script之前您是否已自定义{0}预设文件中的每个函数
WindowsBroken = \n某些 Windows 组件可能已损坏
WindowsBroken = 某些 Windows 组件可能已损坏
ControlledFolderAccessDisabled = 受控文件夹访问已禁用
ScheduledTasks = 计划任务
OneDriveUninstalling = 卸载OneDrive

2
src/Sophia_Script_for_Windows_11/Manifest/Sophia.psd1

@ -1,6 +1,6 @@
@{
RootModule = '..\Module\Sophia.psm1'
ModuleVersion = '6.2.1'
ModuleVersion = '6.2.2'
GUID = '109cc881-c42b-45af-a74a-550781989d6a'
Author = 'Dmitry "farag" Nefedov'
Copyright = '(c) 2014—2022 farag & Inestic. All rights reserved'

66
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -2,7 +2,7 @@
.SYNOPSIS
Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks
Version: v6.2.1
Version: v6.2.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -10,19 +10,12 @@
Thanks to all https://forum.ru-board.com members involved
.NOTES
Running the script is best done on a fresh install because running it on wrong tweaked system may result in errors occurring
.NOTES
Supported Windows 11 versions
Versions: 21H2/22H2/23H2+
Builds: 22000.739+, 22621+
Editions: Home/Pro/Enterprise
.NOTES
Set execution policy to be able to run scripts only in the current PowerShell session:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
.LINK GitHub
https://github.com/farag2/Sophia-Script-for-Windows
@ -564,6 +557,11 @@ function script:Set-Policy
$Value
)
if (-not (Test-Path -Path "$env:SystemRoot\System32\gpedit.msc"))
{
return
}
switch ($Type)
{
"CLEAR"
@ -5735,6 +5733,8 @@ function NetworkAdaptersSavePower
$Enable
)
Write-Verbose -Message $Localization.Patient -Verbose
if (Get-NetAdapter -Physical | Where-Object -FilterScript {$_.Status -eq "Up"})
{
$PhysicalAdaptersStatusUp = @((Get-NetAdapter -Physical | Where-Object -FilterScript {$_.Status -eq "Up"}).Name)
@ -10091,7 +10091,7 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
<#
.SYNOPSIS
Install "HEVC Video Extensions from Device Manufacturer" to be able to open .heic and .heif formats
"HEVC Video Extensions from Device Manufacturer" extension
.PARAMETER Install
Download and install the "HEVC Video Extensions from Device Manufacturer" extension
@ -10141,7 +10141,7 @@ function HEIF
"Install"
{
# Check whether the extension is already installed
if ((Get-AppxPackage -Name Microsoft.HEVCVideoExtension) -and (Get-AppxPackage -Name Microsoft.Windows.Photos))
if (-not ((Get-AppxPackage -Name Microsoft.HEVCVideoExtension) -and (Get-AppxPackage -Name Microsoft.Windows.Photos)))
{
return
}
@ -10162,9 +10162,9 @@ function HEIF
try
{
# Check whether https://github.com is alive
# Check whether https://store.rg-adguard.net is alive
$Parameters = @{
Uri = "https://github.com"
Uri = "https://store.rg-adguard.net/api/GetFiles"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
@ -10174,20 +10174,44 @@ function HEIF
return
}
# https://github.com/farag2/Sophia-Script-for-Windows/tree/master/Misc
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Body = @{
type = "url"
url = "https://www.microsoft.com/store/productId/9n4wgh0z6vhq"
ring = "Retail"
lang = "en-US"
}
$Parameters = @{
Uri = "https://github.com/farag2/Sophia-Script-for-Windows/raw/master/Misc/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
UseBasicParsing = $true
Verbose = $true
Uri = "https://store.rg-adguard.net/api/GetFiles"
Method = "Post"
ContentType = "application/x-www-form-urlencoded"
Body = $Body
Verbose = $true
}
$Raw = Invoke-WebRequest @Parameters
# Parsing the page
$Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process {
$TempURL = ($_.Groups | Select-Object -Index 1).Value
$HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1
}
Invoke-WebRequest @Parameters
# Installing "HEVC Video Extensions from Device Manufacturer"
Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Verbose
if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
{
Write-Verbose -Message $Localization.Patient -Verbose
Write-Verbose -Message $Localization.HEVCDownloading -Verbose
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Parameters = @{
Uri = $TempURL
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx"
Verbose = $true
}
Invoke-WebRequest @Parameters
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Force
Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Verbose
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
}
}
catch [System.Net.WebException]
{

4
src/Sophia_Script_for_Windows_11/Sophia.ps1

@ -2,7 +2,7 @@
.SYNOPSIS
Default preset file for "Sophia Script for Windows 11"
Version: v6.2.1
Version: v6.2.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -73,7 +73,7 @@ param
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.2.1 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.2.2 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

4
src/Sophia_Script_for_Windows_11_PowerShell_7/Functions.ps1

@ -2,7 +2,7 @@
.SYNOPSIS
The TAB completion for functions and their arguments
Version: v6.2.1
Version: v6.2.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -54,7 +54,7 @@ function Sophia
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.2.1 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.2.2 | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

2
src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/de-DE/Sophia.psd1

@ -11,7 +11,7 @@ bin = Im Ordner "bin" befinden sich keine
RebootPending = Der PC wartet darauf, neu gestartet zu werden
UnsupportedRelease = Neue Version gefunden
CustomizationWarning = \nHaben Sie alle Funktionen in der voreingestellten Datei {0} angepasst, bevor Sie Sophia Script ausführen?
WindowsBroken = \nEinige Windows-Komponenten sind möglicherweise beschädigt
WindowsBroken = Einige Windows-Komponenten sind möglicherweise beschädigt
ControlledFolderAccessDisabled = Kontrollierter Ordnerzugriff deaktiviert
ScheduledTasks = Geplante Aufgaben
OneDriveUninstalling = OneDrive deinstallieren

2
src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/en-US/Sophia.psd1

@ -11,7 +11,7 @@ bin = There are no files in the bin folder
RebootPending = The PC is waiting to be restarted
UnsupportedRelease = A new version found
CustomizationWarning = \nHave you customized every function in the {0} preset file before running Sophia Script?
WindowsBroken = \nSome Windows components may have been broken
WindowsBroken = Some Windows components may have been broken
ControlledFolderAccessDisabled = Controlled folder access disabled
ScheduledTasks = Scheduled tasks
OneDriveUninstalling = Uninstalling OneDrive...

2
src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/es-ES/Sophia.psd1

@ -11,7 +11,7 @@ bin = No hay archivos en la carpeta bin. P
RebootPending = El PC está esperando a ser reiniciado
UnsupportedRelease = Una nueva versión encontrada
CustomizationWarning = \n¿Ha personalizado todas las funciones del archivo predeterminado {0} antes de ejecutar Sophia Script?
WindowsBroken = \nEs posible que se hayan roto algunos componentes de Windows
WindowsBroken = Es posible que se hayan roto algunos componentes de Windows
ControlledFolderAccessDisabled = Acceso a la carpeta controlada deshabilitado
ScheduledTasks = Tareas programadas
OneDriveUninstalling = Desinstalar OneDrive...

2
src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/fr-FR/Sophia.psd1

@ -11,7 +11,7 @@ bin = Il n'y a pas de fichiers dans le dos
RebootPending = Le PC attend d'être redémarré
UnsupportedRelease = Nouvelle version trouvée
CustomizationWarning = \nAvez-vous personnalisé chaque fonction du fichier de préréglage {0} avant d'exécuter Sophia Script?
WindowsBroken = \nCertains composants Windows peuvent avoir été endommagés
WindowsBroken = Certains composants Windows peuvent avoir été endommagés
ControlledFolderAccessDisabled = Contrôle d'accès aux dossiers désactivé
ScheduledTasks = Tâches planifiées
OneDriveUninstalling = Désinstalltion de OneDrive...

2
src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/hu-HU/Sophia.psd1

@ -11,7 +11,7 @@ bin = A bin mappában nincsenek fájlok. K
RebootPending = A számítógép újraindításra vár
UnsupportedRelease = Új verzió érhető el
CustomizationWarning = \nSzemélyre szabott minden opciót a {0} preset fájlban, mielőtt futtatni kívánja a Sophia szkriptet?
WindowsBroken = \nElőfordulhat, hogy a Windows egyes összetevői elromoltak
WindowsBroken = Előfordulhat, hogy a Windows egyes összetevői elromoltak
ControlledFolderAccessDisabled = Vezérelt mappához való hozzáférés kikapcsolva
ScheduledTasks = Ütemezett feladatok
OneDriveUninstalling = OneDrive eltávolítása...

2
src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/it-IT/Sophia.psd1

@ -11,7 +11,7 @@ bin = Non ci sono file nella cartella bin.
RebootPending = Il PC è in attesa di essere riavviato
UnsupportedRelease = Nuova versione trovata
CustomizationWarning = \nSono state personalizzate tutte le funzioni nel file di configurazione {0} prima di eseguire Sophia Script?
WindowsBroken = \nAlcuni componenti di Windows potrebbero essere rotti
WindowsBroken = Alcuni componenti di Windows potrebbero essere rotti
ControlledFolderAccessDisabled = l'accesso alle cartelle controllata disattivata
ScheduledTasks = Attività pianificate
OneDriveUninstalling = Disinstallazione di OneDrive...

2
src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/pt-BR/Sophia.psd1

@ -11,7 +11,7 @@ bin = Não existem ficheiros na pasta bin.
RebootPending = O PC está esperando para ser reiniciado
UnsupportedRelease = Nova versão encontrada
CustomizationWarning = \nVocê personalizou todas as funções no arquivo de predefinição {0} antes de executar o Sophia Script?
WindowsBroken = \nAlguns componentes do Windows podem ter sido quebrados
WindowsBroken = Alguns componentes do Windows podem ter sido quebrados
ControlledFolderAccessDisabled = Acesso controlado a pasta desativada
ScheduledTasks = Tarefas agendadas
OneDriveUninstalling = Desinstalar OneDrive...

2
src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/ru-RU/Sophia.psd1

@ -11,7 +11,7 @@ bin = В папке bin отсутству
RebootPending = Компьютер ожидает перезагрузки
UnsupportedRelease = Обнаружена новая версия
CustomizationWarning = \nВы настроили все функции в пресет-файле {0} перед запуском Sophia Script?
WindowsBroken = \nНекоторые компоненты Windows могли быть повреждены
WindowsBroken = Некоторые компоненты Windows могли быть повреждены
ControlledFolderAccessDisabled = Контролируемый доступ к папкам выключен
ScheduledTasks = Запланированные задания
OneDriveUninstalling = Удаление OneDrive...

2
src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/tr-TR/Sophia.psd1

@ -11,7 +11,7 @@ bin = bin klasöründe dosya yok. Lütfen
RebootPending = PC yeniden başlatılmayı bekliyor
UnsupportedRelease = Yeni sürüm bulundu
CustomizationWarning = \nSophia Script'i çalıştırmadan önce {0} ön ayar dosyasındaki her işlevi özelleştirdiniz mi?
WindowsBroken = \nBazı Windows bileşenleri bozulmuş olabilir
WindowsBroken = Bazı Windows bileşenleri bozulmuş olabilir
ControlledFolderAccessDisabled = Kontrollü klasör erişimi devre dışı bırakıldı
ScheduledTasks = Zamanlanan görevler
OneDriveUninstalling = OneDrive kaldırılıyor...

2
src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/uk-UA/Sophia.psd1

@ -11,7 +11,7 @@ bin = У папці bin немає фай
RebootPending = Комп'ютер очікує на перезавантаження
UnsupportedRelease = Виявлено нову версію
CustomizationWarning = \nВи налаштували всі функції в пресет-файлі {0} перед запуском Sophia Script?
WindowsBroken = \nДеякі компоненти Windows можуть бути пошкоджені
WindowsBroken = Деякі компоненти Windows можуть бути пошкоджені
ControlledFolderAccessDisabled = Контрольований доступ до папок вимкнений
ScheduledTasks = Заплановані задачі
OneDriveUninstalling = Видалення OneDrive...

2
src/Sophia_Script_for_Windows_11_PowerShell_7/Localizations/zh-CN/Sophia.psd1

@ -11,7 +11,7 @@ bin = bin文件夹中没有文件。请重
RebootPending = 计算机正在等待重新启动
UnsupportedRelease = 找到新版本
CustomizationWarning = \n在运行Sophia Script之前您是否已自定义{0}预设文件中的每个函数
WindowsBroken = \n某些 Windows 组件可能已损坏
WindowsBroken = 某些 Windows 组件可能已损坏
ControlledFolderAccessDisabled = 受控文件夹访问已禁用
ScheduledTasks = 计划任务
OneDriveUninstalling = 卸载OneDrive

2
src/Sophia_Script_for_Windows_11_PowerShell_7/Manifest/Sophia.psd1

@ -1,6 +1,6 @@
@{
RootModule = '..\Module\Sophia.psm1'
ModuleVersion = '6.2.1'
ModuleVersion = '6.2.2'
GUID = '109cc881-c42b-45af-a74a-550781989d6a'
Author = 'Dmitry "farag" Nefedov'
Copyright = '(c) 2014—2022 farag & Inestic. All rights reserved'

66
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -2,7 +2,7 @@
.SYNOPSIS
Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks
Version: v6.2.1
Version: v6.2.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -10,19 +10,12 @@
Thanks to all https://forum.ru-board.com members involved
.NOTES
Running the script is best done on a fresh install because running it on wrong tweaked system may result in errors occurring
.NOTES
Supported Windows 11 versions
Versions: 21H2/22H2/23H2+
Builds: 22000.739+, 22621+
Editions: Home/Pro/Enterprise
.NOTES
Set execution policy to be able to run scripts only in the current PowerShell session:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
.LINK GitHub
https://github.com/farag2/Sophia-Script-for-Windows
@ -566,6 +559,11 @@ function script:Set-Policy
$Value
)
if (-not (Test-Path -Path "$env:SystemRoot\System32\gpedit.msc"))
{
return
}
switch ($Type)
{
"CLEAR"
@ -5753,6 +5751,8 @@ function NetworkAdaptersSavePower
$Enable
)
Write-Verbose -Message $Localization.Patient -Verbose
if (Get-NetAdapter -Physical | Where-Object -FilterScript {$_.Status -eq "Up"})
{
$PhysicalAdaptersStatusUp = @((Get-NetAdapter -Physical | Where-Object -FilterScript {$_.Status -eq "Up"}).Name)
@ -10129,7 +10129,7 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
<#
.SYNOPSIS
Install "HEVC Video Extensions from Device Manufacturer" to be able to open .heic and .heif formats
"HEVC Video Extensions from Device Manufacturer" extension
.PARAMETER Install
Download and install the "HEVC Video Extensions from Device Manufacturer" extension
@ -10179,7 +10179,7 @@ function HEIF
"Install"
{
# Check whether the extension is already installed
if ((Get-AppxPackage -Name Microsoft.HEVCVideoExtension) -and (Get-AppxPackage -Name Microsoft.Windows.Photos))
if (-not ((Get-AppxPackage -Name Microsoft.HEVCVideoExtension) -and (Get-AppxPackage -Name Microsoft.Windows.Photos)))
{
return
}
@ -10200,9 +10200,9 @@ function HEIF
try
{
# Check whether https://github.com is alive
# Check whether https://store.rg-adguard.net is alive
$Parameters = @{
Uri = "https://github.com"
Uri = "https://store.rg-adguard.net/api/GetFiles"
Method = "Head"
DisableKeepAlive = $true
UseBasicParsing = $true
@ -10212,20 +10212,44 @@ function HEIF
return
}
# https://github.com/farag2/Sophia-Script-for-Windows/tree/master/Misc
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Body = @{
type = "url"
url = "https://www.microsoft.com/store/productId/9n4wgh0z6vhq"
ring = "Retail"
lang = "en-US"
}
$Parameters = @{
Uri = "https://github.com/farag2/Sophia-Script-for-Windows/raw/master/Misc/Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx"
UseBasicParsing = $true
Verbose = $true
Uri = "https://store.rg-adguard.net/api/GetFiles"
Method = "Post"
ContentType = "application/x-www-form-urlencoded"
Body = $Body
Verbose = $true
}
$Raw = Invoke-WebRequest @Parameters
# Parsing the page
$Raw | Select-String -Pattern '<tr style.*<a href=\"(?<url>.*)"\s.*>(?<text>.*)<\/a>' -AllMatches | ForEach-Object -Process {$_.Matches} | Where-Object -FilterScript {$_.Value -like "*x64*.appx*"} | ForEach-Object -Process {
$TempURL = ($_.Groups | Select-Object -Index 1).Value
$HEVCPackageName = ($_.Groups | Select-Object -Index 2).Value.Split("_") | Select-Object -Index 1
}
Invoke-WebRequest @Parameters
# Installing "HEVC Video Extensions from Device Manufacturer"
Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Verbose
if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version)
{
Write-Verbose -Message $Localization.Patient -Verbose
Write-Verbose -Message $Localization.HEVCDownloading -Verbose
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}"
$Parameters = @{
Uri = $TempURL
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx"
Verbose = $true
}
Invoke-WebRequest @Parameters
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_2.0.51121.0_x64__8wekyb3d8bbwe.Appx" -Force
Add-AppxPackage -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Verbose
Remove-Item -Path "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" -Force
}
}
catch [System.Net.WebException]
{

4
src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

@ -2,7 +2,7 @@
.SYNOPSIS
Default preset file for "Sophia Script for Windows 11 (PowerShell 7)"
Version: v6.2.1
Version: v6.2.2
Date: 29.10.2022
Copyright (c) 20142022 farag
@ -73,7 +73,7 @@ param
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.2.1 (PowerShell 7) | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.2.2 (PowerShell 7) | Made with $([char]::ConvertFromUtf32(0x1F497)) of Windows | $([char]0x00A9) farag & Inestic, 2014$([char]0x2013)2022"
Remove-Module -Name Sophia -Force -ErrorAction Ignore
Import-Module -Name $PSScriptRoot\Manifest\Sophia.psd1 -PassThru -Force

Loading…
Cancel
Save