Browse Source

27.02.2022 6.0.13

pull/343/head
Dmitry Nefedov 3 years ago
parent
commit
e700d0da77
  1. 2
      Sophia Script/Sophia Script for Windows 10 LTSC 2019/Functions.ps1
  2. 54
      Sophia Script/Sophia Script for Windows 10 LTSC 2019/Module/Sophia.psm1
  3. 18
      Sophia Script/Sophia Script for Windows 10 LTSC 2019/Sophia.ps1
  4. 6
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Functions.ps1
  5. 2
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Manifest/Sophia.psd1
  6. 56
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Module/Sophia.psm1
  7. 22
      Sophia Script/Sophia Script for Windows 10 LTSC 2021/Sophia.ps1
  8. 6
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Functions.ps1
  9. 2
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Manifest/Sophia.psd1
  10. 73
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Module/Sophia.psm1
  11. 22
      Sophia Script/Sophia Script for Windows 10 PowerShell 7/Sophia.ps1
  12. 6
      Sophia Script/Sophia Script for Windows 10/Functions.ps1
  13. 2
      Sophia Script/Sophia Script for Windows 10/Manifest/Sophia.psd1
  14. 73
      Sophia Script/Sophia Script for Windows 10/Module/Sophia.psm1
  15. 12
      Sophia Script/Sophia Script for Windows 10/Sophia.ps1
  16. 6
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Functions.ps1
  17. 2
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Manifest/Sophia.psd1
  18. 77
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Module/Sophia.psm1
  19. 18
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Sophia.ps1
  20. 6
      Sophia Script/Sophia Script for Windows 11/Functions.ps1
  21. 2
      Sophia Script/Sophia Script for Windows 11/Manifest/Sophia.psd1
  22. 79
      Sophia Script/Sophia Script for Windows 11/Module/Sophia.psm1
  23. 26
      Sophia Script/Sophia Script for Windows 11/Sophia.ps1
  24. 4
      Wrapper/Localizations/de-DE/tooltip_Windows_11.json
  25. 14
      Wrapper/Localizations/en-US/tooltip_Windows_10.json
  26. 27
      Wrapper/Localizations/en-US/tooltip_Windows_11.json
  27. 4
      Wrapper/Localizations/es-ES/tooltip_Windows_11.json
  28. 8
      Wrapper/Localizations/pt-BR/tooltip_Windows_11.json
  29. 6
      Wrapper/Localizations/ru-RU/tooltip_Windows_10.json
  30. 10
      Wrapper/Localizations/ru-RU/tooltip_Windows_11.json

2
Sophia Script/Sophia Script for Windows 10 LTSC 2019/Functions.ps1

@ -3,7 +3,7 @@
The TAB completion for functions and their arguments
Version: v5.2.19
Date: 02.02.2022
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic

54
Sophia Script/Sophia Script for Windows 10 LTSC 2019/Module/Sophia.psm1

@ -3,7 +3,7 @@
Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks
Version: v5.2.19
Date: 02.02.2022
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -205,21 +205,30 @@ function Checkings
}
# Turn off Controlled folder access to let the script proceed
switch ((Get-MpPreference).EnableControlledFolderAccess)
# Checking whether Defender wasn't disabled first
$productState = (Get-CimInstance -Namespace root/SecurityCenter2 -ClassName Antivirusproduct | Where-Object -FilterScript {$_.instanceGuid -eq "{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"}).productState
$DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2)
if ($DefenderState -notmatch "00|01")
{
"1"
# Defender is enabled
$Script:DefenderState = $true
switch ((Get-MpPreference).EnableControlledFolderAccess)
{
Write-Warning -Message $Localization.ControlledFolderAccessDisabled
"1"
{
Write-Warning -Message $Localization.ControlledFolderAccessDisabled
$Script:ControlledFolderAccess = $true
Set-MpPreference -EnableControlledFolderAccess Disabled
$Script:ControlledFolderAccess = $true
Set-MpPreference -EnableControlledFolderAccess Disabled
# Open "Ransomware protection" page
Start-Process -FilePath windowsdefender://RansomwareProtection
}
"0"
{
$Script:ControlledFolderAccess = $false
# Open "Ransomware protection" page
Start-Process -FilePath windowsdefender://RansomwareProtection
}
"0"
{
$Script:ControlledFolderAccess = $false
}
}
}
@ -1173,10 +1182,10 @@ function HiddenItems
File name extensions
.PARAMETER Show
Show file name extensions
Show the file name extensions
.PARAMETER Hide
Hide file name extensions
Hide the file name extensions
.EXAMPLE
FileExtensions -Show
@ -2166,7 +2175,7 @@ function NewAppInstalledNotification
}
"Show"
{
Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoNewAppAlert -Force
Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoNewAppAlert -Force -ErrorAction Ignore
}
}
}
@ -3095,13 +3104,13 @@ function Win32LongPathLimit
<#
.SYNOPSIS
The Stop error information display on the BSoD
Stop error code when BSoD occurs
.PARAMETER Enable
Display the Stop error information on the BSoD
Display Stop error code when BSoD occurs
.PARAMETER Disable
Do not display the Stop error information on the BSoD
Do not Stop error code when BSoD occurs
.EXAMPLE
BSoDStopError -Enable
@ -6655,7 +6664,7 @@ public static void Refresh()
<#
.SYNOPSIS
Install the latest supported Microsoft Visual C++ Redistributable 20152022 x64
Install the latest Microsoft Visual C++ Redistributable Packages 20152022 x64
.EXAMPLE
InstallVCRedistx64
@ -9080,9 +9089,12 @@ public static void PostMessage()
Stop-Process -Name StartMenuExperienceHost -Force -ErrorAction Ignore
# Turn on Controlled folder access if it was turned off
if ($Script:ControlledFolderAccess)
if ($Script:DefenderState)
{
Set-MpPreference -EnableControlledFolderAccess Enabled
if ($Script:ControlledFolderAccess)
{
Set-MpPreference -EnableControlledFolderAccess Enabled
}
}
# In order for the changes to take effect the File Explorer process has to be restarted

18
Sophia Script/Sophia Script for Windows 10 LTSC 2019/Sophia.ps1

