|
|
@ -85,7 +85,7 @@ public static string GetString(uint strId) |
|
|
|
Add-Type @Signature |
|
|
|
} |
|
|
|
|
|
|
|
# Check if Microsoft Edge as being a system component was removed by harmful tweakers |
|
|
|
# Check whether Microsoft Edge as being a system component was removed by harmful tweakers |
|
|
|
if (-not (Test-Path -Path "${env:ProgramFiles(x86)}\Microsoft\Edge\Application\msedge.exe")) |
|
|
|
{ |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
@ -174,7 +174,7 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
# Detect the OS bitness |
|
|
|
# Detect Windows bitness |
|
|
|
if (-not [System.Environment]::Is64BitOperatingSystem) |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.UnsupportedOSBitness |
|
|
@ -185,17 +185,6 @@ public static string GetString(uint strId) |
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# Check if Get-WindowsEdition cmdlet is working |
|
|
|
try |
|
|
|
{ |
|
|
|
[void](Get-WindowsEdition -Online) |
|
|
|
} |
|
|
|
catch [System.Runtime.InteropServices.COMException] |
|
|
|
{ |
|
|
|
Write-Warning -Message ($Localization.WindowsComponentBroken -f "Get-WindowsEdition") |
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# Check the language mode |
|
|
|
if ($ExecutionContext.SessionState.LanguageMode -ne "FullLanguage") |
|
|
|
{ |
|
|
@ -301,7 +290,7 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
# Flibustier custom Windows image |
|
|
|
# Check whether this is a Flibustier custom Windows image |
|
|
|
if (Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier) |
|
|
|
{ |
|
|
|
Write-Warning -Message ($Localization.TweakerWarning -f "flblauncher") |
|
|
@ -312,47 +301,33 @@ public static string GetString(uint strId) |
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# Check whether Windows Feature Experience Pack was removed by harmful tweakers |
|
|
|
if (-not (Get-AppxPackage -Name MicrosoftWindows.Client.CBS)) |
|
|
|
# Check whether Get-WindowsEdition cmdlet is working |
|
|
|
try |
|
|
|
{ |
|
|
|
Write-Warning -Message ($Localization.WindowsComponentBroken -f "Windows Feature Experience Pack") |
|
|
|
|
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
|
|
|
|
[void](Get-WindowsEdition -Online) |
|
|
|
} |
|
|
|
catch [System.Runtime.InteropServices.COMException] |
|
|
|
{ |
|
|
|
Write-Warning -Message ($Localization.WindowsComponentBroken -f "Get-WindowsEdition") |
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# Check whether all necessary files exist in the bin folder |
|
|
|
$Files = @( |
|
|
|
"$PSScriptRoot\..\bin\LGPO.exe", |
|
|
|
"$PSScriptRoot\..\bin\Microsoft.Windows.SDK.NET.dll", |
|
|
|
"$PSScriptRoot\..\bin\WinRT.Runtime.dll" |
|
|
|
) |
|
|
|
if (($Files | Test-Path) -contains $false) |
|
|
|
# Check whether Windows Feature Experience Pack was removed by harmful tweakers |
|
|
|
if (-not (Get-AppxPackage -Name MicrosoftWindows.Client.CBS)) |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.Bin |
|
|
|
Write-Warning -Message ($Localization.WindowsComponentBroken -f "Windows Feature Experience Pack") |
|
|
|
|
|
|
|
Start-Process -FilePath "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" |
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# Check for a pending reboot |
|
|
|
$PendingActions = @( |
|
|
|
# CBS pending |
|
|
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending", |
|
|
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootInProgress", |
|
|
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackagesPending", |
|
|
|
# Windows Update pending |
|
|
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting", |
|
|
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" |
|
|
|
) |
|
|
|
if (($PendingActions | Test-Path) -contains $true) |
|
|
|
# Check whether EventLog service is running in order to be sire that Event Logger is enabled |
|
|
|
if ((Get-Service -Name EventLog).Status -eq "Stopped") |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.RebootPending |
|
|
|
# Extract the localized "Event Viewer" string from shell32.dll |
|
|
|
Write-Warning -Message ($Localization.WindowsComponentBroken -f $([WinAPI.GetStr]::GetString(22029)) |
|
|
|
|
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
@ -360,7 +335,7 @@ public static string GetString(uint strId) |
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# Check if Microsoft Store being an important system component was removed |
|
|
|
# Check whether Microsoft Store being an important system component was removed |
|
|
|
if (-not (Get-AppxPackage -Name Microsoft.WindowsStore)) |
|
|
|
{ |
|
|
|
Write-Warning -Message ($Localization.WindowsComponentBroken -f "Microsoft Store") |
|
|
@ -371,55 +346,6 @@ public static string GetString(uint strId) |
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# Check if the current module version is the latest one |
|
|
|
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 |
|
|
|
{ |
|
|
|
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json |
|
|
|
$Parameters = @{ |
|
|
|
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json" |
|
|
|
Verbose = $true |
|
|
|
UseBasicParsing = $true |
|
|
|
} |
|
|
|
$LatestRelease = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_PowerShell_7 |
|
|
|
$CurrentRelease = (Get-Module -Name Sophia).Version.ToString() |
|
|
|
|
|
|
|
if ([System.Version]$LatestRelease -gt [System.Version]$CurrentRelease) |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.UnsupportedRelease |
|
|
|
|
|
|
|
Start-Process -FilePath "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" |
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
} |
|
|
|
catch [System.Net.WebException] |
|
|
|
{ |
|
|
|
Write-Warning -Message ($Localization.NoResponse -f "https://github.com") |
|
|
|
Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue |
|
|
|
} |
|
|
|
} |
|
|
|
catch [System.ComponentModel.Win32Exception] |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.NoInternetConnection |
|
|
|
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue |
|
|
|
} |
|
|
|
|
|
|
|
#region Defender checks |
|
|
|
# Check whether necessary Microsoft Defender components exists |
|
|
|
$Files = @( |
|
|
@ -504,7 +430,7 @@ public static string GetString(uint strId) |
|
|
|
# Defender is a currently used AV. Continue... |
|
|
|
$Script:DefenderProductState = $true |
|
|
|
|
|
|
|
# Check if Windows is Enterprise for Chineese Goverment which doesn't have Defender |
|
|
|
# Check whether Windows is Enterprise for Chineese Goverment which doesn't have Defender |
|
|
|
if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name EditionID) -ne "EnterpriseG") |
|
|
|
{ |
|
|
|
# Defender is a currently used AV. Continue... |
|
|
@ -580,7 +506,93 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
#endregion Defender checks |
|
|
|
|
|
|
|
# Detect the OS build version |
|
|
|
# Check for a pending reboot |
|
|
|
$PendingActions = @( |
|
|
|
# CBS pending |
|
|
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending", |
|
|
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootInProgress", |
|
|
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackagesPending", |
|
|
|
# Windows Update pending |
|
|
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting", |
|
|
|
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" |
|
|
|
) |
|
|
|
if (($PendingActions | Test-Path) -contains $true) |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.RebootPending |
|
|
|
|
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# Check whether the current module version is the latest one |
|
|
|
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 |
|
|
|
{ |
|
|
|
# https://github.com/farag2/Sophia-Script-for-Windows/blob/master/sophia_script_versions.json |
|
|
|
$Parameters = @{ |
|
|
|
Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json" |
|
|
|
Verbose = $true |
|
|
|
UseBasicParsing = $true |
|
|
|
} |
|
|
|
$LatestRelease = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_PowerShell_5_1 |
|
|
|
$CurrentRelease = (Get-Module -Name Sophia).Version.ToString() |
|
|
|
|
|
|
|
if ([System.Version]$LatestRelease -gt [System.Version]$CurrentRelease) |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.UnsupportedRelease |
|
|
|
|
|
|
|
Start-Process -FilePath "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" |
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
} |
|
|
|
catch [System.Net.WebException] |
|
|
|
{ |
|
|
|
Write-Warning -Message ($Localization.NoResponse -f "https://github.com") |
|
|
|
Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue |
|
|
|
} |
|
|
|
} |
|
|
|
catch [System.ComponentModel.Win32Exception] |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.NoInternetConnection |
|
|
|
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue |
|
|
|
} |
|
|
|
|
|
|
|
# Check whether all necessary files exist in the bin folder |
|
|
|
$Files = @( |
|
|
|
"$PSScriptRoot\..\bin\LGPO.exe", |
|
|
|
"$PSScriptRoot\..\bin\Microsoft.Windows.SDK.NET.dll", |
|
|
|
"$PSScriptRoot\..\bin\WinRT.Runtime.dll" |
|
|
|
) |
|
|
|
if (($Files | Test-Path) -contains $false) |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.Bin |
|
|
|
|
|
|
|
Start-Process -FilePath "https://github.com/farag2/Sophia-Script-for-Windows/releases/latest" |
|
|
|
Start-Process -FilePath "https://t.me/sophia_chat" |
|
|
|
Start-Process -FilePath "https://discord.gg/sSryhaEv79" |
|
|
|
|
|
|
|
exit |
|
|
|
} |
|
|
|
|
|
|
|
# Detect Windows build version |
|
|
|
switch ((Get-CimInstance -ClassName CIM_OperatingSystem).BuildNumber) |
|
|
|
{ |
|
|
|
{($_ -lt 19045) -or ($_ -gt 19045)} |
|
|
@ -597,7 +609,7 @@ public static string GetString(uint strId) |
|
|
|
{ |
|
|
|
if ((Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR) -lt 3803) |
|
|
|
{ |
|
|
|
# Check whether the OS minor build version is 3803 minimum |
|
|
|
# Check whether Windows minor build version is 3803 minimum |
|
|
|
# https://learn.microsoft.com/en-us/windows/release-health/release-information#windows-10-current-versions-by-servicing-option |
|
|
|
$CurrentBuild = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name CurrentBuild |
|
|
|
$UBR = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion" -Name UBR |
|
|
@ -730,7 +742,7 @@ public static string GetString(uint strId) |
|
|
|
# Extract the localized "Please wait..." string from shell32.dll |
|
|
|
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose |
|
|
|
|
|
|
|
# Check if hosts contains any of string from $IPArray array |
|
|
|
# Check whether hosts contains any of string from $IPArray array |
|
|
|
if ((Get-Content -Path "$env:SystemRoot\System32\drivers\etc\hosts" -Encoding Default -Force | ForEach-Object -Process {$_.Trim()} | ForEach-Object -Process { |
|
|
|
($_ -ne "") -and ($_ -ne " ") -and (-not $_.StartsWith("#")) -and ($IPArray -split "`r?`n" | Select-String -Pattern $_) |
|
|
|
}) -contains $true) |
|
|
@ -5171,7 +5183,7 @@ function OneDrive |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
# Check if user is logged into OneDrive (Microsoft account) |
|
|
|
# Check whether user is logged into OneDrive (Microsoft account) |
|
|
|
$UserEmail = Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Personal -Name UserEmail -ErrorAction Ignore |
|
|
|
if ($UserEmail) |
|
|
|
{ |
|
|
@ -8215,7 +8227,7 @@ function WinPrtScrFolder |
|
|
|
$Default |
|
|
|
) |
|
|
|
|
|
|
|
# Check if user is logged into OneDrive (Microsoft account) |
|
|
|
# Check whether user is logged into OneDrive (Microsoft account) |
|
|
|
$UserEmail = Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Personal -Name UserEmail -ErrorAction Ignore |
|
|
|
if ($UserEmail) |
|
|
|
{ |
|
|
@ -8297,7 +8309,7 @@ function WinPrtScrFolder |
|
|
|
RecommendedTroubleshooting -Default |
|
|
|
|
|
|
|
.NOTES |
|
|
|
In order this feature to work the OS level of diagnostic data gathering will be set to "Optional diagnostic data" and the error reporting feature will be turned on |
|
|
|
In order this feature to work Windows level of diagnostic data gathering will be set to "Optional diagnostic data" and the error reporting feature will be turned on |
|
|
|
|
|
|
|
.NOTES |
|
|
|
Machine-wide |
|
|
@ -8341,7 +8353,7 @@ function RecommendedTroubleshooting |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
# Set the OS level of diagnostic data gathering to "Optional diagnostic data" |
|
|
|
# Set Windows level of diagnostic data gathering to "Optional diagnostic data" |
|
|
|
if (-not (Test-Path -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack)) |
|
|
|
{ |
|
|
|
New-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack -Force |
|
|
@ -10217,7 +10229,7 @@ function Import-Associations |
|
|
|
https://support.microsoft.com/en-us/windows/how-to-use-the-pc-health-check-app-9c8abd9b-03ba-4e67-81ef-36f37caa7844 |
|
|
|
|
|
|
|
.NOTES |
|
|
|
This application is installed with the KB5005463 update to check if PC meets the system requirements of Windows 11 |
|
|
|
This application is installed with the KB5005463 update to Check whether PC meets the system requirements of Windows 11 |
|
|
|
|
|
|
|
.NOTES |
|
|
|
Machine-wide |
|
|
@ -11052,7 +11064,7 @@ function PinToStart |
|
|
|
# Extract the localized "Devices and Printers" string from shell32.dll |
|
|
|
$DevicesPrinters = [WinAPI.GetStr]::GetString(30493) |
|
|
|
|
|
|
|
# Check if an argument is "DevicesPrinters". The Devices and Printers's AppID attribute can be retrieved only if the shortcut was created |
|
|
|
# Check whether an argument is "DevicesPrinters". The Devices and Printers's AppID attribute can be retrieved only if the shortcut was created |
|
|
|
if (((Get-Command -Name PinToStart).Parametersets.Parameters | Where-Object -FilterScript {$null -eq $_.Attributes.AliasNames}).Attributes.ValidValues | Where-Object -FilterScript {$_ -match "DevicesPrinters"}) |
|
|
|
{ |
|
|
|
# Create the old-style "Devices and Printers" shortcut in the Start menu |
|
|
@ -12659,7 +12671,7 @@ function CleanupTask |
|
|
|
# Checking if we're trying to create the task when it was already created as another user |
|
|
|
if (Get-ScheduledTask -TaskPath "\Sophia\" -TaskName "Windows Cleanup" -ErrorAction Ignore) |
|
|
|
{ |
|
|
|
# Also we can parse "$env:SystemRoot\System32\Tasks\Sophia\Windows Cleanup" to check if the task was created |
|
|
|
# Also we can parse "$env:SystemRoot\System32\Tasks\Sophia\Windows Cleanup" to Check whether the task was created |
|
|
|
$ScheduleService = New-Object -ComObject Schedule.Service |
|
|
|
$ScheduleService.Connect() |
|
|
|
$ScheduleService.GetFolder("\Sophia").GetTasks(0) | Where-Object -FilterScript {$_.Name -eq "Windows Cleanup"} | Foreach-Object { |
|
|
@ -13084,7 +13096,7 @@ function SoftwareDistributionTask |
|
|
|
# Checking if we're trying to create the task when it was already created as another user |
|
|
|
if (Get-ScheduledTask -TaskPath "\Sophia\" -TaskName SoftwareDistribution -ErrorAction Ignore) |
|
|
|
{ |
|
|
|
# Also we can parse $env:SystemRoot\System32\Tasks\Sophia\SoftwareDistribution to check if the task was created |
|
|
|
# Also we can parse $env:SystemRoot\System32\Tasks\Sophia\SoftwareDistribution to Check whether the task was created |
|
|
|
$ScheduleService = New-Object -ComObject Schedule.Service |
|
|
|
$ScheduleService.Connect() |
|
|
|
$ScheduleService.GetFolder("\Sophia").GetTasks(0) | Where-Object -FilterScript {$_.Name -eq "SoftwareDistribution"} | Foreach-Object { |
|
|
@ -13388,7 +13400,7 @@ function TempTask |
|
|
|
# Checking if we're trying to create the task when it was already created as another user |
|
|
|
if (Get-ScheduledTask -TaskPath "\Sophia\" -TaskName Temp -ErrorAction Ignore) |
|
|
|
{ |
|
|
|
# Also we can parse $env:SystemRoot\System32\Tasks\Sophia\Temp to check if the task was created |
|
|
|
# Also we can parse $env:SystemRoot\System32\Tasks\Sophia\Temp to Check whether the task was created |
|
|
|
$ScheduleService = New-Object -ComObject Schedule.Service |
|
|
|
$ScheduleService.Connect() |
|
|
|
$ScheduleService.GetFolder("\Sophia").GetTasks(0) | Where-Object -FilterScript {$_.Name -eq "Temp"} | Foreach-Object { |
|
|
@ -15458,7 +15470,7 @@ function UpdateLGPEPolicies |
|
|
|
{ |
|
|
|
foreach ($Item in $Path.Property) |
|
|
|
{ |
|
|
|
# Check if property isn't equal to "(default)" and exists |
|
|
|
# Check whether property isn't equal to "(default)" and exists |
|
|
|
if (($null -ne $Item) -and ($Item -ne "(default)")) |
|
|
|
{ |
|
|
|
# Where all ADMX templates are located to compare with |
|
|
@ -15516,7 +15528,7 @@ function UpdateLGPEPolicies |
|
|
|
{ |
|
|
|
foreach ($Item in $Path.Property) |
|
|
|
{ |
|
|
|
# Check if property isn't equal to "(default)" and exists |
|
|
|
# Check whether property isn't equal to "(default)" and exists |
|
|
|
if (($null -ne $Item) -and ($Item -ne "(default)")) |
|
|
|
{ |
|
|
|
# Where all ADMX templates are located to compare with |
|
|
@ -15686,7 +15698,7 @@ public static void PostMessage() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
# Check if any of scheduled tasks were created. Unless open Task Scheduler |
|
|
|
# Check whether any of scheduled tasks were created. Unless open Task Scheduler |
|
|
|
if ($Script:ScheduledTasks) |
|
|
|
{ |
|
|
|
# Find and close taskschd.msc by its' argument |
|
|
|