delete Onedrive task fixed
This commit is contained in:
parent
a07ac3307b
commit
352c11f688
@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
$taskName = “The task name”;
|
|
||||||
$task = Get-ScheduledTask | Where-Object { $_.TaskName -eq $taskName } | Select-Object -First 1
|
|
||||||
if ($null -ne $task) {
|
|
||||||
$task | Unregister-ScheduledTask -Confirm:$false
|
|
||||||
Write-Host “Task $taskName was removed” -ForegroundColor Yellow
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Get-ScheduledTask -TaskName $TaskName){Unregister-ScheduledTask -TaskName $TaskName -Confirm $false}
|
|
@ -34,7 +34,7 @@ reg DELETE "HKEY_CURRENT_USER\Software\Classes\CLSID\{018D5C66-4533-4307-9B53-22
|
|||||||
reg DELETE "HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\ShellFolder" /f > NUL 2>&1
|
reg DELETE "HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\ShellFolder" /f > NUL 2>&1
|
||||||
|
|
||||||
echo remove OneDrive update task ...
|
echo remove OneDrive update task ...
|
||||||
powershell -Command "Unregister-ScheduledTask -Confirm:$false | Where-Object {$_.Taskname -match 'OneDrive Standalone Update'}"
|
powershell -Command "Get-ScheduledTask | Where-Object {$_.Taskname -match 'OneDrive Standalone Update'} | Unregister-ScheduledTask -Confirm:$false"
|
||||||
|
|
||||||
echo ####### %0 #######
|
echo ####### %0 #######
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user