I have a powershell script that runs an exe to install the dotnet framework. This exe does not log to the console but can log to a file. I need to see the log in our deployment tool which will display the console.

I run the exe like this:

```
$process = Start-Process  "$exe" "/q /norestart /log $logFile" -passthru

```

Then I send the content of the logfile to the console like this:

```
get-content $logFile -tail 5 -wait

```

This works, but the script never ends. The -wait keeps waiting on new lines even after everything is done.

I've tried running get-content as a job, using Start-Job but then I can't get output to the console (as it's running).

Any ideas?