none
How to grab DisplayName field from process ID RRS feed

  • Question

  • I am attempting to monitor the java usage on a system which is home to two java applications running binaries "java.exe". I am attempting to get the Display Name which is listed under Windows "Services" so it is easily identifiable which java app I am working with. How could I go about tying the PID of each java instance back to the service/display name that it is running as?

    Overview:
    Foreach ($JavaServicePID in (Get-Process -Name java).id)

         $ExecutablePath = (Get-Process -Id $JavaServicePID).Path

         $DisplayName = ???

    • Moved by Bill_Stewart Friday, July 27, 2018 8:27 PM This is not "scripts on demand"
    Tuesday, May 22, 2018 7:56 PM

All replies