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.
Pipe your command to Out-Null.