I want to retrieve a list of services that are running but also want to filter out some services by name
As there are many services that I want to exclude I want to put them in an array such as:
$ServicesToIgnore = "BITS", "BFE" etc
I can do this manualy as below but am struggling to get this to work with an array.
get-service | Where-Object {$_.status -eq"Running"-and$_.name -ne"BFE" -and$_.name -ne"BITS"}
Thanks.