Verify a service-name exclusion
Documentation: Microsoft Learn
Return all other service names in alphabetical order.
An example to inspect
Preview the example. Sign in for the full lesson and activities.
Get-Service | Where-Object Name -notlike 'W*' | Sort-Object Name | Select-Object NameThe task
A report has an explicit scope exclusion for service names beginning with W. Apply the exclusion without altering service state.
Target
Return all other service names in alphabetical order.
What the result tells you
A wildcard filter is a rule over names. It is not a reliable way to classify a service as safe, optional or Microsoft-owned.
Verify the result
Run the source by itself and inspect the sample objects. Add each filter separately, then check the final properties and order.
The browser uses a small fictional dataset. Real results depend on the host, module, account and target environment.
What does this exclusion establish?
Choose an answer, then check your reasoning.
Worked solution
Worked solution
Reveal one approach
Related reference
Read the command and platform requirementsTry it in the lab
Write your pipeline below and run it against the fictional sample data, then check your result against the expected answer.
Follow the objects
Run the command to inspect each stage.