@ -3,7 +3,7 @@
Default preset file for "Sophia Script for Windows 10 LTSC 2019"
Version: v5.2.19
Date: 02.02.2022
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -221,11 +221,11 @@ HiddenItems -Enable
# Не показывать скрытые файлы, папки и диски (значение по умолчанию)
# HiddenItems -Disable
# Show file name extensions
# Show the file name extensions
# Отобразить расширения имён файлов
FileExtensions -Show
# Hide file name extensions (default value)
# Hide the file name extensions (default value)
# Скрывать расширения имён файлов файлов (значение по умолчанию)
# FileExtensions -Hide
@ -481,12 +481,12 @@ Win32LongPathLimit -Disable
# Включить ограничение Windows на 260 символов в пути (значение по умолчанию)
# Win32LongPathLimit -Enable
# Display the Stop error information on the BSoD
# Отображать Stop-ошибку при появлении BSoD
# Display Stop error code when BSoD occurs
# Отображать код Stop-ошибки при появлении BSoD
BSoDStopError -Enable
# Do not display the Stop error information on the BSoD (default value)
# Не отображать Stop-ошибку при появлении BSoD (значение по умолчанию)
# Do not Stop error code when BSoD occurs (default value)
# Не отображать код Stop-ошибки при появлении BSoD (значение по умолчанию)
# BSoDStopError -Disable
# Choose when to be notified about changes to your computer: never notify
@ -740,8 +740,8 @@ ActiveHours -Automatically
# Set-Association -ProgramPath "%ProgramFiles%\Notepad++\notepad++.exe" -Extension .txt -Icon "%ProgramFiles%\Notepad++\notepad++.exe,0"
<#
Install the latest supported Microsoft Visual C++ Redistributable 20152022 x64
Установить последнюю поддерживаемую версию Microsoft Visual C++ Redistributable 2015-2022 x64
Install the latest Microsoft Visual C++ Redistributable Packages 20152022 x64
Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 20152022 x64
https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
#>

6
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Functions.ps1

@ -2,8 +2,8 @@
.SYNOPSIS
The TAB completion for functions and their arguments
Version: v5.12.10
Date: 02.02.2022
Version: v5.12.11
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -54,7 +54,7 @@ function Sophia
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.10 | 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.12.11 | 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
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Manifest/Sophia.psd1

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

56
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Module/Sophia.psm1

@ -2,8 +2,8 @@
.SYNOPSIS
Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks
Version: v5.12.10
Date: 02.02.2022
Version: v5.12.11
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -230,21 +230,30 @@ function Checkings
}
# Turn off Controlled folder access to let the script proceed
switch ((Get-MpPreference).EnableControlledFolderAccess)
# Checking whether Defender wasn't disabled first
$productState = (Get-CimInstance -Namespace root/SecurityCenter2 -ClassName Antivirusproduct | Where-Object -FilterScript {$_.instanceGuid -eq "{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"}).productState
$DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2)
if ($DefenderState -notmatch "00|01")
{
"1"
# Defender is enabled
$Script:DefenderState = $true
switch ((Get-MpPreference).EnableControlledFolderAccess)
{
Write-Warning -Message $Localization.ControlledFolderAccessDisabled
"1"
{
Write-Warning -Message $Localization.ControlledFolderAccessDisabled
$Script:ControlledFolderAccess = $true
Set-MpPreference -EnableControlledFolderAccess Disabled
$Script:ControlledFolderAccess = $true
Set-MpPreference -EnableControlledFolderAccess Disabled
# Open "Ransomware protection" page
Start-Process -FilePath windowsdefender://RansomwareProtection
}
"0"
{
$Script:ControlledFolderAccess = $false
# Open "Ransomware protection" page
Start-Process -FilePath windowsdefender://RansomwareProtection
}
"0"
{
$Script:ControlledFolderAccess = $false
}
}
}
@ -1308,10 +1317,10 @@ function HiddenItems
File name extensions
.PARAMETER Show
Show file name extensions
Show the file name extensions
.PARAMETER Hide
Hide file name extensions
Hide the file name extensions
.EXAMPLE
FileExtensions -Show
@ -2454,7 +2463,7 @@ function NewAppInstalledNotification
}
"Show"
{
Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoNewAppAlert -Force
Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoNewAppAlert -Force -ErrorAction Ignore
}
}
}
@ -3434,13 +3443,13 @@ function Win32LongPathLimit
<#
.SYNOPSIS
The Stop error information display on the BSoD
Stop error code when BSoD occurs
.PARAMETER Enable
Display the Stop error information on the BSoD
Display Stop error code when BSoD occurs
.PARAMETER Disable
Do not display the Stop error information on the BSoD
Do not Stop error code when BSoD occurs
.EXAMPLE
BSoDStopError -Enable
@ -7244,7 +7253,7 @@ public static void Refresh()
<#
.SYNOPSIS
Install the latest supported Microsoft Visual C++ Redistributable 20152022 x64
Install the latest Microsoft Visual C++ Redistributable Packages 20152022 x64
.EXAMPLE
InstallVCRedistx64
@ -10217,9 +10226,12 @@ public static void PostMessage()
Stop-Process -Name StartMenuExperienceHost -Force -ErrorAction Ignore
# Turn on Controlled folder access if it was turned off
if ($Script:ControlledFolderAccess)
if ($Script:DefenderState)
{
Set-MpPreference -EnableControlledFolderAccess Enabled
if ($Script:ControlledFolderAccess)
{
Set-MpPreference -EnableControlledFolderAccess Enabled
}
}
# In order for the changes to take effect the File Explorer process has to be restarted

22
Sophia Script/Sophia Script for Windows 10 LTSC 2021/Sophia.ps1

@ -2,8 +2,8 @@
.SYNOPSIS
Default preset file for "Sophia Script for Windows 10 LTSC 2021"
Version: v5.12.10
Date: 02.02.2022
Version: v5.12.11
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -71,7 +71,7 @@ param
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.10 | 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.12.11 | 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
@ -236,11 +236,11 @@ HiddenItems -Enable
# Не показывать скрытые файлы, папки и диски (значение по умолчанию)
# HiddenItems -Disable
# Show file name extensions
# Show the file name extensions
# Отобразить расширения имён файлов
FileExtensions -Show
# Hide file name extensions (default value)
# Hide the file name extensions (default value)
# Скрывать расширения имён файлов файлов (значение по умолчанию)
# FileExtensions -Hide
@ -528,12 +528,12 @@ Win32LongPathLimit -Disable
# Включить ограничение Windows на 260 символов в пути (значение по умолчанию)
# Win32LongPathLimit -Enable
# Display the Stop error information on the BSoD
# Отображать Stop-ошибку при появлении BSoD
# Display Stop error code when BSoD occurs
# Отображать код Stop-ошибки при появлении BSoD
BSoDStopError -Enable
# Do not display the Stop error information on the BSoD (default value)
# Не отображать Stop-ошибку при появлении BSoD (значение по умолчанию)
# Do not Stop error code when BSoD occurs (default value)
# Не отображать код Stop-ошибки при появлении BSoD (значение по умолчанию)
# BSoDStopError -Disable
# Choose when to be notified about changes to your computer: never notify
@ -830,8 +830,8 @@ RestartDeviceAfterUpdate -Enable
# Set-Association -ProgramPath "%ProgramFiles%\Notepad++\notepad++.exe" -Extension .txt -Icon "%ProgramFiles%\Notepad++\notepad++.exe,0"
<#
Install the latest supported Microsoft Visual C++ Redistributable 20152022 x64
Установить последнюю поддерживаемую версию Microsoft Visual C++ Redistributable 2015-2022 x64
Install the latest Microsoft Visual C++ Redistributable Packages 20152022 x64
Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 20152022 x64
https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
#>

