can someone tell me why the following command has different results in Powershell and Powershell_ISE?
$Software = "*Native*SQL*"
$Result = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object {$_.DisplayName -like $Software}
Powershell: $Result provides the desired data
Powershell_ISE: $Result does not provide any data
For the test I opened the script on my support machine in the ISE and wondered why the output could not find a SQL Native Client even though it appeared in the registry.
On another computer it works fine in both environments.
I use this in a group policy for software distribution and am wondering why only about 250 out of 400 computers install software.
OS: Windows 10 - 20H2 an Windows 10 1909
Best regards!