Wait for Programs

PowerShell launches Windows applications asynchronously. It only waits for the console application so you should use -wait if you want to launch a Windows application and wait for it until it finishes:

Start-Process notepad -wait

Twitter This Tip! ReTweet this Tip!


Posted Feb 25 2010, 08:00 AM by ps1
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.