6
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Functions.ps1

@ -2,8 +2,8 @@
.SYNOPSIS
The TAB completion for functions and their arguments
Version: v5.12.11
Date: 02.02.2022
Version: v5.12.12
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -54,7 +54,7 @@ function Sophia
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.11 (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.12.12 (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
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Manifest/Sophia.psd1

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

73
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Module/Sophia.psm1

@ -2,8 +2,8 @@
.SYNOPSIS
Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks
Version: v5.12.11
Date: 02.02.2022
Version: v5.12.12
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -245,21 +245,30 @@ function Checkings
Import-Module -Name Microsoft.PowerShell.Management, PackageManagement, Appx -UseWindowsPowerShell
# Turn off Controlled folder access to let the script proceed
switch ((Get-MpPreference).EnableControlledFolderAccess)
# Checking whether Defender wasn't disabled first
$productState = (Get-CimInstance -Namespace root/SecurityCenter2 -ClassName Antivirusproduct | Where-Object -FilterScript {$_.instanceGuid -eq "{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"}).productState
$DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2)
if ($DefenderState -notmatch "00|01")
{
"1"
# Defender is enabled
$Script:DefenderState = $true
switch ((Get-MpPreference).EnableControlledFolderAccess)
{
Write-Warning -Message $Localization.ControlledFolderAccessDisabled
"1"
{
Write-Warning -Message $Localization.ControlledFolderAccessDisabled
$Script:ControlledFolderAccess = $true
Set-MpPreference -EnableControlledFolderAccess Disabled
$Script:ControlledFolderAccess = $true
Set-MpPreference -EnableControlledFolderAccess Disabled
# Open "Ransomware protection" page
Start-Process -FilePath windowsdefender://RansomwareProtection
}
"0"
{
$Script:ControlledFolderAccess = $false
# Open "Ransomware protection" page
Start-Process -FilePath windowsdefender://RansomwareProtection
}
"0"
{
$Script:ControlledFolderAccess = $false
}
}
}
@ -1594,10 +1603,10 @@ function HiddenItems
File name extensions
.PARAMETER Show
Show file name extensions
Show the file name extensions
.PARAMETER Hide
Hide file name extensions
Hide the file name extensions
.EXAMPLE
FileExtensions -Show
@ -3074,7 +3083,7 @@ function NewAppInstalledNotification
}
"Show"
{
Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoNewAppAlert -Force
Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoNewAppAlert -Force -ErrorAction Ignore
}
}
}
@ -4336,13 +4345,13 @@ function Win32LongPathLimit
<#
.SYNOPSIS
The Stop error information display on the BSoD
Stop error code when BSoD occurs
.PARAMETER Enable
Display the Stop error information on the BSoD
Display Stop error code when BSoD occurs
.PARAMETER Disable
Do not display the Stop error information on the BSoD
Do not Stop error code when BSoD occurs
.EXAMPLE
BSoDStopError -Enable
@ -8219,7 +8228,7 @@ function UninstallPCHealthCheck
<#
.SYNOPSIS
Install the latest supported Microsoft Visual C++ Redistributable 20152022 x64
Install the latest Microsoft Visual C++ Redistributable Packages 20152022 x64
.EXAMPLE
InstallVCRedistx64
@ -10017,6 +10026,9 @@ function CheckUWPAppsUpdates
.EXAMPLE
XboxGameBar -Enable
.NOTES
Even if you uninstalled Xbox Game Bar app and want to disable it, you need to create these reg keys anyway to prevent popping up the "You'll need a new app to open this ms-gamingoverlay" warning
.NOTES
Current user
#>
@ -10043,19 +10055,13 @@ function XboxGameBar
{
"Disable"
{
if ((Get-AppxPackage -Name Microsoft.XboxGamingOverlay) -or (Get-AppxPackage -Name Microsoft.GamingApp))
{
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 0 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 0 -Force
}
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 0 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 0 -Force
}
"Enable"
{
if ((Get-AppxPackage -Name Microsoft.XboxGamingOverlay) -or (Get-AppxPackage -Name Microsoft.GamingApp))
{
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 1 -Force
}
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 1 -Force
}
}
}
@ -12595,9 +12601,12 @@ public static void PostMessage()
Stop-Process -Name StartMenuExperienceHost -Force -ErrorAction Ignore
# Turn on Controlled folder access if it was turned off
if ($Script:ControlledFolderAccess)
if ($Script:DefenderState)
{
Set-MpPreference -EnableControlledFolderAccess Enabled
if ($Script:ControlledFolderAccess)
{
Set-MpPreference -EnableControlledFolderAccess Enabled
}
}
# In order for the changes to take effect the File Explorer process has to be restarted

22
Sophia Script/Sophia Script for Windows 10 PowerShell 7/Sophia.ps1

