mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-09 01:38:26 +02:00
Update list-tasks.ps1
This commit is contained in:
parent
ebf16c7ef7
commit
c2fc981d4f
@ -1,15 +1,15 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Lists all Windows scheduler tasks
|
Lists all scheduled tasks
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This script lists all Windows scheduler tasks.
|
This script lists all scheduled tasks.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./list-tasks
|
PS> ./list-tasks
|
||||||
|
|
||||||
TaskPath TaskName State
|
TaskName State TaskPath
|
||||||
-------- -------- -----
|
-------- ----- --------
|
||||||
\Microsoft\Windows\.NET Framework\ .NET Framework NGEN v4.0.30319 Ready
|
.NET Framework NGEN v4.0.30319 Ready \Microsoft\Windows\.NET Framework\
|
||||||
\Microsoft\Windows\.NET Framework\ .NET Framework NGEN v4.0.30319 64 Ready
|
.NET Framework NGEN v4.0.30319 64 Ready \Microsoft\Windows\.NET Framework\
|
||||||
...
|
...
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
@ -18,7 +18,7 @@
|
|||||||
#>
|
#>
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Get-ScheduledTask
|
Get-ScheduledTask | Format-Table -property TaskName,State,TaskPath
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
Loading…
Reference in New Issue
Block a user