1

I am wondering how to find and select the guid of programs not listed in

gcim win32_product

I am hoping to be able to select the name and the product id / guid and then use them for a second part. What I have so far:

Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty 

The guid is listed many times but I do not now how to "grab" or select it from in between the brackets

adobesmurf
  • 33
  • 1
  • 7
  • 2
    http://stackoverflow.com/questions/29711637/powershell-use-list-of-installed-programs-to-get-information-about-a-specific-pr and http://stackoverflow.com/questions/2246768/finding-all-installed-applications-with-powershell and http://stackoverflow.com/questions/31712686/how-to-check-if-a-program-is-installed-and-install-it-if-it-is-not and https://gallery.technet.microsoft.com/scriptcenter/Get-RemoteProgram-Get-list-de9fd2b4 – TessellatingHeckler Mar 08 '17 at 03:10
  • @TessellatingHeckler thanks for the help those helped point me in the right direction I wasn't using get-ItemProperty properly/ fully. – adobesmurf Mar 09 '17 at 01:37

1 Answers1

1

I was able to figure it out, its slightly crude but it display the information I needed.

function Get-Guid
{
Param(
[parameter(Mandatory=$true)]
[string]$Name
)
$path = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*'
Get-ItemProperty -Path $path | Where-Object {$_.DisplayName -like "*$name*"} | select Displayname, ModifyPath
}
adobesmurf
  • 33
  • 1
  • 7