Skip to content

Instantly share code, notes, and snippets.

@r-plus
Created September 9, 2015 01:37
Show Gist options
  • Save r-plus/093deab083710c5b8354 to your computer and use it in GitHub Desktop.
Save r-plus/093deab083710c5b8354 to your computer and use it in GitHub Desktop.
note for future use.
# よく使うやつ。主にStartTime見る用
Get-Process -Name 'winlogon' | Format-Table -AutoSize -Property Name, StartTime, Id, PM, VM, WS
# Service. StartModeが取れないダメCmdlet。そっちが目的ならGet-WmiObject
Get-Service | format-table -Autosize -Property DisplayName, Name, Status
# Get-ServiceでPIDが取れないのでWMIを使わざるを得ない。大体タスクマネージャーから確認した方が早い。
Get-Process -Id (Get-WmiObject -Query "select * from win32_service where name='wuauserv'").ProcessId | Format-Table Name, StartTime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment