I'm making a script that finds all programs with names similar to "Microsoft Office S*" -or "Microsoft Office P*"
I got the code working while searching for one or the other, but not both at the same time. Some examples below:
WORKS
get-wmiobject Win32_Product | Where Name -like "Microsoft Office S*"| Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize
WORKS
get-wmiobject Win32_Product | Where Name -like "Microsoft Office S*"| Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize
DOESN'T WORK
get-wmiobject Win32_Product | Where Name -like ("Microsoft Office S*" -or "Microsoft Office P*")| Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize
DOESN'T WORK
get-wmiobject Win32_Product | Where Name -like ("Microsoft Office S*") -or Name -like ("Microsoft Office S*")| Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize