SharpeRAD/Cake.Services

Support for wildcard enabled GetServices

Closed this issue · 2 comments

Hi

would it be possible to add method with a following signature?
IEnumerable<ServiceController> GetServices(string wildcardName)

Similar to what is possible with powershell

PS C:\Get-Service Xbox*
Status   Name               DisplayName
------   ----               -----------
Stopped  XboxGipSvc         Xbox Accessory Management Service
Stopped  XboxNetApiSvc      Xbox Live Networking Service

ServiceController doesn't expose that method and I don't want to switch to Powershell. I've added the following alias to v0.3.1

List<ServiceController> GetServices(string computer = "")

You could use LINQ to filter the response from this.

Nice, that should be enough 👍