powershell v2 - how to get process ID

前端 未结 2 1806
广开言路
广开言路 2021-01-18 07:00

I have an Application, that runs multiple instances of itself. e.g

AppName.exe instance1
AppName.exe instance2
AppName.exe instance3

Using

相关标签:
2条回答
  • 2021-01-18 07:34

    you can use the get-process cmdlet instead of using wmi :

    $procid=get-process appname |select -expand id

    0 讨论(0)
  • 2021-01-18 07:40
    $procid=(get-process appname).id
    
    0 讨论(0)
提交回复
热议问题