Browse Source

Improved BitLocker check output

pull/712/head
Dmitry Nefedov 2 months ago
parent
commit
3e129db5d3
  1. 1
      README.md
  2. 35
      src/Sophia_Script_for_Windows_10/Module/Private/InitialActions.ps1
  3. 35
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Private/InitialActions.ps1
  4. 36
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Private/InitialActions.ps1
  5. 35
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Private/InitialActions.ps1
  6. 31
      src/Sophia_Script_for_Windows_11/Module/Private/InitialActions.ps1
  7. 8
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  8. 35
      src/Sophia_Script_for_Windows_11_ARM/Module/Private/InitialActions.ps1
  9. 8
      src/Sophia_Script_for_Windows_11_ARM/Module/Sophia.psm1
  10. 35
      src/Sophia_Script_for_Windows_11_ARM_PowerShell_7/Module/Private/InitialActions.ps1
  11. 8
      src/Sophia_Script_for_Windows_11_ARM_PowerShell_7/Module/Sophia.psm1
  12. 35
      src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Private/InitialActions.ps1
  13. 8
      src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1
  14. 35
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Private/InitialActions.ps1
  15. 8
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

1
README.md

@ -57,6 +57,7 @@ Made with <img src="./img/heart.svg" height="17px"/> of Windows
## Key features ## Key features
* Sophia Script for Windows cares about
* More than 150 unique functions to configure Windows using Microsoft's officially documented ways without making any harm to it * More than 150 unique functions to configure Windows using Microsoft's officially documented ways without making any harm to it
* Every tweak has its corresponding function to restore default settings * Every tweak has its corresponding function to restore default settings
* Configure Windows AI * Configure Windows AI

35
src/Sophia_Script_for_Windows_10/Module/Private/InitialActions.ps1

