I'm not a PowerShell expert, but I've read somewhere on the interwebs that Get-CimInstance should be used instead of Get-WmiObject.
Also, you are loading the entire database and filtering after the fact.
This script will bring only the wanted products and only the wanted columns (I've added Version for further filtering):
Get-CimInstance -ClassName Win32_Product -Filter 'Name like "%Microsoft .NET Core SDK%"' -Property Name,Version,IdentifyingNumber
I'm not a PowerShell expert, but I've read somewhere on the interwebs that
Get-CimInstanceshould be used instead ofGet-WmiObject.Also, you are loading the entire database and filtering after the fact.
This script will bring only the wanted products and only the wanted columns (I've added
Versionfor further filtering):