Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Hash Table

$
0
0

That's easy enough, but you don't have ComputerName or StartMode in that output, both of which were part of your original code. Should they be there as well? (If so, use the code from my previous post.)

$services = "wscsvc", "CcmExec" | foreach {
    Get-WmiObject -Class Win32_Service -Filter "Name = '$($_)'" |
    select  Name, State
}
 
$services | Format-Table -AutoSize
$services | Export-Csv -Path C:\Some\Csv\File.csv

Viewing all articles
Browse latest Browse all 13067

Trending Articles