@ -2,8 +2,8 @@
.SYNOPSIS
Default preset file for "Sophia Script for Windows 10 (PowerShell 7)"
Version: v5.12.11
Date: 02.02.2022
Version: v5.12.12
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -71,7 +71,7 @@ param
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.11 (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.12.12 (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
@ -276,11 +276,11 @@ HiddenItems -Enable
# Не показывать скрытые файлы, папки и диски (значение по умолчанию)
# HiddenItems -Disable
# Show file name extensions
# Show the file name extensions
# Отобразить расширения имён файлов
FileExtensions -Show
# Hide file name extensions (default value)
# Hide the file name extensions (default value)
# Скрывать расширения имён файлов файлов (значение по умолчанию)
# FileExtensions -Hide
@ -606,12 +606,12 @@ Win32LongPathLimit -Disable
# Включить ограничение Windows на 260 символов в пути (значение по умолчанию)
# Win32LongPathLimit -Enable
# Display the Stop error information on the BSoD
# Отображать Stop-ошибку при появлении BSoD
# Display Stop error code when BSoD occurs
# Отображать код Stop-ошибки при появлении BSoD
BSoDStopError -Enable
# Do not display the Stop error information on the BSoD (default value)
# Не отображать Stop-ошибку при появлении BSoD (значение по умолчанию)
# Do not Stop error code when BSoD occurs (default value)
# Не отображать код Stop-ошибки при появлении BSoD (значение по умолчанию)
# BSoDStopError -Disable
# Choose when to be notified about changes to your computer: never notify
@ -926,8 +926,8 @@ RestartDeviceAfterUpdate -Enable
UninstallPCHealthCheck
<#
Install the latest supported Microsoft Visual C++ Redistributable 20152022 x64
Установить последнюю поддерживаемую версию Microsoft Visual C++ Redistributable 2015-2022 x64
Install the latest Microsoft Visual C++ Redistributable Packages 20152022 x64
Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 20152022 x64
https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
#>

6
Sophia Script/Sophia Script for Windows 10/Functions.ps1

@ -2,8 +2,8 @@
.SYNOPSIS
The TAB completion for functions and their arguments
Version: v5.12.11
Date: 02.02.2022
Version: v5.12.12
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -54,7 +54,7 @@ function Sophia
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.11 | 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.12.12 | 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
Sophia Script/Sophia Script for Windows 10/Manifest/Sophia.psd1

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

73
Sophia Script/Sophia Script for Windows 10/Module/Sophia.psm1

@ -2,8 +2,8 @@
.SYNOPSIS
Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks
Version: v5.12.11
Date: 02.02.2022
Version: v5.12.12
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -230,21 +230,30 @@ function Checkings
}
# Turn off Controlled folder access to let the script proceed
switch ((Get-MpPreference).EnableControlledFolderAccess)
# Checking whether Defender wasn't disabled first
$productState = (Get-CimInstance -Namespace root/SecurityCenter2 -ClassName Antivirusproduct | Where-Object -FilterScript {$_.instanceGuid -eq "{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"}).productState
$DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2)
if ($DefenderState -notmatch "00|01")
{
"1"
# Defender is enabled
$Script:DefenderState = $true
switch ((Get-MpPreference).EnableControlledFolderAccess)
{
Write-Warning -Message $Localization.ControlledFolderAccessDisabled
"1"
{
Write-Warning -Message $Localization.ControlledFolderAccessDisabled
$Script:ControlledFolderAccess = $true
Set-MpPreference -EnableControlledFolderAccess Disabled
$Script:ControlledFolderAccess = $true
Set-MpPreference -EnableControlledFolderAccess Disabled
# Open "Ransomware protection" page
Start-Process -FilePath windowsdefender://RansomwareProtection
}
"0"
{
$Script:ControlledFolderAccess = $false
# Open "Ransomware protection" page
Start-Process -FilePath windowsdefender://RansomwareProtection
}
"0"
{
$Script:ControlledFolderAccess = $false
}
}
}
@ -1579,10 +1588,10 @@ function HiddenItems
File name extensions
.PARAMETER Show
Show file name extensions
Show the file name extensions
.PARAMETER Hide
Hide file name extensions
Hide the file name extensions
.EXAMPLE
FileExtensions -Show
@ -3059,7 +3068,7 @@ function NewAppInstalledNotification
}
"Show"
{
Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoNewAppAlert -Force
Remove-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name NoNewAppAlert -Force -ErrorAction Ignore
}
}
}
@ -4306,13 +4315,13 @@ function Win32LongPathLimit
<#
.SYNOPSIS
The Stop error information display on the BSoD
Stop error code when BSoD occurs
.PARAMETER Enable
Display the Stop error information on the BSoD
Display Stop error code when BSoD occurs
.PARAMETER Disable
Do not display the Stop error information on the BSoD
Do not Stop error code when BSoD occurs
.EXAMPLE
BSoDStopError -Enable
@ -8186,7 +8195,7 @@ function UninstallPCHealthCheck
<#
.SYNOPSIS
Install the latest supported Microsoft Visual C++ Redistributable 20152022 x64
Install the latest Microsoft Visual C++ Redistributable Packages 20152022 x64
.EXAMPLE
InstallVCRedistx64
@ -9959,6 +9968,9 @@ function CheckUWPAppsUpdates
.EXAMPLE
XboxGameBar -Enable
.NOTES
Even if you uninstalled Xbox Game Bar app and want to disable it, you need to create these reg keys anyway to prevent popping up the "You'll need a new app to open this ms-gamingoverlay" warning
.NOTES
Current user
#>
@ -9985,19 +9997,13 @@ function XboxGameBar
{
"Disable"
{
if ((Get-AppxPackage -Name Microsoft.XboxGamingOverlay) -or (Get-AppxPackage -Name Microsoft.GamingApp))
{
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 0 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 0 -Force
}
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 0 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 0 -Force
}
"Enable"
{
if ((Get-AppxPackage -Name Microsoft.XboxGamingOverlay) -or (Get-AppxPackage -Name Microsoft.GamingApp))
{
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 1 -Force
}
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 1 -Force
}
}
}
@ -12535,9 +12541,12 @@ public static void PostMessage()
Stop-Process -Name StartMenuExperienceHost -Force -ErrorAction Ignore
# Turn on Controlled folder access if it was turned off
if ($Script:ControlledFolderAccess)
if ($Script:DefenderState)
{
Set-MpPreference -EnableControlledFolderAccess Enabled
if ($Script:ControlledFolderAccess)
{
Set-MpPreference -EnableControlledFolderAccess Enabled
}
}
# In order for the changes to take effect the File Explorer process has to be restarted

12
Sophia Script/Sophia Script for Windows 10/Sophia.ps1

@ -2,8 +2,8 @@
.SYNOPSIS
Default preset file for "Sophia Script for Windows 10"
Version: v5.12.11
Date: 02.02.2022
Version: v5.12.12
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -71,7 +71,7 @@ param
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 10 v5.12.11 | 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.12.12 | 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
@ -87,7 +87,7 @@ Import-LocalizedData -BindingVariable Global:Localization -FileName Sophia -Base
.\Sophia.ps1 -Functions "DiagTrackService -Disable", "DiagnosticDataLevel -Minimal", UninstallUWPApps
.NOTES
Separate functions with a comma
Use commas to separate funtions
Разделяйте функции запятыми
#>
if ($Functions)
@ -926,8 +926,8 @@ RestartDeviceAfterUpdate -Enable
UninstallPCHealthCheck
<#
Install the latest supported Microsoft Visual C++ Redistributable 20152022 x64
Установить последнюю поддерживаемую версию Microsoft Visual C++ Redistributable 2015-2022 x64
Install the latest Microsoft Visual C++ Redistributable Packages 20152022 x64
Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 20152022 x64
https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
#>

