2020/06/15
用 PowerShell 找出 Windows Task Schedule 裡超過時間的排程
```
Get-ScheduledTask | ? State -eq Running | Get-ScheduledTaskInfo | % {
$lastRunTime = [datetime]::parse($_.LastRunTime)
$lastRunTime
$ts = New-TimeSpan -Start $lastRunTime -End (Get-Date)
$ts.Minutes
if ($ts.Minutes -gt 10) {
Write-Host $_.TaskName
Write-Host "Running over 10 minutes!!"
}
}
```
訂閱:
張貼留言 (Atom)
-
一個糖果有一個糖果紙 一個糖果1元 現在商店在作促銷 3個糖果紙可以換1個糖果 請問 15元最多可以吃幾個糖果?
-
內容取自 Producthunt =============================== "What's a tool that changed your life?" - us to freelancers on Twitt...
-
## Use appcmd ### List application pool (find the apppool name) ``` C:\Windows\System32\inetsrv\appcmd.exe list apppool ==== the result ==...
沒有留言:
張貼留言