Windows – what version of PS is on the machines?

function GET-PSVERSIONINFO ([string[]] $TargetComputers) {   $HKLM = [Microsoft.Win32.RegistryHive]::LocalMachine  $PowerShellRegistry=”SOFTWARE\Microsoft\PowerShell”  $KeyItem = “\PowerShellEngine”  $Version = “PowerShellVersion”    $OldErrorActionPreference = $ErrorActionPreference  $ErrorActionPreference = “SilentlyContinue”#  if I cannot connect, don’t show the error, just continue onto the next one.   foreach ($computer in $TargetComputers)  {    $available = Test-Connection -ComputerName $computer -Quiet -Count 1    if ($available)  {     $psVersions=$null    …

0