From c2665c2f104f9c72ce3a226f8f7087894acbeb5d Mon Sep 17 00:00:00 2001 From: dyoder Date: Thu, 29 Jul 2021 17:59:51 -0400 Subject: [PATCH] fix for older Powershell versions that don't have Get-ItemPropertyValue cmdlet --- Get-InstalledSoftware.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Get-InstalledSoftware.ps1 b/Get-InstalledSoftware.ps1 index 91824e9..a7e5985 100644 --- a/Get-InstalledSoftware.ps1 +++ b/Get-InstalledSoftware.ps1 @@ -31,7 +31,7 @@ Function Test-ItemProperty { Function Get-ItemPropertyInfo { param([Parameter(Mandatory=$true)][string]$Path,[Parameter(Mandatory=$true)][string]$Name) If ( Test-ItemProperty -Path $Path -Name $Name ) { - $retval = Get-ItemPropertyValue -Path $Path -Name $Name + $retval = $(Get-ItemProperty -Path $Path).$Name $retval = $retval -replace ",", " " ## Additional processing for specific properties