Update list-tasks.ps1

This commit is contained in:
Markus Fleschutz 2021-10-20 12:47:58 +02:00
parent ebf16c7ef7
commit c2fc981d4f

View File

@ -1,15 +1,15 @@
<#
.SYNOPSIS
Lists all Windows scheduler tasks
Lists all scheduled tasks
.DESCRIPTION
This script lists all Windows scheduler tasks.
This script lists all scheduled tasks.
.EXAMPLE
PS> ./list-tasks
TaskPath TaskName State
-------- -------- -----
\Microsoft\Windows\.NET Framework\ .NET Framework NGEN v4.0.30319 Ready
\Microsoft\Windows\.NET Framework\ .NET Framework NGEN v4.0.30319 64 Ready
TaskName State TaskPath
-------- ----- --------
.NET Framework NGEN v4.0.30319 Ready \Microsoft\Windows\.NET Framework\
.NET Framework NGEN v4.0.30319 64 Ready \Microsoft\Windows\.NET Framework\
...
.NOTES
Author: Markus Fleschutz · License: CC0
@ -18,7 +18,7 @@
#>
try {
Get-ScheduledTask
Get-ScheduledTask | Format-Table -property TaskName,State,TaskPath
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"