mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-09 01:25:04 +01:00
27 lines
762 B
PowerShell
Executable File
27 lines
762 B
PowerShell
Executable File
<#
|
|
.SYNOPSIS
|
|
Lists all Windows scheduler tasks
|
|
.DESCRIPTION
|
|
This script lists all Windows scheduler 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
|
|
...
|
|
.NOTES
|
|
Author: Markus Fleschutz · License: CC0
|
|
.LINK
|
|
https://github.com/fleschutz/PowerShell
|
|
#>
|
|
|
|
try {
|
|
Get-ScheduledTask
|
|
exit 0 # success
|
|
} catch {
|
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
|
exit 1
|
|
}
|