Recently our company upgraded their MRP software several versions. Unfortunately the version being so old, required “touching” each machine to uninstall old client and install new client software. This worked fine, but going by physical locations doesn’t always cover all computers.
I took care of most of the most important computers and went by name of the rest, but knew there were several that were missed. I ended up pulling all the AD computer names into an array and running this command below to check the version of the executable to confirm it was upgraded or not. This script was very effective and ran very quickly:
PS C:\users\jeff\Google Drive\Personal_\Technical\codePlayground> foreach ($i in $computers.name) { invoke-command -ComputerName $i -Credential $cred -ScriptBlock { dir 'C:\Program Files (x86)\JobBOSS\jobboss.exe' } }