Page 3 of 4 FirstFirst 1234 LastLast
  1.    10 Apr 2017 #21
    Join Date : Oct 2014
    Posts : 920
    Windows 10 Pro

    Yes, at end, run
    Sort-object using the property value you want to sort on and then you can sort ascending or descending.
      My ComputerSystem Spec
  2.    10 Apr 2017 #22
    Join Date : Apr 2016
    Italy
    Posts : 91
    Windows 10 Pro
    Thread Starter

    Quote Originally Posted by Ztruker View Post
    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 ComputerSystem Spec
  3.    10 Apr 2017 #23
    Join Date : Apr 2014
    Space coast of Florida
    Posts : 5,339
    Windows 10 Pro X64 16299.19

    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 ComputersSystem Spec
  4.    10 Apr 2017 #24
    Join Date : Jul 2015
    Posts : 3,694
    10 Pro

    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
    Click image for larger version. 

Name:	Capture.PNG 
Views:	1 
Size:	51.6 KB 
ID:	129372
      My ComputerSystem Spec
  5.    10 Apr 2017 #25
    Join Date : Apr 2014
    Space coast of Florida
    Posts : 5,339
    Windows 10 Pro X64 16299.19

    That works, thanks. Takes a bit longer but not much.
      My ComputersSystem Spec
  6.    10 Apr 2017 #26
    Join Date : Jun 2014
    USA
    Posts : 1,570
    Windows 10 Pro x64

    Quote Originally Posted by pparks1 View Post
    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 ComputersSystem Spec
  7.    10 Apr 2017 #27
    Join Date : Oct 2014
    Posts : 920
    Windows 10 Pro

    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 ComputerSystem Spec
  8.    11 Apr 2017 #28
    Join Date : Jun 2014
    USA
    Posts : 1,570
    Windows 10 Pro x64

    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 ComputersSystem Spec
  9.    11 Apr 2017 #29
    Join Date : Apr 2016
    Italy
    Posts : 91
    Windows 10 Pro
    Thread Starter

    Quote Originally Posted by Ztruker View Post
    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 ComputerSystem Spec
  10.    11 Apr 2017 #30
    Join Date : Oct 2014
    Posts : 920
    Windows 10 Pro

    $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 ComputerSystem Spec

 
Page 3 of 4 FirstFirst 1234 LastLast


Similar Threads
Thread Forum
Windows Update with Metered connection fails: Creators Update 15063.0
It's dejŠ vu all over again. :doh: The correct behaviour of windows update over a metered connection is to offer the choice to download, or wait until on a non-metered connection. 128460 The initial build of the Anniversary Update broke...
Windows Updates and Activation
Windows 10 Creators Update available through the Update Assistant
:arrow: Windows 10 Creators Update version 1703 (build 15063) now available from Windows 10 Update Assistant. See also: Managing Windows 10 Creators Update rollout for a seamless experience - - Windows 10 Forums Windows 10 Creators Update...
Windows 10 News
Windows 10 Creators Update and Creators Update SDK are Released
Source: Windows 10 Creators Update and Creators Update SDK are Released - Building Apps for WindowsBuilding Apps for Windows :arrow: Windows 10 Creators Update version 1703 (build 15063) now available from Windows 10 Update Assistant. ...
Windows 10 News
Visual Studio 2017 Update Preview and Windows 10 Creators Update SDK
Source: https://blogs.msdn.microsoft.com/visualstudio/2017/03/16/visual-studio-2017-update-preview-and-windows-10-creators-update-sdk/
Windows 10 News
Creators Update: Will I be able to chose the time of actual update.
I notice that many updates occur automatically. With small updates I don't even know they have occurred. I always try to make a restore point before a big update actually updates my comp. (for obvious reasons) and I am sometime given notice, often...
Windows Updates and Activation
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 07:31.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums