Entries Tagged as ''

PowerShell tutorial 8 part 2

As I mentioned last time, today’s post is in regards to using pipelines with foreach loops. Whenever you define a collection in a foreach statement, you are more or less setting up a pipeline. Take a look at this example;

foreach ($svc in Get-Service |
where {$_.status -eq ‘running’})
{
$svc.name + “: ” +
$svc.canstop.tostring().toupper()
}

[Read more →]

SocialTwist Tell-a-Friend