microsoft / Docker-PowerShell

PowerShell Module for Docker
MIT License
289 stars 87 forks source link

get-container simplified query for Running or Stopped containers #182

Open erichexter opened 7 years ago

erichexter commented 7 years ago

It would be useful if there was a -Running flag parameter to do operations like feed the running containers to the stop-container command. Without having to pipe the output to a where-object state -eq running.

something like this would be nice.

Get-Container -Running | Stop-Container Get-Container -Stopped | Remove-Container

dchristian3188 commented 7 years ago

What about a single parameter -State with a parameter set for the different values.