The PowerShell DSC Package resource requires a ProductId and the exact product name.
If you aren’t sure what product id or product name associated with the software you wish to install, you can try this method:
- Install the software manually on a similar target machine
- Open a PowerShell command prompt or the PowerShell ISE
- Run the following command:
Get-WmiObject Win32_Product
This command lists most of the installed software on the system. Find your target and record the ProductId and Name. They will need to match your DSC configuration exactly. Next, in your PowerShell DSC configuration, update the Package resource with the values you’ve discovered, e.g.
Package InstallSomeSoftware { Ensure = "Present" Path = "D:\DSC\SomeSoftware_v4.4.msi" Name = "Some Software" ProductId = "ad9b6775-28d2-4ef4-b2e3-58941ea51c26" Arguments = "/qn" DependsOn = "[Script]DownloadSomeSoftware" }
Also note that the Arguments should be whatever your software package requires to run a “silent install.”
Hope this helps!