Browse Source

Add files via upload

pull/264/head
Dmitry Nefedov 3 years ago
committed by GitHub
parent
commit
87454407ec
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Module/Sophia.psm1
  2. 9
      Sophia Script/Sophia Script for Windows 11 PowerShell 7/Sophia.ps1

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

@ -1504,9 +1504,6 @@ function ThisPC
.EXAMPLE .EXAMPLE
Windows10FileExplorer -Disable Windows10FileExplorer -Disable
.NOTES
Enabling the Windows 10 File Explorer will hide the "Share" item context menu
.NOTES .NOTES
Current user Current user
#> #>
@ -1533,15 +1530,15 @@ function Windows10FileExplorer
{ {
"Enable" "Enable"
{ {
if (-not (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked")) if (-not (Test-Path -Path "HKCU:\Software\Classes\CLSID\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}\InprocServer32"))
{ {
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Force New-Item -Path "HKCU:\Software\Classes\CLSID\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}\InprocServer32" -Force
} }
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{E2BF9676-5F8F-435C-97EB-11607A5BEDF7}" -PropertyType String -Value "" -Force New-ItemProperty -Path "HKCU:\Software\Classes\CLSID\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}\InprocServer32" -Name "(default)" -PropertyType String -Value "" -Force
} }
"Disable" "Disable"
{ {
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{E2BF9676-5F8F-435C-97EB-11607A5BEDF7}" -Force -ErrorAction Ignore Remove-Item -Path "HKCU:\Software\Classes\CLSID\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}" -Recurse -Force -ErrorAction Ignore
} }
} }
} }
@ -10869,7 +10866,7 @@ function DNSoverHTTPS
if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain -eq $false) if ((Get-CimInstance -ClassName CIM_ComputerSystem).PartOfDomain -eq $false)
{ {
# Set the DNS servers # Set the DNS servers
Get-NetAdapter -Physical | Get-NetIPInterface -AddressFamily IPv4 | Get-NetIPConfiguration | Set-DnsClientServerAddress -ServerAddresses $PrimaryDNS, $SecondaryDNS Get-NetAdapter -Physical | Get-NetIPInterface -AddressFamily IPv4 | Set-DnsClientServerAddress -ServerAddresses $PrimaryDNS, $SecondaryDNS
$InterfaceGuid = (Get-NetAdapter -Physical).InterfaceGuid $InterfaceGuid = (Get-NetAdapter -Physical).InterfaceGuid
if (-not (Test-Path -Path "HKLM:\SYSTEM\ControlSet001\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS")) if (-not (Test-Path -Path "HKLM:\SYSTEM\ControlSet001\Services\Dnscache\InterfaceSpecificParameters\$InterfaceGuid\DohInterfaceSettings\Doh\$PrimaryDNS"))

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

@ -260,13 +260,8 @@ ThisPC -Show
# Скрыть "Этот компьютер" на рабочем столе (значение по умолчанию) # Скрыть "Этот компьютер" на рабочем столе (значение по умолчанию)
# ThisPC -Hide # ThisPC -Hide
<# # Enable the Windows 10 File Explorer
Enable the Windows 10 File Explorer # Включить проводник из Windows 10
Enabling the Windows 10 File Explorer will block the "Share" item context menu
Включить проводник из Windows 10
Включение проводника из Windows 10 cкроет пункт "Отправить" (поделиться) из контекстного меню
#>
Windows10FileExplorer -Enable Windows10FileExplorer -Enable
# Disable the Windows 10 File Explorer (default value) # Disable the Windows 10 File Explorer (default value)

Loading…
Cancel
Save