Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Comparison of PowerShell where-object filtering and WQL syntax filtering

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

First, take a look at where-object filtering:

Get-WmiObject-Class Win32_Product-ComputerName. | | Where-Object-FilterScript {$_ .Name-eq "Microsoft .NET Framework 2.0"} | Format-List-Property * |

Here are two formats for WQL syntax filtering (one is regular, the other is escape)

Get-WmiObject-Class Win32_Product-ComputerName. -Filter "Name='Microsoft .NET Framework 2.0'" | Format-List-Property * Get-WmiObject-Class Win32_Product-ComputerName. -Filter Name` = `'Microsoft` .NET`Framework`2.0` | Format-List-Property *

You can also follow the official Wechat account below for more information.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report