Browse Source

Fixed some typos

master
Dmitry Nefedov 8 months ago
parent
commit
a231570f07
  1. 64
      Wrapper/Config/config_Windows_11.json
  2. 56
      Wrapper/Localizations/de-DE/tooltip_Windows_11.json
  3. 56
      Wrapper/Localizations/en-US/tooltip_Windows_11.json
  4. 56
      Wrapper/Localizations/ru-RU/tooltip_Windows_11.json
  5. 12
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  6. 9
      src/Sophia_Script_for_Windows_10/Sophia.ps1
  7. 8
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  8. 9
      src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1
  9. 8
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  10. 9
      src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1
  11. 12
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  12. 9
      src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1
  13. 283
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  14. 32
      src/Sophia_Script_for_Windows_11/Sophia.ps1
  15. 218
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1
  16. 32
      src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

64
Wrapper/Config/config_Windows_11.json

@ -1888,6 +1888,22 @@
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "Microsoft Defender & Security",
"Control": "cmb",
"Required": "false",
"Function": "DefenderSandbox",
"Arg": {
"Zero": {
"Tag": "Enable"
},
"One": {
"Tag": "Disable"
}
},
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "Microsoft Defender & Security",
"Control": "chk",
@ -2122,22 +2138,6 @@
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "Context menu",
"Control": "cmb",
"Required": "false",
"Function": "CastToDeviceContext",
"Arg": {
"Zero": {
"Tag": "Hide"
},
"One": {
"Tag": "Show"
}
},
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "Context menu",
"Control": "cmb",
@ -2170,38 +2170,6 @@
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "Context menu",
"Control": "cmb",
"Required": "false",
"Function": "IncludeInLibraryContext",
"Arg": {
"Zero": {
"Tag": "Hide"
},
"One": {
"Tag": "Show"
}
},
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "Context menu",
"Control": "cmb",
"Required": "false",
"Function": "SendToContext",
"Arg": {
"Zero": {
"Tag": "Hide"
},
"One": {
"Tag": "Show"
}
},
"Preset": "Zero",
"WindowsDefault": "One"
},
{
"Region": "Context menu",
"Control": "cmb",

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

@ -1659,6 +1659,20 @@
}
}
},
{
"Region": "Microsoft Defender & Security",
"Function": "DefenderSandbox",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Aktiviert Sandboxing für Microsoft Defender."
},
"One": {
"Tag": "Disable",
"ToolTip": "Sandboxing für Microsoft Defender deaktivieren (Standardeinstellung)."
}
}
},
{
"Region": "Microsoft Defender & Security",
"Function": "DismissMSAccount",
@ -1861,20 +1875,6 @@
}
}
},
{
"Region": "Context menu",
"Function": "CastToDeviceContext",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Eintrag \"Auf Gerät übertragen\" im Kontextmenü von Mediendateien und Ordnern ausblenden."
},
"One": {
"Tag": "Show",
"ToolTip": "Eintrag \"Auf Gerät übertragen\" im Kontextmenü von Mediendateien und Ordnern anzeigen (Standardeinstellung)."
}
}
},
{
"Region": "Context menu",
"Function": "EditWithClipchampContext",
@ -1903,34 +1903,6 @@
}
}
},
{
"Region": "Context menu",
"Function": "IncludeInLibraryContext",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Eintrag \"In Bibliothek einbeziehen\" im Kontextmenü von Ordnern und Laufwerken ausblenden."
},
"One": {
"Tag": "Show",
"ToolTip": "Eintrag \"In Bibliothek einbeziehen\" im Kontextmenü von Ordnern und Laufwerken anzeigen (Standardeinstellung)."
}
}
},
{
"Region": "Context menu",
"Function": "SendToContext",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Eintrag \"Senden an\" aus dem Ordner-Kontextmenü ausblenden."
},
"One": {
"Tag": "Show",
"ToolTip": "Eintrag \"Senden an\" aus dem Ordner-Kontextmenü anzeigen (Standardeinstellung)."
}
}
},
{
"Region": "Context menu",
"Function": "CompressedFolderNewContext",

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

@ -1659,6 +1659,20 @@
}
}
},
{
"Region": "Microsoft Defender & Security",
"Function": "DefenderSandbox",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Enable sandboxing for Microsoft Defender."
},
"One": {
"Tag": "Disable",
"ToolTip": "Disable sandboxing for Microsoft Defender (default value)."
}
}
},
{
"Region": "Microsoft Defender & Security",
"Function": "DismissMSAccount",
@ -1861,20 +1875,6 @@
}
}
},
{
"Region": "Context menu",
"Function": "CastToDeviceContext",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Hide the \"Cast to Device\" item from the media files and folders context menu."
},
"One": {
"Tag": "Show",
"ToolTip": "Show the \"Cast to Device\" item in the media files and folders context menu (default value)."
}
}
},
{
"Region": "Context menu",
"Function": "EditWithClipchampContext",
@ -1903,34 +1903,6 @@
}
}
},
{
"Region": "Context menu",
"Function": "IncludeInLibraryContext",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Hide the \"Include in Library\" item from the folders and drives context menu."
},
"One": {
"Tag": "Show",
"ToolTip": "Show the \"Include in Library\" item in the folders and drives context menu (default value)."
}
}
},
{
"Region": "Context menu",
"Function": "SendToContext",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Hide the \"Send to\" item from the folders context menu."
},
"One": {
"Tag": "Show",
"ToolTip": "Show the \"Send to\" item in the folders context menu (default value)."
}
}
},
{
"Region": "Context menu",
"Function": "CompressedFolderNewContext",

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

@ -1659,6 +1659,20 @@
}
}
},
{
"Region": "Microsoft Defender & Security",
"Function": "DefenderSandbox",
"Arg": {
"Zero": {
"Tag": "Enable",
"ToolTip": "Включить песочницу для Microsoft Defender."
},
"One": {
"Tag": "Disable",
"ToolTip": "Выключить песочницу для Microsoft Defender (значение по умолчанию)."
}
}
},
{
"Region": "Microsoft Defender & Security",
"Function": "DismissMSAccount",
@ -1861,20 +1875,6 @@
}
}
},
{
"Region": "Context menu",
"Function": "CastToDeviceContext",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Скрыть пункт \"Передать на устройство\" из контекстного меню медиа-файлов и папок."
},
"One": {
"Tag": "Show",
"ToolTip": "Отобразить пункт \"Передать на устройство\" в контекстном меню медиа-файлов и папок (значение по умолчанию)."
}
}
},
{
"Region": "Context menu",
"Function": "EditWithClipchampContext",
@ -1903,34 +1903,6 @@
}
}
},
{
"Region": "Context menu",
"Function": "IncludeInLibraryContext",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Скрыть пункт \"Добавить в библиотеку\" из контекстного меню папок и дисков."
},
"One": {
"Tag": "Show",
"ToolTip": "Отобразить пункт \"Добавить в библиотеку\" в контекстном меню папок и дисков (значение по умолчанию)."
}
}
},
{
"Region": "Context menu",
"Function": "SendToContext",
"Arg": {
"Zero": {
"Tag": "Hide",
"ToolTip": "Скрыть пункт \"Отправить\" из контекстного меню папок."
},
"One": {
"Tag": "Show",
"ToolTip": "Отобразить пункт \"Отправить\" в контекстном меню папок (значение по умолчанию)."
}
}
},
{
"Region": "Context menu",
"Function": "CompressedFolderNewContext",

12
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -1242,7 +1242,7 @@ function DiagnosticDataLevel
{
"Minimal"
{
if (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -like "Enterprise*") -or ($_.Edition -eq "Education")})
if (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Enterprise") -or ($_.Edition -eq "Education")})
{
# Security level
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -PropertyType DWord -Value 0 -Force
@ -11474,7 +11474,10 @@ function UninstallUWPApps
"Microsoft.OutlookForWindows",
# Chat (Microsoft Teams)
"MicrosoftTeams"
"MicrosoftTeams",
# Microsoft Copilot
"Microsoft.Windows.Ai.CoPilot.Provider"
)
foreach ($Package in $Packages)
{
@ -13754,9 +13757,6 @@ function PUAppsDetection
.EXAMPLE
DefenderSandbox -Disable
.NOTES
There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows
.NOTES
Machine-wide
#>
@ -14339,7 +14339,7 @@ function WindowsSandbox
$Enable
)
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*")}))
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -eq "Enterprise") -or ($_.Edition -eq "Education")}))
{
return
}