6
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Functions.ps1

@ -2,8 +2,8 @@
.SYNOPSIS
The TAB completion for functions and their arguments
Version: v6.0.12
Date: 02.02.2022
Version: v6.0.13
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -54,7 +54,7 @@ function Sophia
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.0.12 | 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.0.13 | 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
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Manifest/Sophia.psd1

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

77
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Module/Sophia.psm1

@ -2,8 +2,8 @@
.SYNOPSIS
Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks
Version: v6.0.12
Date: 02.02.2022
Version: v6.0.13
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -234,21 +234,30 @@ function Checkings
Import-Module -Name Microsoft.PowerShell.Management, PackageManagement, Appx -UseWindowsPowerShell
# Turn off Controlled folder access to let the script proceed
switch ((Get-MpPreference).EnableControlledFolderAccess)
# Checking whether Defender wasn't disabled first
$productState = (Get-CimInstance -Namespace root/SecurityCenter2 -ClassName Antivirusproduct | Where-Object -FilterScript {$_.instanceGuid -eq "{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"}).productState
$DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2)
if ($DefenderState -notmatch "00|01")
{
"1"
# Defender is enabled
$Script:DefenderState = $true
switch ((Get-MpPreference).EnableControlledFolderAccess)
{
Write-Warning -Message $Localization.ControlledFolderAccessDisabled
"1"
{
Write-Warning -Message $Localization.ControlledFolderAccessDisabled
$Script:ControlledFolderAccess = $true
Set-MpPreference -EnableControlledFolderAccess Disabled
$Script:ControlledFolderAccess = $true
Set-MpPreference -EnableControlledFolderAccess Disabled
# Open "Ransomware protection" page
Start-Process -FilePath windowsdefender://RansomwareProtection
}
"0"
{
$Script:ControlledFolderAccess = $false
# Open "Ransomware protection" page
Start-Process -FilePath windowsdefender://RansomwareProtection
}
"0"
{
$Script:ControlledFolderAccess = $false
}
}
}
@ -1638,10 +1647,10 @@ function HiddenItems
File name extensions
.PARAMETER Show
Show file name extensions
Show the file name extensions
.PARAMETER Hide
Hide file name extensions
Hide the file name extensions
.EXAMPLE
FileExtensions -Show
@ -3995,13 +4004,13 @@ function Win32LongPathLimit
<#
.SYNOPSIS
The Stop error information display on the BSoD
Stop error code when BSoD occurs
.PARAMETER Enable
Display the Stop error information on the BSoD
Display Stop error code when BSoD occurs
.PARAMETER Disable
Do not display the Stop error information on the BSoD
Do not Stop error code when BSoD occurs
.EXAMPLE
BSoDStopError -Enable
@ -7915,7 +7924,7 @@ function DefaultTerminalApp
<#
.SYNOPSIS
Install the latest supported Microsoft Visual C++ Redistributable 20152022 x64
Install the latest Microsoft Visual C++ Redistributable Packages 20152022 x64
.EXAMPLE
InstallVCRedistx64
@ -9361,6 +9370,9 @@ function CheckUWPAppsUpdates
.EXAMPLE
XboxGameBar -Enable
.NOTES
Even if you uninstalled Xbox Game Bar app and want to disable it, you need to create these reg keys anyway to prevent popping up the "You'll need a new app to open this ms-gamingoverlay" warning
.NOTES
Current user
#>
@ -9387,19 +9399,13 @@ function XboxGameBar
{
"Disable"
{
if ((Get-AppxPackage -Name Microsoft.XboxGamingOverlay) -or (Get-AppxPackage -Name Microsoft.GamingApp))
{
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 0 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 0 -Force
}
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 0 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 0 -Force
}
"Enable"
{
if ((Get-AppxPackage -Name Microsoft.XboxGamingOverlay) -or (Get-AppxPackage -Name Microsoft.GamingApp))
{
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 1 -Force
}
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 1 -Force
}
}
}
@ -11751,13 +11757,13 @@ function OpenWindowsTerminalContext
<#
.SYNOPSIS
The "Open in Windows Terminal as administrator" item in the context menu
The "Open in Windows Terminal" (Admin) item in the Desktop and folders context menu
.PARAMETER Show
Show the "Open in Windows Terminal (Admin)" item in the Desktop and folders context menu
Show the "Open in Windows Terminal" (Admin) item in the Desktop and folders context menu
.PARAMETER Hide
Hide the "Open in Windows Terminal (Admin)" item from the Desktop and folders context menu
Hide the "Open in Windows Terminal" (Admin) item from the Desktop and folders context menu
.EXAMPLE
OpenWindowsTerminalAdminContext -Show
@ -11944,9 +11950,12 @@ public static void PostMessage()
Stop-Process -Name StartMenuExperienceHost -Force -ErrorAction Ignore
# Turn on Controlled folder access if it was turned off
if ($Script:ControlledFolderAccess)
if ($Script:DefenderState)
{
Set-MpPreference -EnableControlledFolderAccess Enabled
if ($Script:ControlledFolderAccess)
{
Set-MpPreference -EnableControlledFolderAccess Enabled
}
}
# In order for the changes to take effect the File Explorer process has to be restarted

18
Sophia Script/Sophia Script for Windows 11 PowerShell 7/Sophia.ps1

