I'm new to StackOverflow so forgive me if I've done anything wrong.
Basically what I'm trying to do is use PowerShell or just the basic command line to search for a programs product code then use that code to uninstall that program. I have basically zero knowledge of how PowerShell works, so I'm not even sure if this is possible.
I found this code that searches for product code:
wmic product where "Name like '%(name)%'" get IdentifyingNumber
It returns something like this:
IdentifyingNumber {EC93F20F-825C-4828-8EB9-E4C93BD0A420}
Is there any way that that number can be pulled and put into this command?:
MsiExec.exe /qn /norestart /X{EC93F20F-825C-4828-8EB9-E4C93BD0A420}
Thank you for your help!