|
@ -12215,6 +12215,9 @@ function CleanupTask |
|
|
Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name DisableNotificationCenter -Type CLEAR |
|
|
Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name DisableNotificationCenter -Type CLEAR |
|
|
Set-Policy -Scope User -Path Software\Policies\Microsoft\Windows\Explorer -Name DisableNotificationCenter -Type CLEAR |
|
|
Set-Policy -Scope User -Path Software\Policies\Microsoft\Windows\Explorer -Name DisableNotificationCenter -Type CLEAR |
|
|
|
|
|
|
|
|
|
|
|
# Remove registry keys if Windows Script Host is disabled |
|
|
|
|
|
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows Script Host\Settings", "HKLM:\SOFTWARE\Microsoft\Windows Script Host\Settings" -Name Enabled -Force -ErrorAction Ignore |
|
|
|
|
|
|
|
|
# Checking if we're trying to create the task when it was already created as another user |
|
|
# 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) |
|
|
if (Get-ScheduledTask -TaskPath "\Sophia\" -TaskName "Windows Cleanup" -ErrorAction Ignore) |
|
|
{ |
|
|
{ |
|
@ -12644,6 +12647,9 @@ function SoftwareDistributionTask |
|
|
Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name DisableNotificationCenter -Type CLEAR |
|
|
Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name DisableNotificationCenter -Type CLEAR |
|
|
Set-Policy -Scope User -Path Software\Policies\Microsoft\Windows\Explorer -Name DisableNotificationCenter -Type CLEAR |
|
|
Set-Policy -Scope User -Path Software\Policies\Microsoft\Windows\Explorer -Name DisableNotificationCenter -Type CLEAR |
|
|
|
|
|
|
|
|
|
|
|
# Remove registry keys if Windows Script Host is disabled |
|
|
|
|
|
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows Script Host\Settings", "HKLM:\SOFTWARE\Microsoft\Windows Script Host\Settings" -Name Enabled -Force -ErrorAction Ignore |
|
|
|
|
|
|
|
|
# Checking if we're trying to create the task when it was already created as another user |
|
|
# 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) |
|
|
if (Get-ScheduledTask -TaskPath "\Sophia\" -TaskName SoftwareDistribution -ErrorAction Ignore) |
|
|
{ |
|
|
{ |
|
@ -12958,6 +12964,9 @@ function TempTask |
|
|
Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name DisableNotificationCenter -Type CLEAR |
|
|
Set-Policy -Scope Computer -Path SOFTWARE\Policies\Microsoft\Windows\Explorer -Name DisableNotificationCenter -Type CLEAR |
|
|
Set-Policy -Scope User -Path Software\Policies\Microsoft\Windows\Explorer -Name DisableNotificationCenter -Type CLEAR |
|
|
Set-Policy -Scope User -Path Software\Policies\Microsoft\Windows\Explorer -Name DisableNotificationCenter -Type CLEAR |
|
|
|
|
|
|
|
|
|
|
|
# Remove registry keys if Windows Script Host is disabled |
|
|
|
|
|
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows Script Host\Settings", "HKLM:\SOFTWARE\Microsoft\Windows Script Host\Settings" -Name Enabled -Force -ErrorAction Ignore |
|
|
|
|
|
|
|
|
# Checking if we're trying to create the task when it was already created as another user |
|
|
# 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) |
|
|
if (Get-ScheduledTask -TaskPath "\Sophia\" -TaskName Temp -ErrorAction Ignore) |
|
|
{ |
|
|
{ |
|
|