@ -2,8 +2,8 @@
.SYNOPSIS
Default preset file for "Sophia Script for Windows 11"
Version: v6.0.12
Date: 02.02.2022
Version: v6.0.13
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -70,7 +70,7 @@ param
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.0.12 (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.0.13 (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
@ -283,11 +283,11 @@ HiddenItems -Enable
# Не показывать скрытые файлы, папки и диски (значение по умолчанию)
# HiddenItems -Disable
# Show file name extensions
# Show the file name extensions
# Отобразить расширения имён файлов
FileExtensions -Show
# Hide file name extensions (default value)
# Hide the file name extensions (default value)
# Скрывать расширения имён файлов файлов (значение по умолчанию)
# FileExtensions -Hide
@ -886,8 +886,8 @@ DefaultTerminalApp -WindowsTerminal
# DefaultTerminalApp -ConsoleHost
<#
Install the latest supported Microsoft Visual C++ Redistributable 20152022 x64
Установить последнюю поддерживаемую версию Microsoft Visual C++ Redistributable 2015-2022 x64
Install the latest Microsoft Visual C++ Redistributable Packages 20152022 x64
Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 20152022 x64
https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
#>
@ -1310,8 +1310,8 @@ OpenWindowsTerminalContext -Hide
# Отобразить пункт "Открыть в Терминале Windows" в контекстном меню папок (значение по умолчанию)
# OpenWindowsTerminalContext -Show
# Show the "Open in Windows Terminal (Admin)" item in the Desktop and folders context menu
# Отобразить пункт "Открыть в Терминале Windows (Администратор)" в контекстном меню Рабочего стола и папок
# Show the "Open in Windows Terminal" (Admin) item in the Desktop and folders context menu
# Отобразить пункт "Открыть в Терминале Windows" (Администратор) в контекстном меню Рабочего стола и папок
OpenWindowsTerminalAdminContext -Show
# Hide the "Open in Windows Terminal (Admin)" item from the Desktop and folders context menu (default value)

6
Sophia Script/Sophia Script for Windows 11/Functions.ps1

@ -2,8 +2,8 @@
.SYNOPSIS
The TAB completion for functions and their arguments
Version: v6.0.12
Date: 02.02.2022
Version: v6.0.13
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -54,7 +54,7 @@ function Sophia
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.0.12 | 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.0.13 | 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
Sophia Script/Sophia Script for Windows 11/Manifest/Sophia.psd1

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

79
Sophia Script/Sophia Script for Windows 11/Module/Sophia.psm1

@ -2,8 +2,8 @@
.SYNOPSIS
Sophia Script is a PowerShell module for Windows 10 & Windows 11 fine-tuning and automating the routine tasks
Version: v6.0.12
Date: 02.02.2022
Version: v6.0.13
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -219,21 +219,30 @@ function Checkings
}
# Turn off Controlled folder access to let the script proceed
switch ((Get-MpPreference).EnableControlledFolderAccess)
# Checking whether Defender wasn't disabled first
$productState = (Get-CimInstance -Namespace root/SecurityCenter2 -ClassName Antivirusproduct | Where-Object -FilterScript {$_.instanceGuid -eq "{D68DDC3A-831F-4fae-9E44-DA132C1ACF46}"}).productState
$DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2)
if ($DefenderState -notmatch "00|01")
{
"1"
# Defender is enabled
$Script:DefenderState = $true
switch ((Get-MpPreference).EnableControlledFolderAccess)
{
Write-Warning -Message $Localization.ControlledFolderAccessDisabled
"1"
{
Write-Warning -Message $Localization.ControlledFolderAccessDisabled
$Script:ControlledFolderAccess = $true
Set-MpPreference -EnableControlledFolderAccess Disabled
$Script:ControlledFolderAccess = $true
Set-MpPreference -EnableControlledFolderAccess Disabled
# Open "Ransomware protection" page
Start-Process -FilePath windowsdefender://RansomwareProtection
}
"0"
{
$Script:ControlledFolderAccess = $false
# Open "Ransomware protection" page
Start-Process -FilePath windowsdefender://RansomwareProtection
}
"0"
{
$Script:ControlledFolderAccess = $false
}
}
}
@ -1623,10 +1632,10 @@ function HiddenItems
File name extensions
.PARAMETER Show
Show file name extensions
Show the file name extensions
.PARAMETER Hide
Hide file name extensions
Hide the file name extensions
.EXAMPLE
FileExtensions -Show
@ -3965,13 +3974,13 @@ function Win32LongPathLimit
<#
.SYNOPSIS
The Stop error information display on the BSoD
Stop error code when BSoD occurs
.PARAMETER Enable
Display the Stop error information on the BSoD
Display Stop error code when BSoD occurs
.PARAMETER Disable
Do not display the Stop error information on the BSoD
Do not Stop error code when BSoD occurs
.EXAMPLE
BSoDStopError -Enable
@ -7882,7 +7891,7 @@ function DefaultTerminalApp
<#
.SYNOPSIS
Install the latest supported Microsoft Visual C++ Redistributable 20152022 x64
Install the latest Microsoft Visual C++ Redistributable Packages 20152022 x64
.EXAMPLE
InstallVCRedistx64
@ -9303,6 +9312,9 @@ function CheckUWPAppsUpdates
.EXAMPLE
XboxGameBar -Enable
.NOTES
Even if you uninstalled Xbox Game Bar app and want to disable it, you need to create these reg keys anyway to prevent popping up the "You'll need a new app to open this ms-gamingoverlay" warning
.NOTES
Current user
#>
@ -9329,19 +9341,13 @@ function XboxGameBar
{
"Disable"
{
if ((Get-AppxPackage -Name Microsoft.XboxGamingOverlay) -or (Get-AppxPackage -Name Microsoft.GamingApp))
{
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 0 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 0 -Force
}
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 0 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 0 -Force
}
"Enable"
{
if ((Get-AppxPackage -Name Microsoft.XboxGamingOverlay) -or (Get-AppxPackage -Name Microsoft.GamingApp))
{
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 1 -Force
}
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR -Name AppCaptureEnabled -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path HKCU:\System\GameConfigStore -Name GameDVR_Enabled -PropertyType DWord -Value 1 -Force
}
}
}
@ -11632,7 +11638,7 @@ function UseStoreOpenWith
<#
.SYNOPSIS
The "Open in Windows Terminal" item in the context menu
The "Open in Windows Terminal" item in the folders context menu
.PARAMETER Hide
Hide the "Open in Windows Terminal" item in the folders context menu
@ -11693,13 +11699,13 @@ function OpenWindowsTerminalContext
<#
.SYNOPSIS
The "Open in Windows Terminal as administrator" item in the context menu
The "Open in Windows Terminal" (Admin) item in the Desktop and folders context menu
.PARAMETER Show
Show the "Open in Windows Terminal (Admin)" item in the Desktop and folders context menu
Show the "Open in Windows Terminal" (Admin) item in the Desktop and folders context menu
.PARAMETER Hide
Hide the "Open in Windows Terminal (Admin)" item from the Desktop and folders context menu
Hide the "Open in Windows Terminal" (Admin) item from the Desktop and folders context menu
.EXAMPLE
OpenWindowsTerminalAdminContext -Show
@ -11886,9 +11892,12 @@ public static void PostMessage()
Stop-Process -Name StartMenuExperienceHost -Force -ErrorAction Ignore
# Turn on Controlled folder access if it was turned off
if ($Script:ControlledFolderAccess)
if ($Script:DefenderState)
{
Set-MpPreference -EnableControlledFolderAccess Enabled
if ($Script:ControlledFolderAccess)
{
Set-MpPreference -EnableControlledFolderAccess Enabled
}
}
# In order for the changes to take effect the File Explorer process has to be restarted