9
src/Sophia_Script_for_Windows_10/Sophia.ps1

@ -1244,13 +1244,8 @@ PUAppsDetection -Enable
# Выключить обнаружение потенциально нежелательных приложений и блокировать их (значение по умолчанию)
# PUAppsDetection -Disable
<#
Enable sandboxing for Microsoft Defender
There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows
Включить песочницу для Microsoft Defender
В KVM с QEMU присутствует баг: включение этой функции приводит ВМ к зависанию во время загрузки Windows
#>
# Enable sandboxing for Microsoft Defender
# Включить песочницу для Microsoft Defender
DefenderSandbox -Enable
# Disable sandboxing for Microsoft Defender (default value)

8
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -10365,9 +10365,6 @@ function PUAppsDetection
.EXAMPLE
DefenderSandbox -Disable
.NOTES
There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows
.NOTES
Machine-wide
#>
@ -10950,11 +10947,6 @@ function WindowsSandbox
$Enable
)
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*")}))
{
return
}
switch ($PSCmdlet.ParameterSetName)
{
"Disable"

9
src/Sophia_Script_for_Windows_10_LTSC_2019/Sophia.ps1

@ -912,13 +912,8 @@ PUAppsDetection -Enable
# Выключить обнаружение потенциально нежелательных приложений и блокировать их (значение по умолчанию)
# PUAppsDetection -Disable
<#
Enable sandboxing for Microsoft Defender
There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows
Включить песочницу для Microsoft Defender
В KVM с QEMU присутствует баг: включение этой функции приводит ВМ к зависанию во время загрузки Windows
#>
# Enable sandboxing for Microsoft Defender
# Включить песочницу для Microsoft Defender
DefenderSandbox -Enable
# Disable sandboxing for Microsoft Defender (default value)

8
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -11496,9 +11496,6 @@ function PUAppsDetection
.EXAMPLE
DefenderSandbox -Disable
.NOTES
There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows
.NOTES
Machine-wide
#>
@ -12081,11 +12078,6 @@ function WindowsSandbox
$Enable
)
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*")}))
{
return
}
switch ($PSCmdlet.ParameterSetName)
{
"Disable"

9
src/Sophia_Script_for_Windows_10_LTSC_2021/Sophia.ps1

@ -1051,13 +1051,8 @@ PUAppsDetection -Enable
# Выключить обнаружение потенциально нежелательных приложений и блокировать их (значение по умолчанию)
# PUAppsDetection -Disable
<#
Enable sandboxing for Microsoft Defender
There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows
Включить песочницу для Microsoft Defender
В KVM с QEMU присутствует баг: включение этой функции приводит ВМ к зависанию во время загрузки Windows
#>
# Enable sandboxing for Microsoft Defender
# Включить песочницу для Microsoft Defender
DefenderSandbox -Enable
# Disable sandboxing for Microsoft Defender (default value)

12
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -1248,7 +1248,7 @@ function DiagnosticDataLevel
{
"Minimal"
{
if (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -like "Enterprise*") -or ($_.Edition -eq "Education")})
if (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Enterprise") -or ($_.Edition -eq "Education")})
{
# Security level
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -PropertyType DWord -Value 0 -Force
@ -11490,7 +11490,10 @@ function UninstallUWPApps
"Microsoft.OutlookForWindows",
# Chat (Microsoft Teams)
"MicrosoftTeams"
"MicrosoftTeams",
# Microsoft Copilot
"Microsoft.Windows.Ai.CoPilot.Provider"
)
foreach ($Package in $Packages)
{
@ -13780,9 +13783,6 @@ function PUAppsDetection
.EXAMPLE
DefenderSandbox -Disable
.NOTES
There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows
.NOTES
Machine-wide
#>
@ -14365,7 +14365,7 @@ function WindowsSandbox
$Enable
)
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*")}))
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -eq "Enterprise")}))
{
return
}

