As an alternative there is a start-process cmdlet in the PowerShell Community
Extensions
--
Richard Siddaway
Please note that all scripts are supplied "as is" and with no warranty
Blog:
http://richardsiddaway.spaces.live.com/
PowerShell User Group:
http://www.get-psuguk.org.uk
"Brandon Shell" wrote:
> Use System.Diagnostics.ProcessStartInfo and pass to
> System.Diagnostics.Process. This gives you a little more control of the
> process and its properties.
>
> $StartInfo = new-object System.Diagnostics.ProcessStartInfo
> $StartInfo.FileName = "outlook.exe"
> $StartInfo.Arguments="/safe"
> $StartInfo.LoadUserProfile = $false
> $StartInfo.UseShellExecute = $false
> $StartInfo.WorkingDirectory = (get-location).Path
> $proc = [System.Diagnostics.Process]::Start($StartInfo)
>
> Some good info here
> http://blogs.msdn.com/powershell/arc...owershell.aspx
>
> <andy@nodisabilities.com> wrote in message
> news:1184972219.099933.109360@i38g2000prf.googlegroups.com...
> >I am trying to figure out how to start a process with parameters.
> >
> > For example I can do [System.Diagnostics.Process]::Start("outlook")
> > and Outlook launches.
> >
> > I would like to do [System.Diagnostics.Process]::Start("outlook /
> > safe")
> >
> > But I get the following error
> >
> > PS > [System.Diagnostics.Process]::Start("outlook /safe")
> > Exception calling "Start" with "1" argument(s): "The system cannot
> > find the file specified"
> > At line:1 char:36
> > + [System.Diagnostics.Process]::Start( <<<< "outlook /safe")
> >
> > Thanks
> >
> > Andy
> >
>
>