I'm trying to get my head around following problem. I'm trying to receive from our 2016 Terminalservers the currently installed Edge Version. But when I'm running to code below powershell shows me that version 95.0.1020.30 is installed.
$Servers = get-content C:\users\xxx\Documents\Servers.txt
$servers|foreach-object -parallel {
Get-Ciminstance -ComputerName $Servers -Class Win32_Product | where {$_.Name -Like "*Edge*"} | foreach {$_.Version}
}
Now to the fun part: When I'm using the usual foreach loop it gives me the correct version back.
$Servers = get-content C:\users\cma-admin\Documents\Servers.txt
foreach($server in $servers){
Get-Ciminstance -ComputerName $Server -Class Win32_Product | where {$_.Name -Like "*Edge*"} |
foreach {$_.Version}
}
I would love to use it with "-parallel" because it would be way quicker to get those information. I did crawl the mighty internet quite a lot, but I didn't find anything specific to this "error". I'm not quite sure if I'm using the foreach -parallel correctly.
Best regards,
Clay