26
Sophia Script/Sophia Script for Windows 11/Sophia.ps1

@ -2,8 +2,8 @@
.SYNOPSIS
Default preset file for "Sophia Script for Windows 11"
Version: v6.0.12
Date: 02.02.2022
Version: v6.0.13
Date: 27.02.2022
Copyright (c) 20142022 farag
Copyright (c) 20192022 farag & Inestic
@ -70,7 +70,7 @@ param
Clear-Host
$Host.UI.RawUI.WindowTitle = "Sophia Script for Windows 11 v6.0.12 | 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.0.13 | 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
@ -283,11 +283,11 @@ HiddenItems -Enable
# Не показывать скрытые файлы, папки и диски (значение по умолчанию)
# HiddenItems -Disable
# Show file name extensions
# Show the file name extensions
# Отобразить расширения имён файлов
FileExtensions -Show
# Hide file name extensions (default value)
# Hide the file name extensions (default value)
# Скрывать расширения имён файлов файлов (значение по умолчанию)
# FileExtensions -Hide
@ -387,7 +387,7 @@ TaskbarSearch -Hide
# Отобразить кнопку поиска на панели задач
# TaskbarSearch -Show
# Hide the Task view button on the taskbar
# Hide the Task view button from the taskbar
# Скрыть кнопку "Представление задач" с панели задач
TaskViewButton -Hide
@ -569,12 +569,12 @@ Win32LongPathLimit -Disable
# Включить ограничение Windows на 260 символов в пути (значение по умолчанию)
# Win32LongPathLimit -Enable
# Display the Stop error information on the BSoD
# Отображать Stop-ошибку при появлении BSoD
# Display Stop error code when BSoD occurs
# Отображать код Stop-ошибки при появлении BSoD
BSoDStopError -Enable
# Do not display the Stop error information on the BSoD (default value)
# Не отображать Stop-ошибку при появлении BSoD (значение по умолчанию)
# Do not Stop error code when BSoD occurs (default value)
# Не отображать код Stop-ошибки при появлении BSoD (значение по умолчанию)
# BSoDStopError -Disable
# Choose when to be notified about changes to your computer: never notify
@ -966,7 +966,7 @@ CortanaAutostart -Disable
TeamsAutostart -Disable
# Enable Microsoft Teams autostarting (default value)
# Включить автозагрузкуMicrosoft Teams (значение по умолчанию)
# Включить автозагрузку Microsoft Teams (значение по умолчанию)
# TeamsAutostart -Enable
# Check for UWP apps updates
@ -1310,8 +1310,8 @@ OpenWindowsTerminalContext -Hide
# Отобразить пункт "Открыть в Терминале Windows" в контекстном меню папок (значение по умолчанию)
# OpenWindowsTerminalContext -Show
# Show the "Open in Windows Terminal (Admin)" item in the Desktop and folders context menu
# Отобразить пункт "Открыть в Терминале Windows (Администратор)" в контекстном меню Рабочего стола и папок
# Show the "Open in Windows Terminal" (Admin) item in the Desktop and folders context menu
# Отобразить пункт "Открыть в Терминале Windows" (Администратор) в контекстном меню Рабочего стола и папок
OpenWindowsTerminalAdminContext -Show
# Hide the "Open in Windows Terminal (Admin)" item from the Desktop and folders context menu (default value)

4
Wrapper/Localizations/de-DE/tooltip_Windows_11.json

@ -2101,11 +2101,11 @@
"Arg": {
"Zero": {
"Tag": "Show",
"ToolTip": "Element \"In Windows Terminal (Admin) öffnen\" im Kontextmenü von Desktop und Ordnern anzeigen"
"ToolTip": "Zeigen Sie das Element \"In Windows Terminal öffnen\" (Admin) im Kontextmenü von Desktop und Ordnern an "
},
"One": {
"Tag": "Hide",
"ToolTip": "Element \"In Windows-Terminal (Admin) öffnen\" im Kontextmenü von Desktop und Ordnern ausblenden (Standardwert)"
"ToolTip": "Blenden Sie das Element \"Im Windows-Terminal öffnen (Admin)\" aus dem Kontextmenü des Desktops und der Ordner aus (Standardwert)"
}
}
},

14
Wrapper/Localizations/en-US/tooltip_Windows_10.json

@ -313,11 +313,11 @@
"Arg": {
"Zero": {
"Tag": "Show",
"ToolTip": "Show file name extensions"
"ToolTip": "Show the file name extensions"
},
"One": {
"Tag": "Hide",
"ToolTip": "Hide file name extensions (default value)"
"ToolTip": "Hide the file name extensions (default value)"
}
}
},
@ -941,11 +941,11 @@
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Display the Stop error information on the BSoD"
"ToolTip": "Display Stop error code when BSoD occurs"
},
"One": {
"Tag": "Disable",
"ToolTip": "Do not display the Stop error information on the BSoD (default value)"
"ToolTip": "Do not Stop error code when BSoD occurs (default value)"
}
}
},
@ -1395,7 +1395,7 @@
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Install the latest supported Microsoft Visual C++ Redistributable 2015—2022 x64"
"ToolTip": "Install the latest Microsoft Visual C++ Redistributable Packages 2015–2022 x64"
}
}
},
@ -1795,11 +1795,11 @@
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Create the \"Process Creation\" сustom view in the Event Viewer to log the executed processes and their arguments. In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled"
"ToolTip": "Create the \"Process Creation\" сustom view in the Event Viewer to log executed processes and their arguments. In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled"
},
"One": {
"Tag": "Disable",
"ToolTip": "Remove the \"Process Creation\" custom view in the Event Viewer to log the executed processes and their arguments (default value)"
"ToolTip": "Remove the \"Process Creation\" custom view in the Event Viewer to log executed processes and their arguments (default value)"
}
}
},

27
Wrapper/Localizations/en-US/tooltip_Windows_11.json

