I want to write a Powershell script to invoke an executable on a remote machine by its path and then wait for it to finish running. This is what I've got so far:

```
$executable = "C:\Temp\example.exe"
$session = New-PSSession -ComputerName VIRTUALMACHINE
$job = Invoke-Command -Session $session -ScriptBlock {$executable} -AsJob
Wait-Job -Job $job

```

Instead of running C:\Temp\example.exe, the remote machine runs the string $executable - not exactly what I was going for here!

How do I fix this?