Hi, I am very new to Powershell. I am trying to execute a backkup application in a try/catch block as a foreground process. When I run the following commands in Powershell it appears to spawn the process as a background process and continues to next line of the script without waiting for the exe to complete. I need the script to wait for the exe to complete. Here is a snippit of the script:
- Backup C: drive to H:\Backup
$exe = 'C:\Program Files (x86)\Snapshot\snapshot.exe'
& $exe C: H:\Backup
Thanks in advance for your help,