I have a script that collects data from workstations like computer type, printers, software, etc.
I am trying to filter out specific vendors from the software section but it does not seem to be working. Here is the code and any ideas?
Write-Host "Gathering Installed Software"
foreach ($app in (Get-WmiObject -Class win32_Product -ComputerName $computerName))
{
if ($app.Vendor -notmatch "Google", "Oracle*", "Microsoft*", "Citrix*", "Adobe*")
$row = $softwareTable.NewRow()
$row["ComputerName"] = $computerName
$row["ApplicationName"] = $app.Name
$row["ApplicationVendor"] = $app.Vendor
$row["ApplicationVersion"] = $app.Version
$row["ApplicationInstallDate"] = $app.InstallDate
$row["ApplicationInstallPath"] = $app.InstallSource
$softwareTable.Rows.Add($row)
}