Want to have a better understanding of filter option like
This is yielding proper result
Get-WmiObject -Class Win32_Service -Filter "Name = 'vss'"
How to have a wildcard search inside the filter without piping it to the where condition like :
Get-WmiObject -Class Win32_Service -Filter "Name='v*'"
Get-WmiObject -Class Win32_Service -Filter "Name='*v*'"
Get-WmiObject -Class Win32_Service -Filter "Name='v'"
Get-WmiObject -Class Win32_Service -Filter "Name like 'v*'"
Get-WmiObject -Class Win32_Service -Filter "name LIKE 'vss%'"
It uses WQL for the filtering (% is wildcard)
Which ends up being run as
Get-WmiObject -Query "Select * From win32_service Where name Like 'vss%'"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With