Hi,
I'm trying to create a custom fact to get the installed software using powershell command in windows as follows...
PS Command:-
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | where{$_.DisplayName -and $_.displayname -notmatch 'Update'} | Select-Object DisplayName, DisplayVersion | ForEach-Object {Write-Host $_.DisplayName"="$_.DisplayVersion}
Output:-
7-Zip 15.14 = 15.14
ActiveState ActiveTcl 8.4.20.0 = 8.4.20.0
Microsoft .NET Framework 4 Client Profile = 4.0.30319
Microsoft .NET Framework 4 Extended = 4.0.30319
Notepad++ = 6.9.1
Microsoft .NET Framework 4 Extended = 4.0.30319
Puppet = 3.8.7
Microsoft Visual C++ 2012 Redistributable (x86) - 11.0.61030 = 11.0.61030.0
Microsoft .NET Framework 4 Client Profile = 4.0.30319
MSXML 4.0 SP2 Parser and SDK = 4.20.9818.0
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.17 = 9.0.30729
VC9.0 SP0 Debug CRT DLLs = 1.0.0
Microsoft Visual C++ 2012 x86 Additional Runtime - 11.0.61030 = 11.0.61030
Microsoft Visual C++ 2012 x86 Minimum Runtime - 11.0.61030 = 11.0.61030
Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219 = 10.0.40219
ActivePerl 5.16.3 Build 1603 = 5.16.1603
i have created a powershellscript like getinstalledlist.ps1 with above command and placed in facters.d folder.
When i run puppet agent -t , i get the following error.
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse inline template: `@7_zip_15_14 .
Can someone help me to get this going?
Thanks & Regards,
Harish Kothuri