Question: How can I find the GUID of an MSI package? I would like to script the removal of a program on a large number of desktops by using: 

> 
> msiexec.exe /x *ProductCode*
> 
> 
> 

Any reason why this would not work for any applications listed in "Add/Remove Programs?"

Answer: 
In Powershell you can query wmi for installations

```
$program = Get-WmiObject -class Win32_Product | ? {$_.Name -eq "Java Auto Updater"} 
$program.IdentifyingNumber #IdentifyingNumber is the guid

```

example to repair

```
msiexec /fa $program.IdentifyingNumber

```
[Revision Number Summary Property](http://msdn.microsoft.com/en-us/library/aa371255%28VS.85%29.aspx):

> 
> [T]he Revision Number Summary property
>  lists the product code GUIDs [...]
> 
> 
>