Skip to content

Instantly share code, notes, and snippets.

@kilasuit
Created August 10, 2016 23:50
Show Gist options
  • Save kilasuit/dacb926191c90ac2769bdb2e191fe1f5 to your computer and use it in GitHub Desktop.
Save kilasuit/dacb926191c90ac2769bdb2e191fe1f5 to your computer and use it in GitHub Desktop.
uses wmi to add service description to service objects (but isnt recommended)
$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