.
This commit is contained in:
parent
e0352c7268
commit
a07ac3307b
9
scripts/A.ps1
Normal file
9
scripts/A.ps1
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
$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}
|
Loading…
Reference in New Issue
Block a user