How do I get PowerShell to wait until the Invoke-Item call has finished? I\'m invoking a non-executable item, so I need to use Invoke-Item to open it.
Just use Start-Process -wait, for example Start-Process -wait c:\image.jpg. That should work in the same way as the one by @JaredPar.
Start-Process -wait
Start-Process -wait c:\image.jpg