|
|
@ -12,8 +12,8 @@ |
|
|
|
|
|
|
|
.NOTES |
|
|
|
Supported Windows 11 versions |
|
|
|
Version: 22H2/23H2+ |
|
|
|
Builds: 22621.2428+ |
|
|
|
Version: 23H2/23H2+ |
|
|
|
Builds: 22631.2715+ |
|
|
|
Editions: Home/Pro/Enterprise |
|
|
|
|
|
|
|
.LINK GitHub |
|
|
@ -166,8 +166,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
catch [System.Net.WebException] |
|
|
|
{ |
|
|
|
Write-Warning -Message ($Localization.NoResponse -f "https://c2rsetup.officeapps.live.com") |
|
|
|
Write-Error -Message ($Localization.NoResponse -f "https://c2rsetup.officeapps.live.com") -ErrorAction SilentlyContinue |
|
|
|
Write-Warning -Message ($Localization.NoResponse -f "https://edgeupdates.microsoft.com") |
|
|
|
Write-Error -Message ($Localization.NoResponse -f "https://edgeupdates.microsoft.com") -ErrorAction SilentlyContinue |
|
|
|
} |
|
|
|
} |
|
|
|
catch [System.ComponentModel.Win32Exception] |
|
|
@ -180,87 +180,8 @@ public static string GetString(uint strId) |
|
|
|
# Detect the OS build version |
|
|
|
switch ((Get-CimInstance -ClassName CIM_OperatingSystem).BuildNumber) |
|
|
|
{ |
|
|
|
{$_ -lt 22000} |
|
|
|
{$_ -lt 22631} |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.UnsupportedOSBuild |
|
|
|
|
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
Start-Process -FilePath "https://github.com/farag2/Sophia-Script-for-Windows#system-requirements" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
{$_ -eq 22000} |
|
|
|
{ |
|
|
|
if (Test-Path -Path "$env:LOCALAPPDATA\PCHealthCheck\PCHealthCheck.exe") |
|
|
|
{ |
|
|
|
Start-Process -FilePath "$env:LOCALAPPDATA\PCHealthCheck\PCHealthCheck.exe" |
|
|
|
break |
|
|
|
} |
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
|
# Check the internet connection |
|
|
|
$Parameters = @{ |
|
|
|
Name = "dns.msftncsi.com" |
|
|
|
Server = "1.1.1.1" |
|
|
|
DnsOnly = $true |
|
|
|
ErrorAction = "Stop" |
|
|
|
} |
|
|
|
if ((Resolve-DnsName @Parameters).IPAddress -notcontains "131.107.255.255") |
|
|
|
{ |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
|
# Download PC Health Check app to start upgrade |
|
|
|
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" |
|
|
|
$Parameters = @{ |
|
|
|
Uri = "https://aka.ms/GetPCHealthCheckApp" |
|
|
|
OutFile = "$DownloadsFolder\WindowsPCHealthCheckSetup.msi" |
|
|
|
UseBasicParsing = $true |
|
|
|
Verbose = $true |
|
|
|
} |
|
|
|
Invoke-WebRequest @Parameters |
|
|
|
|
|
|
|
# Extract WindowsPCHealthCheckSetup.msi without installing |
|
|
|
$Arguments = @( |
|
|
|
"/a `"$DownloadsFolder\WindowsPCHealthCheckSetup.msi`"", |
|
|
|
"TARGETDIR=`"$DownloadsFolder\WindowsPCHealthCheckSetup`"", |
|
|
|
"/qb" |
|
|
|
) |
|
|
|
Start-Process -FilePath "msiexec" -ArgumentList $Arguments -Wait |
|
|
|
Remove-Item -Path "$DownloadsFolder\WindowsPCHealthCheckSetup.msi" -Force |
|
|
|
Start-Process -FilePath "$DownloadsFolder\WindowsPCHealthCheckSetup\PCHealthCheck\PCHealthCheck.exe" |
|
|
|
|
|
|
|
# Download Windows 11 Installation Assistant |
|
|
|
# https://www.microsoft.com/software-download/windows11 |
|
|
|
$DownloadsFolder = Get-ItemPropertyValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" |
|
|
|
$Parameters = @{ |
|
|
|
Uri = "https://go.microsoft.com/fwlink/?linkid=2171764" |
|
|
|
OutFile = "$DownloadsFolder\Windows11InstallationAssistant.exe" |
|
|
|
UseBasicParsing = $true |
|
|
|
Verbose = $true |
|
|
|
} |
|
|
|
Invoke-WebRequest @Parameters |
|
|
|
|
|
|
|
Start-Process -FilePath "$DownloadsFolder\Windows11InstallationAssistant.exe" -ArgumentList "/SkipEULA" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
catch [System.Net.WebException] |
|
|
|
{ |
|
|
|
Write-Warning -Message ($Localization.NoResponse -f "microsoft.com") |
|
|
|
Write-Error -Message ($Localization.NoResponse -f "microsoft.com") -ErrorAction SilentlyContinue |
|
|
|
} |
|
|
|
} |
|
|
|
catch [System.ComponentModel.Win32Exception] |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.NoInternetConnection |
|
|
|
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue |
|
|
|
} |
|
|
|
|
|
|
|
$CurrentBuild = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name CurrentBuild |
|
|
|
$UBR = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR |
|
|
|
Write-Warning -Message ($Localization.UpdateWarning -f $CurrentBuild.CurrentBuild, $UBR.UBR) |
|
|
@ -283,11 +204,11 @@ public static string GetString(uint strId) |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
{$_ -eq 22621} |
|
|
|
{$_ -eq 22631} |
|
|
|
{ |
|
|
|
if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -lt 2428) |
|
|
|
if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -lt 2715) |
|
|
|
{ |
|
|
|
# Check whether the OS minor build version is 2428 minimum |
|
|
|
# Check whether the OS minor build version is 2715 minimum |
|
|
|
# https://learn.microsoft.com/en-us/windows/release-health/windows11-release-information#windows-11-current-versions |
|
|
|
$CurrentBuild = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name CurrentBuild |
|
|
|
$UBR = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR |
|
|
@ -391,6 +312,8 @@ public static string GetString(uint strId) |
|
|
|
"WinterOS Tweaker" = "$env:SystemRoot\WinterOS*" |
|
|
|
# https://github.com/ThePCDuke/WinCry |
|
|
|
WinCry = "$env:SystemRoot\TempCleaner.exe" |
|
|
|
# https://hone.gg |
|
|
|
Hone = "$env:LOCALAPPDATA\Programs\Hone\Hone.exe" |
|
|
|
} |
|
|
|
foreach ($Tweaker in $Tweakers.Keys) |
|
|
|
{ |
|
|
@ -471,6 +394,17 @@ public static string GetString(uint strId) |
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# Check if Microsoft Store being an important system component was removed |
|
|
|
if (-not (Get-AppxPackage -Name Microsoft.WindowsStore)) |
|
|
|
{ |
|
|
|
Write-Warning -Message ($Localization.WindowsComponentBroken -f "Microsoft Store") |
|
|
|
|
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# Check if the current module version is the latest one |
|
|
|
try |
|
|
|
{ |
|
|
@ -541,6 +475,17 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
# Checking whether Windows Security Settings page was hidden from UI |
|
|
|
if ([Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer", "SettingsPageVisibility", $null) -match "hide:windowsdefender") |
|
|
|
{ |
|
|
|
Write-Warning -Message ($Localization.WindowsComponentBroken -f "Microsoft Defender") |
|
|
|
|
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# Checking whether WMI is corrupted |
|
|
|
try |
|
|
|
{ |
|
|
@ -590,110 +535,48 @@ public static string GetString(uint strId) |
|
|
|
$DefenderState = ('0x{0:x}' -f $productState).Substring(3, 2) |
|
|
|
if ($DefenderState -notmatch "00|01") |
|
|
|
{ |
|
|
|
$Script:DefenderproductState = $true |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
$Script:DefenderproductState = $false |
|
|
|
} |
|
|
|
|
|
|
|
# Specify whether Antispyware protection is enabled |
|
|
|
if ((Get-CimInstance -ClassName MSFT_MpComputerStatus -Namespace root/Microsoft/Windows/Defender).AntispywareEnabled) |
|
|
|
{ |
|
|
|
$Script:DefenderAntispywareEnabled = $true |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
$Script:DefenderAntispywareEnabled = $false |
|
|
|
} |
|
|
|
# Defender is a currently used AV. Continue... |
|
|
|
$Script:DefenderProductState = $true |
|
|
|
|
|
|
|
# https://docs.microsoft.com/en-us/graph/api/resources/intune-devices-windowsdefenderproductstatus?view=graph-rest-beta |
|
|
|
# Due to "Set-StrictMode -Version Latest" we have to call Get-Member first to check whether ProductStatus property exists |
|
|
|
if (Get-CimInstance -ClassName MSFT_MpComputerStatus -Namespace root/Microsoft/Windows/Defender | Get-Member | Where-Object -FilterScript {$_.Name -eq "ProductStatus"}) |
|
|
|
{ |
|
|
|
if ($Script:DefenderproductState) |
|
|
|
# Check whether Microsoft Defender was turned off via GPO |
|
|
|
# Due to "Set-StrictMode -Version Latest" we have to use GetValue() |
|
|
|
if ([Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender", "DisableAntiSpyware", $null) -eq 1) |
|
|
|
{ |
|
|
|
if ((Get-CimInstance -ClassName MSFT_MpComputerStatus -Namespace root/Microsoft/Windows/Defender).ProductStatus -eq 1) |
|
|
|
{ |
|
|
|
$Script:DefenderProductState = $false |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
$Script:DefenderProductState = $true |
|
|
|
} |
|
|
|
$Script:AntiSpywareEnabled = $false |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
$Script:DefenderProductState = $false |
|
|
|
$Script:AntiSpywareEnabled = $true |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.UpdateDefender |
|
|
|
|
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
|
|
|
|
# Receive updates for other Microsoft products when you update Windows |
|
|
|
(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d", 7, "") |
|
|
|
|
|
|
|
# Check for UWP apps updates |
|
|
|
Get-CimInstance -Namespace root/CIMV2/mdm/dmmap -ClassName MDM_EnterpriseModernAppManagement_AppManagement01 | Invoke-CimMethod -MethodName UpdateScanMethod |
|
|
|
|
|
|
|
# Check for updates |
|
|
|
Start-Process -FilePath "$env:SystemRoot\System32\UsoClient.exe" -ArgumentList StartInteractiveScan |
|
|
|
|
|
|
|
# Open the "Windows Update" page |
|
|
|
Start-Process -FilePath "ms-settings:windowsupdate" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# https://docs.microsoft.com/en-us/graph/api/resources/intune-devices-windowsdefenderproductstatus?view=graph-rest-beta |
|
|
|
if ((Get-CimInstance -ClassName MSFT_MpComputerStatus -Namespace root/Microsoft/Windows/Defender).AMEngineVersion -eq "0.0.0.0") |
|
|
|
{ |
|
|
|
$Script:DefenderAMEngineVersion = $false |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
$Script:DefenderAMEngineVersion = $true |
|
|
|
} |
|
|
|
|
|
|
|
# Check whether Microsoft Defender was turned off |
|
|
|
# Due to "Set-StrictMode -Version Latest" we have to use GetValue() |
|
|
|
if ([Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender", "DisableAntiSpyware", $null) -eq 1) |
|
|
|
{ |
|
|
|
$Script:DisableAntiSpyware = $true |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
$Script:DisableAntiSpyware = $false |
|
|
|
} |
|
|
|
|
|
|
|
# Check whether real-time protection prompts for known malware detection |
|
|
|
# Due to "Set-StrictMode -Version Latest" we have to use GetValue() |
|
|
|
if ([Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection", "DisableRealtimeMonitoring", $null) -eq 1) |
|
|
|
{ |
|
|
|
$Script:DisableRealtimeMonitoring = $true |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
$Script:DisableRealtimeMonitoring = $false |
|
|
|
} |
|
|
|
# Check whether Microsoft Defender was turned off via GPO |
|
|
|
# Due to "Set-StrictMode -Version Latest" we have to use GetValue() |
|
|
|
if ([Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection", "DisableRealtimeMonitoring", $null) -eq 1) |
|
|
|
{ |
|
|
|
$Script:RealtimeMonitoringEnabled = $false |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
$Script:RealtimeMonitoringEnabled = $true |
|
|
|
} |
|
|
|
|
|
|
|
# Check whether behavior monitoring was disabled |
|
|
|
# Due to "Set-StrictMode -Version Latest" we have to use GetValue() |
|
|
|
if ([Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection", "DisableBehaviorMonitoring", $null) -eq 1) |
|
|
|
{ |
|
|
|
$Script:DisableBehaviorMonitoring = $true |
|
|
|
# Check whether Microsoft Defender was turned off via GPO |
|
|
|
# Due to "Set-StrictMode -Version Latest" we have to use GetValue() |
|
|
|
if ([Microsoft.Win32.Registry]::GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection", "DisableBehaviorMonitoring", $null) -eq 1) |
|
|
|
{ |
|
|
|
$Script:BehaviorMonitoringEnabled = $false |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
$Script:BehaviorMonitoringEnabled = $true |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
$Script:DisableBehaviorMonitoring = $false |
|
|
|
$Script:DefenderProductState = $false |
|
|
|
} |
|
|
|
|
|
|
|
if ($Script:DefenderproductState -and $Script:DefenderServices -and $Script:DefenderAntispywareEnabled -and $Script:DefenderAMEngineVersion -and |
|
|
|
(-not $Script:DisableAntiSpyware) -and (-not $Script:DisableRealtimeMonitoring) -and (-not $Script:DisableBehaviorMonitoring)) |
|
|
|
if ($Script:DefenderServices -and $Script:DefenderproductState -and $Script:AntiSpywareEnabled -and $Script:RealtimeMonitoringEnabled -and $Script:BehaviorMonitoringEnabled) |
|
|
|
{ |
|
|
|
# Defender is enabled |
|
|
|
$Script:DefenderEnabled = $true |
|
|
@ -862,17 +745,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue |
|
|
|
} |
|
|
|
|
|
|
|
# Check if Microsoft Store as being an important system component was removed |
|
|
|
if (-not (Get-AppxPackage -Name Microsoft.WindowsStore)) |
|
|
|
{ |
|
|
|
Write-Warning -Message ($Localization.WindowsComponentBroken -f "Microsoft Store") |
|
|
|
|
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# PowerShell 5.1 (7.3 too) interprets 8.3 file name literally, if an environment variable contains a non-latin word |
|
|
|
Get-ChildItem -Path "$env:TEMP\Computer.txt", "$env:TEMP\User.txt" -Force -ErrorAction Ignore | Remove-Item -Recurse -Force -ErrorAction Ignore |
|
|
|
|
|
|
@ -1066,7 +938,7 @@ function CreateRestorePoint |
|
|
|
} |
|
|
|
#endregion Protection |
|
|
|
|
|
|
|
#region Additional functions |
|
|
|
#region Additional function |
|
|
|
<# |
|
|
|
.SYNOPSIS |
|
|
|
Create pre-configured text files for LGPO.exe tool |
|
|
@ -1160,50 +1032,7 @@ $($Type):$($Value)`n |
|
|
|
|
|
|
|
Add-Content -Path $Path -Value $Policy -Encoding Default -Force |
|
|
|
} |
|
|
|
|
|
|
|
# Revert back removed or commented out "InitialActions" functions |
|
|
|
function script:AdditionalActions |
|
|
|
{ |
|
|
|
# Get the name of a preset (e.g Sophia.ps1) regardless it was named |
|
|
|
# $_.File has no EndsWith() method |
|
|
|
$PresetName = ((Get-PSCallStack).Position | Where-Object -FilterScript {$_.File}).File | Where-Object -FilterScript {$_.EndsWith(".ps1")} |
|
|
|
if (Select-String -Path $PresetName -Pattern InitialActions | Select-String -Pattern "{InitialActions}", "The mandatory checks" -NotMatch) |
|
|
|
{ |
|
|
|
# The string exists and is commented |
|
|
|
if ((Select-String -Path $PresetName -Pattern InitialActions | Select-String -Pattern "{InitialActions}", "The mandatory checks" -NotMatch).Line.StartsWith("#") -eq $true) |
|
|
|
{ |
|
|
|
$Host.UI.RawUI.WindowTitle = "InitialActions | $($PresetName)" |
|
|
|
|
|
|
|
# Calculate the string number to uncomment "InitialActions -Warning" |
|
|
|
$LineNumber = (Select-String -Path $PresetName -Pattern InitialActions | Select-String -Pattern "{InitialActions}", "The mandatory checks" -NotMatch).LineNumber |
|
|
|
# Get data from the required line to replace it with "InitialActions -Warning" |
|
|
|
$RequiredLine = (Get-Content -Path $PresetName -Encoding UTF8) | Where-Object -FilterScript {$_.ReadCount -eq $LineNumber} |
|
|
|
(Get-Content -Path $PresetName -Encoding UTF8).Replace($RequiredLine, "InitialActions -Warning") | Set-Content -Path $PresetName -Encoding UTF8 -Force |
|
|
|
|
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
$Host.UI.RawUI.WindowTitle = "InitialActions | $($PresetName)" |
|
|
|
|
|
|
|
$ReadFile = Get-Content -Path $PresetName -Encoding UTF8 |
|
|
|
# Calculate the string number to add after "InitialActions -Warning" |
|
|
|
$LineNumber = (Select-String -Path $PresetName -Pattern Import-LocalizedData).LineNumber |
|
|
|
# Array of a new file: content before $LineNumber (including $LineNumber), new added string, the rest data of file |
|
|
|
$UpdatedFile = @($ReadFile[0..($LineNumber - 1)], "`nInitialActions -Warning", $ReadFile[$LineNumber..($ReadFile.Length + 1)]) |
|
|
|
Set-Content -Path $PresetName -Value $UpdatedFile -Encoding UTF8 -Force |
|
|
|
|
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion Additional functions |
|
|
|
#endregion Additional function |
|
|
|
|
|
|
|
#region Privacy & Telemetry |
|
|
|
<# |
|
|
@ -1247,8 +1076,16 @@ function DiagTrackService |
|
|
|
$Enable |
|
|
|
) |
|
|
|
|
|
|
|
# Revert back removed or commented out "InitialActions" functions |
|
|
|
AdditionalActions |
|
|
|
# Check whether "InitialActions" function was removed in preset file |
|
|
|
if (-not ("WinAPI.GetStr" -as [type])) ### |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.InitialActionsCheckFailed |
|
|
|
|
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
switch ($PSCmdlet.ParameterSetName) |
|
|
|
{ |
|
|
@ -10612,7 +10449,7 @@ FEA494190BF3446DCC8C8AAF62BA01F0BFB18E15503C27558DB70C48EFB0AEA0B600F985C904E9F2 |
|
|
|
2EEEF7B09850D29B2F412DEF3D0BD9194CAE8113B3B38085C77C238CB8D15BF6D6AB42C193F4E2F27F8BEDABB2D6ADE9E486B6AFAFD8D5DBE3B7D7305790F96ECDCC2DD016C5B9B200CB72E6CF54D71 |
|
|
|
F69A01CDE4E3A0A4C5A03627DECD491F215C1420EB07AB8FD2763FCFF5211EB964C82E69DA208BDFA76306D54642B117DCB9A92927CE2E633338D4EEA63B571349B8DA1D4B5523C4CA10308769E4F46 |
|
|
|
1ADD16DD5DFDB0E705187593DEF5CCCF659E48366462CC21D7930E1064234157A7A08E9C90927A37C5CF23D54C755002E4E657BB6E70D9B4BE7C468C19D6969FAE138EBF2C20DD3F5A0BC4C0E97D5BF |
|
|
|
DB8744A21396C44549242817BEAD5AE14FF602E69E75B87784DE5F30BE14106E8D8A081DC8CCCFBF93896E622F755F27E82A596DDCA3469A93ECB9E2E897BF0FCC063426DACDC3B1D81E1EFE6B63932 |
|
|
|
DB8744A21396C44549271517BEAD5AE14FF602E69E75B87784DE5F30BE14106E8D8A081DC8CCCFBF93896E622F755F27E82A596DDCA3469A93ECB9E2E897BF0FCC063426DACDC3B1D81E1EFE6B63932 |
|
|
|
6CA43526CFAEDF9922EAC3204FEB84AAED781EE5516FA5B4DCAB85DB5FF33CEC454DAA375BDA5EEA7C871C310AEDC5BD6B220B59B901D377E22FFFE95FEDA28CE2CE33CAEB8541EE05E1B5650D776C4 |
|
|
|
B2A246DB4613E2CC5D96A44D24AE662D848A7C9E3E922AFF0632B7B40505402956FABC5C3AAB55EEE29085046C127E8776CEFC1690B76EE99371AF9B1D7EF6F79E78325DD3BD8377E9B73B936C6F261 |
|
|
|
1D0A1223A4D7C6CF3037922DD0686A701FF86761993F294D26E13A7BB8B1C61ACAF38D50334A88DABB3FA412B4FC79F6FBFD0D0A92301484FF1BD1CF3DC67780E4562E05CCA329CABA7CB2B77D9A707 |
|
|
@ -11562,7 +11399,7 @@ public static extern bool SetForegroundWindow(IntPtr hWnd); |
|
|
|
The extension can be installed without Microsoft account |
|
|
|
|
|
|
|
.NOTES |
|
|
|
HEVC Video Extension is already installed in Windows 11 22H2 by default |
|
|
|
HEVC Video Extension is already installed in Windows 11 23H2 by default |
|
|
|
|
|
|
|
.NOTES |
|
|
|
Current user |
|
|
@ -13016,10 +12853,14 @@ Get-ChildItem -Path `$env:TEMP -Recurse -Force | Where-Object -FilterScript {`$_ |
|
|
|
`$Paths = @( |
|
|
|
# Get "C:\$WinREAgent" path because we need to open brackets for $env:SystemDrive but not for $WinREAgent |
|
|
|
(-join ("`$env:SystemDrive\", '`$WinREAgent')), |
|
|
|
(Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName, |
|
|
|
"`$env:SystemDrive\Intel", |
|
|
|
"`$env:SystemDrive\PerfLogs" |
|
|
|
) |
|
|
|
|
|
|
|
if ((Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName) |
|
|
|
{ |
|
|
|
`$Paths += (Get-Item -Path `$env:SystemDrive\Recovery -Force | Where-Object -FilterScript {`$_.Attributes -match "Hidden"}).FullName |
|
|
|
} |
|
|
|
Remove-Item -Path `$Paths -Recurse -Force |
|
|
|
|
|
|
|
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null |
|
|
|