Support for wildcard enabled GetServices
Closed this issue · 2 comments
wojciechrak commented
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
SharpeRAD commented
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.
wojciechrak commented
Nice, that should be enough 👍