@ -652,13 +652,14 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
} }
# Checking whether BitLocker encryption or decryption in process # Checking whether BitLocker encryption or decryption in process
if (Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}) $BitLocker = Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}
if ($BitLocker)
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message $Localization.BitLockerInOperation Write-Warning -Message ($Localization.BitLockerInOperation -f $BitLocker.EncryptionPercentage)
Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose
Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")} $BitLocker
# Open if Windows edition is not Home # Open if Windows edition is not Home
if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core") if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core")
@ -689,7 +690,21 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
{ {
$Yes $Yes
{ {
Disable-BitLocker -MountPoint $env:SystemDrive try
{
Disable-BitLocker -MountPoint $env:SystemDrive -ErrorAction Stop
}
catch
{
Write-Warning -Message $Localization.RebootPending
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true
exit
}
} }
$No $No
{ {
@ -755,6 +770,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for updates # Check for updates
& "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan & "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -785,6 +803,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -822,6 +843,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -875,6 +899,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit

35
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Private/InitialActions.ps1

@ -652,13 +652,14 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
} }
# Checking whether BitLocker encryption or decryption in process # Checking whether BitLocker encryption or decryption in process
if (Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}) $BitLocker = Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}
if ($BitLocker)
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message $Localization.BitLockerInOperation Write-Warning -Message ($Localization.BitLockerInOperation -f $BitLocker.EncryptionPercentage)
Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose
Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")} $BitLocker
# Open if Windows edition is not Home # Open if Windows edition is not Home
if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core") if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core")
@ -689,7 +690,21 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
{ {
$Yes $Yes
{ {
Disable-BitLocker -MountPoint $env:SystemDrive try
{
Disable-BitLocker -MountPoint $env:SystemDrive -ErrorAction Stop
}
catch
{
Write-Warning -Message $Localization.RebootPending
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true
exit
}
} }
$No $No
{ {
@ -756,6 +771,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for updates # Check for updates
& "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan & "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -786,6 +804,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -820,6 +841,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -870,6 +894,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit

36
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Private/InitialActions.ps1

@ -603,6 +603,7 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
# Defender is a default AV # Defender is a default AV
$Global:DefenderDefaultAV = $true $Global:DefenderDefaultAV = $true
} }
# Check whether Controlled Folder Access is enabled # Check whether Controlled Folder Access is enabled
if ((Get-MpPreference).EnableControlledFolderAccess -eq 1) if ((Get-MpPreference).EnableControlledFolderAccess -eq 1)
{ {
@ -651,13 +652,14 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
} }
# Checking whether BitLocker encryption or decryption in process # Checking whether BitLocker encryption or decryption in process
if (Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}) $BitLocker = Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}
if ($BitLocker)
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message $Localization.BitLockerInOperation Write-Warning -Message ($Localization.BitLockerInOperation -f $BitLocker.EncryptionPercentage)
Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose
Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")} $BitLocker
# Open if Windows edition is not Home # Open if Windows edition is not Home
if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core") if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core")
@ -688,7 +690,21 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
{ {
$Yes $Yes
{ {
Disable-BitLocker -MountPoint $env:SystemDrive try
{
Disable-BitLocker -MountPoint $env:SystemDrive -ErrorAction Stop
}
catch
{
Write-Warning -Message $Localization.RebootPending
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true
exit
}
} }
$No $No
{ {
@ -755,6 +771,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for updates # Check for updates
& "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan & "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -785,6 +804,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -819,6 +841,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -869,6 +894,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit

35
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Private/InitialActions.ps1

@ -690,13 +690,14 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
} }
# Checking whether BitLocker encryption or decryption in process # Checking whether BitLocker encryption or decryption in process
if (Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}) $BitLocker = Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}
if ($BitLocker)
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message $Localization.BitLockerInOperation Write-Warning -Message ($Localization.BitLockerInOperation -f $BitLocker.EncryptionPercentage)
Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose
Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")} $BitLocker
# Open if Windows edition is not Home # Open if Windows edition is not Home
if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core") if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core")
@ -727,7 +728,21 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
{ {
$Yes $Yes
{ {
Disable-BitLocker -MountPoint $env:SystemDrive try
{
Disable-BitLocker -MountPoint $env:SystemDrive -ErrorAction Stop
}
catch
{
Write-Warning -Message $Localization.RebootPending
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true
exit
}
} }
$No $No
{ {
@ -793,6 +808,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for updates # Check for updates
& "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan & "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -823,6 +841,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -860,6 +881,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -913,6 +937,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit

31
src/Sophia_Script_for_Windows_11/Module/Private/InitialActions.ps1

@ -659,8 +659,7 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
if ($BitLocker) if ($BitLocker)
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
$EncryptionPercentage = $BitLocker.EncryptionPercentage Write-Warning -Message ($Localization.BitLockerInOperation -f $BitLocker.EncryptionPercentage)
Write-Warning -Message ($Localization.BitLockerInOperation -f $EncryptionPercentage)
Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose
$BitLocker $BitLocker
@ -694,7 +693,21 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
{ {
$Yes $Yes
{ {
Disable-BitLocker -MountPoint $env:SystemDrive try
{
Disable-BitLocker -MountPoint $env:SystemDrive -ErrorAction Stop
}
catch
{
Write-Warning -Message $Localization.RebootPending
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true
exit
}
} }
$No $No
{ {
@ -760,6 +773,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for updates # Check for updates
& "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan & "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -790,6 +806,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -827,6 +846,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -880,6 +902,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit

8
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -10798,7 +10798,7 @@ function WindowsSandbox
.PARAMETER ComssOne .PARAMETER ComssOne
Enable DNS-over-HTTPS using Comss.one DNS Enable DNS-over-HTTPS using Comss.one DNS
.PARAMETER .PARAMETER AdGuard
Enable DNS-over-HTTPS using AdGuard DNS Enable DNS-over-HTTPS using AdGuard DNS
.PARAMETER Disable .PARAMETER Disable
@ -10939,9 +10939,9 @@ function DNSoverHTTPS
# https://adguard-dns.io/public-dns.html # https://adguard-dns.io/public-dns.html
"AdGuard" "AdGuard"
{ {
$PrimaryDNS = "94.140.14.140" $PrimaryDNS = "94.140.14.14"
$SecondaryDNS = "94.140.15.16" $SecondaryDNS = "94.140.14.15"
$Query = "https://unfiltered.adguard-dns.com/dns-query" $Query = "https://dns.adguard-dns.com/dns-query"
} }
} }

35
src/Sophia_Script_for_Windows_11_ARM/Module/Private/InitialActions.ps1

@ -655,13 +655,14 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
} }
# Checking whether BitLocker encryption or decryption in process # Checking whether BitLocker encryption or decryption in process
if (Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}) $BitLocker = Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}
if ($BitLocker)
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message $Localization.BitLockerInOperation Write-Warning -Message ($Localization.BitLockerInOperation -f $BitLocker.EncryptionPercentage)
Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose
Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")} $BitLocker
# Open if Windows edition is not Home # Open if Windows edition is not Home
if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core") if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core")
@ -692,7 +693,21 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
{ {
$Yes $Yes
{ {
Disable-BitLocker -MountPoint $env:SystemDrive try
{
Disable-BitLocker -MountPoint $env:SystemDrive -ErrorAction Stop
}
catch
{
Write-Warning -Message $Localization.RebootPending
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true
exit
}
} }
$No $No
{ {
@ -758,6 +773,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for updates # Check for updates
& "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan & "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -788,6 +806,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -825,6 +846,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -878,6 +902,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit

8
src/Sophia_Script_for_Windows_11_ARM/Module/Sophia.psm1

@ -10684,7 +10684,7 @@ function WindowsSandbox
.PARAMETER ComssOne .PARAMETER ComssOne
Enable DNS-over-HTTPS using Comss.one DNS Enable DNS-over-HTTPS using Comss.one DNS
.PARAMETER .PARAMETER AdGuard
Enable DNS-over-HTTPS using AdGuard DNS Enable DNS-over-HTTPS using AdGuard DNS
.PARAMETER Disable .PARAMETER Disable
@ -10825,9 +10825,9 @@ function DNSoverHTTPS
# https://adguard-dns.io/public-dns.html # https://adguard-dns.io/public-dns.html
"AdGuard" "AdGuard"
{ {
$PrimaryDNS = "94.140.14.140" $PrimaryDNS = "94.140.14.14"
$SecondaryDNS = "94.140.15.16" $SecondaryDNS = "94.140.14.15"
$Query = "https://unfiltered.adguard-dns.com/dns-query" $Query = "https://dns.adguard-dns.com/dns-query"
} }
} }

35
src/Sophia_Script_for_Windows_11_ARM_PowerShell_7/Module/Private/InitialActions.ps1

@ -693,13 +693,14 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
} }
# Checking whether BitLocker encryption or decryption in process # Checking whether BitLocker encryption or decryption in process
if (Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}) $BitLocker = Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}
if ($BitLocker)
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message $Localization.BitLockerInOperation Write-Warning -Message ($Localization.BitLockerInOperation -f $BitLocker.EncryptionPercentage)
Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose
Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")} $BitLocker
# Open if Windows edition is not Home # Open if Windows edition is not Home
if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core") if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core")
@ -730,7 +731,21 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
{ {
$Yes $Yes
{ {
Disable-BitLocker -MountPoint $env:SystemDrive try
{
Disable-BitLocker -MountPoint $env:SystemDrive -ErrorAction Stop
}
catch
{
Write-Warning -Message $Localization.RebootPending
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true
exit
}
} }
$No $No
{ {
@ -796,6 +811,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for updates # Check for updates
& "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan & "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -826,6 +844,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -863,6 +884,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -916,6 +940,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit

8
src/Sophia_Script_for_Windows_11_ARM_PowerShell_7/Module/Sophia.psm1

@ -10696,7 +10696,7 @@ function WindowsSandbox
.PARAMETER ComssOne .PARAMETER ComssOne
Enable DNS-over-HTTPS using Comss.one DNS Enable DNS-over-HTTPS using Comss.one DNS
.PARAMETER .PARAMETER AdGuard
Enable DNS-over-HTTPS using AdGuard DNS Enable DNS-over-HTTPS using AdGuard DNS
.PARAMETER Disable .PARAMETER Disable
@ -10837,9 +10837,9 @@ function DNSoverHTTPS
# https://adguard-dns.io/public-dns.html # https://adguard-dns.io/public-dns.html
"AdGuard" "AdGuard"
{ {
$PrimaryDNS = "94.140.14.140" $PrimaryDNS = "94.140.14.14"
$SecondaryDNS = "94.140.15.16" $SecondaryDNS = "94.140.14.15"
$Query = "https://unfiltered.adguard-dns.com/dns-query" $Query = "https://dns.adguard-dns.com/dns-query"
} }
} }

35
src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Private/InitialActions.ps1

@ -655,13 +655,14 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
} }
# Checking whether BitLocker encryption or decryption in process # Checking whether BitLocker encryption or decryption in process
if (Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}) $BitLocker = Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}
if ($BitLocker)
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message $Localization.BitLockerInOperation Write-Warning -Message ($Localization.BitLockerInOperation -f $BitLocker.EncryptionPercentage)
Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose
Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")} $BitLocker
# Open if Windows edition is not Home # Open if Windows edition is not Home
if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core") if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core")
@ -692,7 +693,21 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
{ {
$Yes $Yes
{ {
Disable-BitLocker -MountPoint $env:SystemDrive try
{
Disable-BitLocker -MountPoint $env:SystemDrive -ErrorAction Stop
}
catch
{
Write-Warning -Message $Localization.RebootPending
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true
exit
}
} }
$No $No
{ {
@ -759,6 +774,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for updates # Check for updates
& "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan & "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -789,6 +807,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -823,6 +844,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -873,6 +897,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit

8
src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1

@ -10114,7 +10114,7 @@ function WindowsSandbox
.PARAMETER ComssOne .PARAMETER ComssOne
Enable DNS-over-HTTPS using Comss.one DNS Enable DNS-over-HTTPS using Comss.one DNS
.PARAMETER .PARAMETER AdGuard
Enable DNS-over-HTTPS using AdGuard DNS Enable DNS-over-HTTPS using AdGuard DNS
.PARAMETER Disable .PARAMETER Disable
@ -10255,9 +10255,9 @@ function DNSoverHTTPS
# https://adguard-dns.io/public-dns.html # https://adguard-dns.io/public-dns.html
"AdGuard" "AdGuard"
{ {
$PrimaryDNS = "94.140.14.140" $PrimaryDNS = "94.140.14.14"
$SecondaryDNS = "94.140.15.16" $SecondaryDNS = "94.140.14.15"
$Query = "https://unfiltered.adguard-dns.com/dns-query" $Query = "https://dns.adguard-dns.com/dns-query"
} }
} }

35
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Private/InitialActions.ps1

@ -693,13 +693,14 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
} }
# Checking whether BitLocker encryption or decryption in process # Checking whether BitLocker encryption or decryption in process
if (Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}) $BitLocker = Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")}
if ($BitLocker)
{ {
Write-Information -MessageData "" -InformationAction Continue Write-Information -MessageData "" -InformationAction Continue
Write-Warning -Message $Localization.BitLockerInOperation Write-Warning -Message ($Localization.BitLockerInOperation -f $BitLocker.EncryptionPercentage)
Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose Write-Verbose -Message "https://www.neowin.net/guides/how-to-remove-bitlocker-drive-encryption-in-windows-11/" -Verbose
Get-BitLockerVolume -MountPoint $env:SystemDrive | Where-Object -FilterScript {$_.VolumeStatus -notin @("FullyEncrypted", "FullyDecrypted")} $BitLocker
# Open if Windows edition is not Home # Open if Windows edition is not Home
if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core") if ((Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID -ne "Core")
@ -730,7 +731,21 @@ public static extern bool SetForegroundWindow(IntPtr hWnd);
{ {
$Yes $Yes
{ {
Disable-BitLocker -MountPoint $env:SystemDrive try
{
Disable-BitLocker -MountPoint $env:SystemDrive -ErrorAction Stop
}
catch
{
Write-Warning -Message $Localization.RebootPending
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true
exit
}
} }
$No $No
{ {
@ -796,6 +811,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for updates # Check for updates
& "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan & "$env:SystemRoot\System32\UsoClient.exe" StartInteractiveScan
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -826,6 +844,9 @@ public extern static string BrandingFormatString(string sFormat);
# Check for UWP apps updates # Check for UWP apps updates
Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod Get-CimInstance -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 -Namespace root/CIMV2/mdm/dmmap | Invoke-CimMethod -MethodName UpdateScanMethod
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -863,6 +884,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit
@ -916,6 +940,9 @@ public extern static string BrandingFormatString(string sFormat);
# Open the "Windows Update" page # Open the "Windows Update" page
Start-Process -FilePath "ms-settings:windowsupdate" Start-Process -FilePath "ms-settings:windowsupdate"
Write-Verbose -Message "https://t.me/sophia_chat" -Verbose
Write-Verbose -Message "https://discord.gg/sSryhaEv79" -Verbose
$Global:Failed = $true $Global:Failed = $true
exit exit

8
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -10810,7 +10810,7 @@ function WindowsSandbox
.PARAMETER ComssOne .PARAMETER ComssOne
Enable DNS-over-HTTPS using Comss.one DNS Enable DNS-over-HTTPS using Comss.one DNS
.PARAMETER .PARAMETER AdGuard
Enable DNS-over-HTTPS using AdGuard DNS Enable DNS-over-HTTPS using AdGuard DNS
.PARAMETER Disable .PARAMETER Disable
@ -10951,9 +10951,9 @@ function DNSoverHTTPS
# https://adguard-dns.io/public-dns.html # https://adguard-dns.io/public-dns.html
"AdGuard" "AdGuard"
{ {
$PrimaryDNS = "94.140.14.140" $PrimaryDNS = "94.140.14.14"
$SecondaryDNS = "94.140.15.16" $SecondaryDNS = "94.140.14.15"
$Query = "https://unfiltered.adguard-dns.com/dns-query" $Query = "https://dns.adguard-dns.com/dns-query"
} }
} }

Loading…
Cancel
Save