Windows 10: Creators Update: number of processes

Discus and support Creators Update: number of processes in Windows 10 Performance & Maintenance to solve the problem; 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... Discussion in 'Windows 10 Performance & Maintenance' started by JoeMcLutz, Apr 5, 2017.

  1. JoeMcLutz Win User

    Creators Update: number of processes


    ...you're right: I've tried different combinations with no avail... *Sad

    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... *Sad
     
    JoeMcLutz, Apr 10, 2017
    #31
  2. pparks1 Win User

    $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
     
    pparks1, Apr 10, 2017
    #32
  3. Ztruker Win User
    Doesn't work, get the same result with or without Sort-Object.
     
    Ztruker, Apr 11, 2017
    #33
  4. shimshom Win User

    Creators Update: number of processes

    shimshom, Apr 11, 2017
    #34
  5. JoeMcLutz Win User
    It's strange but this works for me:

    $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
     
    JoeMcLutz, Apr 11, 2017
    #35
  6. Ztruker Win User
    Yes, that works perfectly for me as well, many thanks.
     
    Ztruker, Apr 12, 2017
    #36
  7. JoeMcLutz Win User
    Ooh! Fine! You're welcome: I'm happy for you! *Smile
     
    JoeMcLutz, Apr 12, 2017
    #37
  8. lx07 Win User

    Creators Update: number of processes

    That is because the |sort-object is within the foreach loop. So each time it is sorting 1 thing.

    It is saying for every process (sorted by Id ), I'm going to find its name using Get-WmiObject. Then I'll sort that (one specific) DispayName.

    Obviously the results will be the same as you are still sorting by Id even though you have then further sorted the DispayName for the Id (which is unique anyway).

    Another method is to put all the results from the foreach loop into another array (for example $names).

    This appears slower because rather than writing out one line at a time to the console it does them all. It isn't slower btw just doesn't keep you updated.

    You can then sort $names by DisplayName rather than Id as it then has the information it wants to sort by.

    Or indeed output $names with or without sorting toOut-GridView and sort using the GUI.

    I've been idly thinking about it but haven't come up with a more elegant solution. More of a StackOverflow question though really...
     
  9. Ztruker Win User
    Using the GUI to sort is a nice idea. Works well too. Thank you.
     
    Ztruker, Apr 4, 2018
    #39
Thema:

Creators Update: number of processes

Loading...
  1. Creators Update: number of processes - Similar Threads - Creators Update number

  2. Excessive Number of Processes

    in Windows 10 Performance & Maintenance
    Excessive Number of Processes: Hi. I understand that there have been several threads that deal with this subject but none that I've seen help. My laptop (specifically on my account) has become very slow, mainly in booting up. I have attempted to do all the normal things that people suggest to speed it up,...
  3. number of background processes and windows processes?

    in Windows 10 Performance & Maintenance
    number of background processes and windows processes?: win10-64, Old core2duo 2GHz , 8G ram. 100 background processes and 150 windows processes after boot. When I click on google cpu use goes to 99%, task mgr shows 6 google tasks running. Any facebook video is buffery, any audio stream is buffery. Also seems odd to have 2 copies...
  4. Creator's Update

    in Windows 10 Installation and Upgrade
    Creator's Update: What is Creator's Update? And How can I get that? Are Insider Program and Creator's Update Same https://answers.microsoft.com/en-us/windows/forum/windows_10-update/creators-update/1d440c83-6041-478b-9874-b651a8224bd1
  5. Creators Update.

    in Windows 10 Updates and Activation
    Creators Update.: How will I know when the Creator's Update has been installed please? Presumably it appears in Settings/Update and Security but is it identifiable? 86408
  6. Creators Update

    in Windows 10 Updates and Activation
    Creators Update: I don't particularly want to do a manual download but am I the only one that hasn't received the Creator's Update yet? I also read somewhere that certain applications running on a computer might stop the update from downloading. 89939
  7. creator update

    in Windows 10 Updates and Activation
    creator update: It appears that the creator update has me in its crosshairs. From what little I could find out the only thing I am interested in is the improved edge. Can all the other features be uninstalled or at least ignored. 86852
  8. Creators update

    in Windows 10 Performance & Maintenance
    Creators update: I installed the creators update some months ago that helped solving some of the problems I had with windows. But after windows crashed and I had to reinstall it, I can no longer seem to get the creators update to work. I just get a message that says "thank you for updating...
  9. creators update

    in Windows 10 Support
    creators update: I was wondering if anyone is having trouble with the creators update? I installed it on a desktop and laptop. The laptop seems ok with it. The desktop appeared ok at first, but after a couple of days things started happening. Keyboard would freeze, chrome with bing started...
  10. WIn 10 Creator version number

    in Windows 10 Installation and Upgrade
    WIn 10 Creator version number: What is the real version number for Win 10 Creator? Is it 15063 or 1703? I know I got the Creator update because it said so after the update ran which took an hour. But my sister's PC I may have to force the upgrade and the Win Upgrade Assistant refers to 15063. So I'm...