9
src/Sophia_Script_for_Windows_10_PowerShell_7/Sophia.ps1

@ -1253,13 +1253,8 @@ PUAppsDetection -Enable
# Выключить обнаружение потенциально нежелательных приложений и блокировать их (значение по умолчанию)
# PUAppsDetection -Disable
<#
Enable sandboxing for Microsoft Defender
There is a bug in KVM with QEMU: enabling this function causes VM to freeze up during the loading phase of Windows
Включить песочницу для Microsoft Defender
В KVM с QEMU присутствует баг: включение этой функции приводит ВМ к зависанию во время загрузки Windows
#>
# Enable sandboxing for Microsoft Defender
# Включить песочницу для Microsoft Defender
DefenderSandbox -Enable
# Disable sandboxing for Microsoft Defender (default value)

283
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -1218,7 +1218,7 @@ function DiagnosticDataLevel
{
"Minimal"
{
if (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -like "Enterprise*") -or ($_.Edition -eq "Education")})
if (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Enterprise") -or ($_.Edition -eq "Education")})
{
# Diagnostic data off
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -PropertyType DWord -Value 0 -Force
@ -4651,10 +4651,11 @@ function OneDrive
# The system does not move the file until the operating system is restarted
# The system moves the file immediately after AUTOCHK is executed, but before creating any paging files
$Script:Signature = @{
Namespace = "WinAPI"
Name = "DeleteFiles"
Language = "CSharp"
MemberDefinition = @"
Namespace = "WinAPI"
Name = "DeleteFiles"
Language = "CSharp"
CompilerParameters = $CompilerParameters
MemberDefinition = @"
public enum MoveFileFlags
{
MOVEFILE_DELAY_UNTIL_REBOOT = 0x00000004
@ -7040,7 +7041,7 @@ function Set-UserShellFolderLocation
)
$KnownFolders = @{
"Desktop" = @("B4BFCC3A-DB2C-424C-B029-7FE99A87C641");
"Desktop" = @("B4BFCC3A-DB2C-424C-B029-7FE99A87C641")
"Documents" = @("FDD39AD0-238F-46AF-ADB4-6C85480369C7", "f42ee2d3-909f-4907-8871-4c22fc0bf756")
"Downloads" = @("374DE290-123F-4565-9164-39C4925E467B", "7d83ee9b-2244-4e70-b1f5-5404642af1e4")
"Music" = @("4BD8D571-6D19-48D3-BE97-422220080E43", "a0c69a99-21c8-4671-8703-7934162fcf1d")
@ -13005,6 +13006,60 @@ function PUAppsDetection
}
}
<#
.SYNOPSIS
Sandboxing for Microsoft Defender
.PARAMETER Enable
Enable sandboxing for Microsoft Defender
.PARAMETER Disable
Disable sandboxing for Microsoft Defender
.EXAMPLE
DefenderSandbox -Enable
.EXAMPLE
DefenderSandbox -Disable
.NOTES
Machine-wide
#>
function DefenderSandbox
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable
)
if ($Script:DefenderEnabled)
{
switch ($PSCmdlet.ParameterSetName)
{
"Enable"
{
setx /M MP_FORCE_USE_SANDBOX 1
}
"Disable"
{
setx /M MP_FORCE_USE_SANDBOX 0
}
}
}
}
# Dismiss Microsoft Defender offer in the Windows Security about signing in Microsoft account
function DismissMSAccount
{
@ -13549,7 +13604,7 @@ function WindowsSandbox
$Enable
)
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*")}))
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -eq "Enterprise") -or ($_.Edition -eq "Education")}))
{
return
}
@ -13973,63 +14028,6 @@ function CABInstallContext
}
}
<#
.SYNOPSIS
The "Cast to Device" item in the media files and folders context menu
.PARAMETER Hide
Hide the "Cast to Device" item from the media files and folders context menu
.PARAMETER Show
Show the "Cast to Device" item in the media files and folders context menu
.EXAMPLE
CastToDeviceContext -Hide
.EXAMPLE
CastToDeviceContext -Show
.NOTES
Current user
#>
function CastToDeviceContext
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Hide"
)]
[switch]
$Hide,
[Parameter(
Mandatory = $true,
ParameterSetName = "Show"
)]
[switch]
$Show
)
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{7AD84985-87B4-4a16-BE58-8B72A5B390F7}" -Force -ErrorAction Ignore
switch ($PSCmdlet.ParameterSetName)
{
"Hide"
{
if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked"))
{
New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Force
}
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{7AD84985-87B4-4a16-BE58-8B72A5B390F7}" -PropertyType String -Value "" -Force
}
"Show"
{
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{7AD84985-87B4-4a16-BE58-8B72A5B390F7}" -Force -ErrorAction Ignore
}
}
}
<#
.SYNOPSIS
The "Edit with Clipchamp" item in the media files context menu
@ -14145,108 +14143,6 @@ function PrintCMDContext
}
}
<#
.SYNOPSIS
The "Include in Library" item in the folders and drives context menu
.PARAMETER Hide
Hide the "Include in Library" item from the folders and drives context menu
.PARAMETER Show
Show the "Include in Library" item in the folders and drives context menu
.EXAMPLE
IncludeInLibraryContext -Hide
.EXAMPLE
IncludeInLibraryContext -Show
.NOTES
Current user
#>
function IncludeInLibraryContext
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Hide"
)]
[switch]
$Hide,
[Parameter(
Mandatory = $true,
ParameterSetName = "Show"
)]
[switch]
$Show
)
switch ($PSCmdlet.ParameterSetName)
{
"Hide"
{
New-ItemProperty -Path "Registry::HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Library Location" -Name "(default)" -PropertyType String -Value "-{3dad6c5d-2167-4cae-9914-f99e41c12cfa}" -Force
}
"Show"
{
New-ItemProperty -Path "Registry::HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Library Location" -Name "(default)" -PropertyType String -Value "{3dad6c5d-2167-4cae-9914-f99e41c12cfa}" -Force
}
}
}
<#
.SYNOPSIS
The "Send to" item in the folders context menu
.PARAMETER Hide
Hide the "Send to" item from the folders context menu
.PARAMETER Show
Show the "Send to" item in the folders context menu
.EXAMPLE
SendToContext -Hide
.EXAMPLE
SendToContext -Show
.NOTES
Current user
#>
function SendToContext
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Hide"
)]
[switch]
$Hide,
[Parameter(
Mandatory = $true,
ParameterSetName = "Show"
)]
[switch]
$Show
)
switch ($PSCmdlet.ParameterSetName)
{
"Hide"
{
New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\SendTo -Name "(default)" -PropertyType String -Value "-{7BA4C740-9E81-11CF-99D3-00AA004AE837}" -Force
}
"Show"
{
New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\SendTo -Name "(default)" -PropertyType String -Value "{7BA4C740-9E81-11CF-99D3-00AA004AE837}" -Force
}
}
}
<#
.SYNOPSIS
The "Compressed (zipped) Folder" item in the "New" context menu
@ -14572,61 +14468,6 @@ function OpenWindowsTerminalAdminContext
# Save in UTF-8 with BOM despite JSON must not has the BOM: https://datatracker.ietf.org/doc/html/rfc8259#section-8.1. Unless Terminal profile names which contains non-Latin characters will have "?" instead of titles
ConvertTo-Json -InputObject $Terminal -Depth 4 | Set-Content -Path "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" -Encoding UTF8 -Force
}
<#
.SYNOPSIS
The "Show more options" in the context menu
.PARAMETER Enable
Enable the Windows 10 context menu style
.PARAMETER Disable
Disable the Windows 10 context menu style
.EXAMPLE
Windows10ContextMenu -Enable
.EXAMPLE
Windows10ContextMenu -Disable
.NOTES
Current user
#>
function Windows10ContextMenu
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable
)
switch ($PSCmdlet.ParameterSetName)
{
"Disable"
{
Remove-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" -Recurse -Force -ErrorAction Ignore
}
"Enable"
{
if (-not (Test-Path -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32"))
{
New-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" -ItemType Directory -Force
}
New-ItemProperty -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" -Name "(default)" -PropertyType String -Value "" -Force
}
}
}
#endregion Context menu
#region Update Policies

32
src/Sophia_Script_for_Windows_11/Sophia.ps1

@ -1186,6 +1186,14 @@ PUAppsDetection -Enable
# Выключить обнаружение потенциально нежелательных приложений и блокировать их (значение по умолчанию)
# PUAppsDetection -Disable
# Enable sandboxing for Microsoft Defender
# Включить песочницу для Microsoft Defender
DefenderSandbox -Enable
# Disable sandboxing for Microsoft Defender (default value)
# Выключить песочницу для Microsoft Defender (значение по умолчанию)
# DefenderSandbox -Disable
# Dismiss Microsoft Defender offer in the Windows Security about signing in Microsoft account
# Отклонить предложение Microsoft Defender в "Безопасность Windows" о входе в аккаунт Microsoft
DismissMSAccount
@ -1319,14 +1327,6 @@ CABInstallContext -Show
# Скрыть пункт "Установить" из контекстного меню .cab архивов (значение по умолчанию)
# CABInstallContext -Hide
# Hide the "Cast to Device" item from the media files and folders context menu
# Скрыть пункт "Передать на устройство" из контекстного меню медиа-файлов и папок
CastToDeviceContext -Hide
# Show the "Cast to Device" item in the media files and folders context menu (default value)
# Отобразить пункт "Передать на устройство" в контекстном меню медиа-файлов и папок (значение по умолчанию)
# CastToDeviceContext -Show
# Hide the "Edit with Clipchamp" item from the media files context menu
# Скрыть пункт "Редактировать в Climpchamp" из контекстного меню
EditWithClipchampContext -Hide
@ -1343,22 +1343,6 @@ PrintCMDContext -Hide
# Отобразить пункт "Печать" в контекстном меню .bat и .cmd файлов (значение по умолчанию)
# PrintCMDContext -Show
# Hide the "Include in Library" item from the folders and drives context menu
# Скрыть пункт "Добавить в библиотеку" из контекстного меню папок и дисков
IncludeInLibraryContext -Hide
# Show the "Include in Library" item in the folders and drives context menu (default value)
# Отобразить пункт "Добавить в библиотеку" в контекстном меню папок и дисков (значение по умолчанию)
# IncludeInLibraryContext -Show
# Hide the "Send to" item from the folders context menu
# Скрыть пункт "Отправить" из контекстного меню папок
SendToContext -Hide
# Show the "Send to" item in the folders context menu (default value)
# Отобразить пункт "Отправить" в контекстном меню папок (значение по умолчанию)
# SendToContext -Show
# Hide the "Compressed (zipped) Folder" item from the "New" context menu
# Скрыть пункт "Сжатая ZIP-папка" из контекстного меню "Создать"
CompressedFolderNewContext -Hide

218
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -1221,7 +1221,7 @@ function DiagnosticDataLevel
{
"Minimal"
{
if (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -like "Enterprise*") -or ($_.Edition -eq "Education")})
if (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Enterprise") -or ($_.Edition -eq "Education")})
{
# Diagnostic data off
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -PropertyType DWord -Value 0 -Force
@ -13573,7 +13573,7 @@ function WindowsSandbox
$Enable
)
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -like "Enterprise*")}))
if (-not (Get-WindowsEdition -Online | Where-Object -FilterScript {($_.Edition -eq "Professional") -or ($_.Edition -eq "Enterprise")}))
{
return
}
@ -13997,63 +13997,6 @@ function CABInstallContext
}
}
<#
.SYNOPSIS
The "Cast to Device" item in the media files and folders context menu
.PARAMETER Hide
Hide the "Cast to Device" item from the media files and folders context menu
.PARAMETER Show
Show the "Cast to Device" item in the media files and folders context menu
.EXAMPLE
CastToDeviceContext -Hide
.EXAMPLE
CastToDeviceContext -Show
.NOTES
Current user
#>
function CastToDeviceContext
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Hide"
)]
[switch]
$Hide,
[Parameter(
Mandatory = $true,
ParameterSetName = "Show"
)]
[switch]
$Show
)
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{7AD84985-87B4-4a16-BE58-8B72A5B390F7}" -Force -ErrorAction Ignore
switch ($PSCmdlet.ParameterSetName)
{
"Hide"
{
if (-not (Test-Path -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked"))
{
New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Force
}
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{7AD84985-87B4-4a16-BE58-8B72A5B390F7}" -PropertyType String -Value "" -Force
}
"Show"
{
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{7AD84985-87B4-4a16-BE58-8B72A5B390F7}" -Force -ErrorAction Ignore
}
}
}
<#
.SYNOPSIS
The "Edit with Clipchamp" item in the media files context menu
@ -14169,108 +14112,6 @@ function PrintCMDContext
}
}
<#
.SYNOPSIS
The "Include in Library" item in the folders and drives context menu
.PARAMETER Hide
Hide the "Include in Library" item from the folders and drives context menu
.PARAMETER Show
Show the "Include in Library" item in the folders and drives context menu
.EXAMPLE
IncludeInLibraryContext -Hide
.EXAMPLE
IncludeInLibraryContext -Show
.NOTES
Current user
#>
function IncludeInLibraryContext
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Hide"
)]
[switch]
$Hide,
[Parameter(
Mandatory = $true,
ParameterSetName = "Show"
)]
[switch]
$Show
)
switch ($PSCmdlet.ParameterSetName)
{
"Hide"
{
New-ItemProperty -Path "Registry::HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Library Location" -Name "(default)" -PropertyType String -Value "-{3dad6c5d-2167-4cae-9914-f99e41c12cfa}" -Force
}
"Show"
{
New-ItemProperty -Path "Registry::HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Library Location" -Name "(default)" -PropertyType String -Value "{3dad6c5d-2167-4cae-9914-f99e41c12cfa}" -Force
}
}
}
<#
.SYNOPSIS
The "Send to" item in the folders context menu
.PARAMETER Hide
Hide the "Send to" item from the folders context menu
.PARAMETER Show
Show the "Send to" item in the folders context menu
.EXAMPLE
SendToContext -Hide
.EXAMPLE
SendToContext -Show
.NOTES
Current user
#>
function SendToContext
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Hide"
)]
[switch]
$Hide,
[Parameter(
Mandatory = $true,
ParameterSetName = "Show"
)]
[switch]
$Show
)
switch ($PSCmdlet.ParameterSetName)
{
"Hide"
{
New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\SendTo -Name "(default)" -PropertyType String -Value "-{7BA4C740-9E81-11CF-99D3-00AA004AE837}" -Force
}
"Show"
{
New-ItemProperty -Path Registry::HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\SendTo -Name "(default)" -PropertyType String -Value "{7BA4C740-9E81-11CF-99D3-00AA004AE837}" -Force
}
}
}
<#
.SYNOPSIS
The "Compressed (zipped) Folder" item in the "New" context menu
@ -14596,61 +14437,6 @@ function OpenWindowsTerminalAdminContext
# Save in UTF-8 with BOM despite JSON must not has the BOM: https://datatracker.ietf.org/doc/html/rfc8259#section-8.1. Unless Terminal profile names which contains non-Latin characters will have "?" instead of titles
ConvertTo-Json -InputObject $Terminal -Depth 4 | Set-Content -Path "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" -Encoding UTF8 -Force
}
<#
.SYNOPSIS
The "Show more options" in the context menu
.PARAMETER Enable
Enable the Windows 10 context menu style
.PARAMETER Disable
Disable the Windows 10 context menu style
.EXAMPLE
Windows10ContextMenu -Enable
.EXAMPLE
Windows10ContextMenu -Disable
.NOTES
Current user
#>
function Windows10ContextMenu
{
param
(
[Parameter(
Mandatory = $true,
ParameterSetName = "Disable"
)]
[switch]
$Disable,
[Parameter(
Mandatory = $true,
ParameterSetName = "Enable"
)]
[switch]
$Enable
)
switch ($PSCmdlet.ParameterSetName)
{
"Disable"
{
Remove-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" -Recurse -Force -ErrorAction Ignore
}
"Enable"
{
if (-not (Test-Path -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32"))
{
New-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" -ItemType Directory -Force
}
New-ItemProperty -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" -Name "(default)" -PropertyType String -Value "" -Force
}
}
}
#endregion Context menu
#region Update Policies

32
src/Sophia_Script_for_Windows_11_PowerShell_7/Sophia.ps1

@ -1197,6 +1197,14 @@ PUAppsDetection -Enable
# Выключить обнаружение потенциально нежелательных приложений и блокировать их (значение по умолчанию)
# PUAppsDetection -Disable
# Enable sandboxing for Microsoft Defender
# Включить песочницу для Microsoft Defender
DefenderSandbox -Enable
# Disable sandboxing for Microsoft Defender (default value)
# Выключить песочницу для Microsoft Defender (значение по умолчанию)
# DefenderSandbox -Disable
# Dismiss Microsoft Defender offer in the Windows Security about signing in Microsoft account
# Отклонить предложение Microsoft Defender в "Безопасность Windows" о входе в аккаунт Microsoft
DismissMSAccount
@ -1330,14 +1338,6 @@ CABInstallContext -Show
# Скрыть пункт "Установить" из контекстного меню .cab архивов (значение по умолчанию)
# CABInstallContext -Hide
# Hide the "Cast to Device" item from the media files and folders context menu
# Скрыть пункт "Передать на устройство" из контекстного меню медиа-файлов и папок
CastToDeviceContext -Hide
# Show the "Cast to Device" item in the media files and folders context menu (default value)
# Отобразить пункт "Передать на устройство" в контекстном меню медиа-файлов и папок (значение по умолчанию)
# CastToDeviceContext -Show
# Hide the "Edit with Clipchamp" item from the media files context menu
# Скрыть пункт "Редактировать в Climpchamp" из контекстного меню
EditWithClipchampContext -Hide
@ -1354,22 +1354,6 @@ PrintCMDContext -Hide
# Отобразить пункт "Печать" в контекстном меню .bat и .cmd файлов (значение по умолчанию)
# PrintCMDContext -Show
# Hide the "Include in Library" item from the folders and drives context menu
# Скрыть пункт "Добавить в библиотеку" из контекстного меню папок и дисков
IncludeInLibraryContext -Hide
# Show the "Include in Library" item in the folders and drives context menu (default value)
# Отобразить пункт "Добавить в библиотеку" в контекстном меню папок и дисков (значение по умолчанию)
# IncludeInLibraryContext -Show
# Hide the "Send to" item from the folders context menu
# Скрыть пункт "Отправить" из контекстного меню папок
SendToContext -Hide
# Show the "Send to" item in the folders context menu (default value)
# Отобразить пункт "Отправить" в контекстном меню папок (значение по умолчанию)
# SendToContext -Show
# Hide the "Compressed (zipped) Folder" item from the "New" context menu
# Скрыть пункт "Сжатая ZIP-папка" из контекстного меню "Создать"
CompressedFolderNewContext -Hide

Loading…
Cancel
Save