Exchange Server | Murat Bilici

"Empower your knowledge"

Posts Tagged 'Get-ProcessUpTime'

Get-ProcessUpTime

Get-ProcessUpTime için aşagıdaki scripti kullanabilirsiniz. function Get-ProcessUpTime { param ($processName=”*”) $WhereFilter = {$_.ProcessName -like $processName} ForEach ($process in (Get-Process | Where $WhereFilter)) { try { $UpTime = ((Get-Date).Subtract($process.StartTime)).TotalMinutes } catch { $UpTime = “Cannot Determine UpTime” } finally { New-Object PSObject -Property @{ ProcessName = $process.ProcessName UpTime = $UpTime } } } }   Get-ProcessUpTime [...]

18 Haziran 2012 at 17:21 - Comments