Created
August 10, 2016 23:50
-
-
Save kilasuit/dacb926191c90ac2769bdb2e191fe1f5 to your computer and use it in GitHub Desktop.
uses wmi to add service description to service objects (but isnt recommended)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$services = Get-Service -DisplayName Windows* | |
foreach ($service in $services) { | |
Add-Member -InputObject $service -MemberType NoteProperty -Name Description ` | |
-Value $((Get-WmiObject Win32_service -Property name,displayname,status,description -Filter "name='$($service.Name)'").Description) | |
} | |
$services | Select Name,Displayname,Description |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment