Thank you for the replies.
Alexander - I tried -Wait but it didn’t work. From the looks of it, that cmdlet was not introduced until PowerShell 3.0. I am doing this in v2.0 since all of our workstations are running Windows 7. I read a little bit about the Start-Process command, but haven’t tried it yet.
Don - I had previously tried putting Restart-Computer in the { } in the following format and it didn’t work.
if (([bool] ($version)-eq $true)-and(($version)-ne $ActVer)) {Invoke-Expression “\Server\Folder\Uninstall.exe /silent” | Start-Sleep -s 20 Restart-Computer}
I just changed it to read exactly as you recommended and that worked perfectly! Thanks! I have since changed it to the following because I didn’t like defining a specific wait time before the reboot. I don’t want the wait time to be too short or too long.
if (([bool] ($version)-eq $true)-and(($version)-ne $ActVer)) {
$Job = Start-Job {Invoke-Expression “\Server\Folder\Uninstall.exe /silent”}
Wait-Job $Job
Receive-Job $Job
Restart-Computer
Thanks for getting me pointed in a better direction!