Creators Update: number of processes

Page 3 of 4 FirstFirst 1234 LastLast

  1. Posts : 2,068
    Windows 10 Pro
       #21

    Yes, at end, run
    Sort-object using the property value you want to sort on and then you can sort ascending or descending.
      My Computers


  2. Posts : 138
    Windows 10 Pro
    Thread Starter
       #22

    Ztruker said:
    You can copy and paste this directly into the Powershell ISE to run it.

    Any way to sort the output alphabetically? Sort-Object?
    hmmm...
    | Sort-Object <object>

    ...maybe? :/
      My Computer


  3. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #23

    I've tried to use Sort-Object but no success. Can you include it in the sample code?

    $array=get-process |where-object {$_.ProcessName -Match "svchost"}|Select Id

    foreach ($item in $array.Id){
    Get-WmiObject -Class win32_service -Filter "ProcessID='$item'" | select DisplayName
    }
      My Computers


  4. Posts : 5,478
    2004
       #24

    Out-gridview would do it although there is a more elegant way I'm sure.

    Code:
    $array=get-process |where-object {$_.ProcessName -Match "svchost"}|Select Id
    
    $names=foreach($item in $array.Id){
    Get-WmiObject -Class win32_service -Filter "ProcessID='$item'" | select DisplayName
    } 
    
    $names | sort-object DisplayName | out-gridview
    Creators Update: number of processes-capture.png
      My Computer


  5. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #25

    That works, thanks. Takes a bit longer but not much.
      My Computers


  6. Posts : 5,899
    Win 11 Pro (x64) 22H2
       #26

    pparks1 said:
    Turns out this is a change by design. Starting with Build 14942, Microsoft is not grouping services if you have sufficient amounts of memory. With this change, every service will have it's own dedicated svchost.exe process.

    With higher amounts of RAM being commonplace today, there really wasn't a good reason for MS to share the svchost.exe process. With this new model, if 1 service happens to crash, it won't affect other services.
    Perhaps this may explain why my limited 4gig of RAM laptop now seems slightly more sluggish after the update. Yes, It seemed sluggish before, but now...

    Anyway this is why I tell people I see absolutely NO reason to stick with less than 8, or even 16 gig of RAM. Both my desktops run 32gig. But my Asus Zenbook Prime UX31A laptop is locked at 4gig by design
      My Computers


  7. Posts : 2,068
    Windows 10 Pro
       #27

    I always recommend 8. Haven't had less than 8 for many years. 16 is good for vms. I have not yet taken a home machine over 16GB.
      My Computers


  8. Posts : 5,899
    Win 11 Pro (x64) 22H2
       #28

    As a photographer who processes large image files (typically 800mb to 1gig) in Photoshop, I find 32gig works well for me. And for me, I've not been with less 8 for many years as well.

    When I bough my notebook I knew it was RAM limited but I figured I could work with it seeing I don't game on it. Now it chokes whenever I try to process RAW files through LR from my Nikon D800E. Being a 36 megapixel camera it produces 73meg nef files. You can bet my next notebook won't be so RAM limited.

    Anyway with Windows 10, anyone running 4gig of RAM on a 64-bit OS is in for a sluggish ride. I know, I'm there with my notebook
      My Computers


  9. Posts : 138
    Windows 10 Pro
    Thread Starter
       #29

    Ztruker said:
    I've tried to use Sort-Object but no success. Can you include it in the sample code?

    $array=get-process |where-object {$_.ProcessName -Match "svchost"}|Select Id

    foreach ($item in $array.Id){
    Get-WmiObject -Class win32_service -Filter "ProcessID='$item'" | select DisplayName
    }
    ...you're right: I've tried different combinations with no avail...

    EDIT: Try this one and tell me if it's what you're looking for...
    Get-WmiObject -Class win32_service | Select DisplayName | Sort DisplayName

    EDIT2:
    $array=get-process |where-object {$_.ProcessName -Match "svchost"}|Select Id
    $names=foreach($item in $array.Id){
    Get-WmiObject -Class win32_service -Filter "ProcessID='$item'" | select DisplayName
    }
    $names | sort-object DisplayName

    ...maybe I did not understand the problem...
      My Computer


  10. Posts : 2,068
    Windows 10 Pro
       #30

    $array=get-process |where-object {$_.ProcessName -Match "svchost"}|Select Id

    foreach ($item in $array.Id){Get-WmiObject -Class win32_service -Filter "ProcessID='$item'" | select DisplayName | Sort-Object DisplayName}

    The parts I edited are in bold, orange, it was simply putting
    | Sort-Object DisplayName
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:36.
Find Us




Windows 10 Forums