@ -328,11 +328,11 @@
"Arg": {
"Zero": {
"Tag": "Show",
"ToolTip": "Show file name extensions"
"ToolTip": "Show the file name extensions"
},
"One": {
"Tag": "Hide",
"ToolTip": "Hide file name extensions (default value)"
"ToolTip": "Hide the file name extensions (default value)"
}
}
},
@ -858,11 +858,11 @@
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Display the Stop error information on the BSoD"
"ToolTip": "Display Stop error code when BSoD occurs"
},
"One": {
"Tag": "Disable",
"ToolTip": "Do not display the Stop error information on the BSoD (default value)"
"ToolTip": "Do not Stop error code when BSoD occurs (default value)"
}
}
},
@ -1305,6 +1305,17 @@
}
}
},
{
"Id": 536,
"Region": "System",
"Function": "InstallVCRedistx64",
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Install the latest Microsoft Visual C++ Redistributable Packages 2015–2022 x64"
}
}
},
{
"Id": 600,
"Region": "WSL",
@ -1625,11 +1636,11 @@
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Create the \"Process Creation\" Event Viewer сustom view to log the executed processes and their arguments. In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled"
"ToolTip": "Create the \"Process Creation\" Event Viewer сustom view to log executed processes and their arguments. In order this feature to work events auditing (AuditProcess -Enable) and command line (CommandLineProcessAudit -Enable) in process creation events will be enabled"
},
"One": {
"Tag": "Disable",
"ToolTip": "Remove \"Process Creation\" Event Viewer сustom view to log the executed processes and their arguments (default value)"
"ToolTip": "Remove \"Process Creation\" Event Viewer сustom view to log executed processes and their arguments (default value)"
}
}
},
@ -1970,11 +1981,11 @@
"Arg": {
"Zero": {
"Tag": "Show",
"ToolTip": "Show the \"Open in Windows Terminal (Admin)\" item in the Desktop and folders context menu"
"ToolTip": "Show the \"Open in Windows Terminal\" (Admin) item in the Desktop and folders context menu"
},
"One": {
"Tag": "Hide",
"ToolTip": "Hide the \"Open in Windows Terminal (Admin)\" item from the Desktop and folders context menu (default value)"
"ToolTip": "Hide the \"Open in Windows Terminal\" (Admin) item from the Desktop and folders context menu (default value)"
}
}
},

4
Wrapper/Localizations/es-ES/tooltip_Windows_11.json

@ -1996,11 +1996,11 @@
"Arg": {
"Zero": {
"Tag": "Show",
"ToolTip": "Mostrar el elemento \"Abrir en la terminal de Windows (administrador)\" en el menú contextual del escritorio y las carpetas"
"ToolTip": "Mostrar el elemento \"Abrir en Windows Terminal\" (administrador) en el menú contextual del escritorio y las carpetas"
},
"One": {
"Tag": "Hide",
"ToolTip": "Ocultar el elemento \"Abrir en la terminal de Windows (administrador)\" del menú contextual del escritorio y las carpetas (valor predeterminado)"
"ToolTip": "Ocultar el elemento \"Abrir en Windows Terminal\" (administrador) del menú contextual del escritorio y las carpetas (valor predeterminado)"
}
}
},

8
Wrapper/Localizations/pt-BR/tooltip_Windows_11.json

@ -1983,11 +1983,11 @@
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Oculte a opção de menu \"Abrir no Windows Terminal\" no menu de contexto de pastas"
"ToolTip": "Oculte a opção de menu \"Abrir em Windows Terminal\" no menu de contexto de pastas"
},
"One": {
"Tag": "Show",
"ToolTip": "Mostrar a opção de menu \"Abrir no Windows Terminal\" no menu de contexto das pastas (valor padrão)"
"ToolTip": "Mostrar a opção de menu \"Abrir em Windows Terminal\" no menu de contexto das pastas (valor padrão)"
}
}
},
@ -1998,11 +1998,11 @@
"Arg": {
"Zero": {
"Tag": "Show",
"ToolTip": "Mostrar o item \"Abrir no Windows Terminal (Admin)\" no menu de contexto da área de trabalho e pastas"
"ToolTip": "Mostrar o item \"Abrir em Terminal do Windows\" (administrador) no menu de contexto do Desktop e pastas"
},
"One": {
"Tag": "Hide",
"ToolTip": "Oculte o item \"Abrir no Windows Terminal (Admin)\" do menu de contexto da área de trabalho e pastas (valor padrão)"
"ToolTip": "Esconder o item \"Abrir em Terminal Windows\" (administrador) no menu de contexto do Desktop e pastas. (valor padrão)"
}
}
},

6
Wrapper/Localizations/ru-RU/tooltip_Windows_10.json

@ -941,11 +941,11 @@
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Отображать Stop-ошибку при появлении BSoD"
"ToolTip": "Отображать код Stop-ошибки при появлении BSoD"
},
"One": {
"Tag": "Disable",
"ToolTip": "Не отображать Stop-ошибку при появлении BSoD (значение по умолчанию)"
"ToolTip": "Не отображать код Stop-ошибки при появлении BSoD (значение по умолчанию)"
}
}
},
@ -1395,7 +1395,7 @@
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Установить последнюю поддерживаемую версию Microsoft Visual C++ Redistributable 2015-2022 x64"
"ToolTip": "Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 2015–2022 x64"
}
}
},

10
Wrapper/Localizations/ru-RU/tooltip_Windows_11.json

@ -858,11 +858,11 @@
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Отображать Stop-ошибку при появлении BSoD"
"ToolTip": "Отображать код Stop-ошибки при появлении BSoD"
},
"One": {
"Tag": "Disable",
"ToolTip": "Не отображать Stop-ошибку при появлении BSoD (значение по умолчанию)"
"ToolTip": "Не отображать код Stop-ошибки при появлении BSoD (значение по умолчанию)"
}
}
},
@ -1327,7 +1327,7 @@
"Arg": {
"Zero": {
"Tag": "",
"ToolTip": "Установить последнюю поддерживаемую версию Microsoft Visual C++ Redistributable 2015-2022 x64"
"ToolTip": "Установить последнюю версию распространяемых пакетов Microsoft Visual C++ 2015–2022 x64"
}
}
},
@ -1985,7 +1985,7 @@
},
"One": {
"Tag": "Show",
"ToolTip": "Показать пункт меню \"Открыть в Windows Terminal\" в контекстном меню папок (значение по умолчанию)"
"ToolTip": "Показать пункт меню \"Открыть в Терминале Windows\" в контекстном меню папок (значение по умолчанию)"
}
}
},
@ -1996,7 +1996,7 @@
"Arg": {
"Zero": {
"Tag": "Show",
"ToolTip": "Отобразить пункт \"Открыть в Терминале Windows (Администратор)\" в контекстном меню Рабочего стола и папок (значение по умолчанию)"
"ToolTip": "Отобразить пункт \"Открыть в Терминале Windows\" (Администратор) в контекстном меню Рабочего стола и папок"
},
"One": {
"Tag": "Hide",

Loading…
Cancel
Save