Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Running mailto from powershell

Reply
 
Old 03-06-2007   #1 (permalink)
JMinahan


 
 

Running mailto from powershell

I use the following command to have the default email program create an email:

start mailto:jasonm@charlesjones.com

I have been unable to use this in Powershell. Do you know any paths or
things that need to be added to my profile to use this?


My System SpecsSystem Spec
Old 03-06-2007   #2 (permalink)
Brandon Shell


 
 

Re: Running mailto from powershell

If you install the PSCX you can do this no problem as its include a CMDLet
called Start-Process and sets and Alias start.

If you dont want to install that snap-in you can add this function and alias
it

function Start-Process {
Param([string]$Filename,[string]$ArgumentString =
[System.String]::Empty)
$si = New-Object System.Diagnostics.ProcessStartInfo
$si.Filename = $Filename;
if($ArgumentString){$si.Arguments = $ArgumentString};
$si.Filename, $si.Arguments;
[System.Diagnostics.Process]::Start($si);
}
Set-Alias start Start-Process

--
Brandon Shell
---------------
Stop by my blog some time
Blog: http://www.bsonposh.com/
PSH Scripts Project: www.codeplex.com/psobject
--------------------------------------

"JMinahan" <JMinahan@discussions.microsoft.com> wrote in message
news:5C5D750D-DDFF-4748-A6C3-3E72BC416AAA@microsoft.com...
>I use the following command to have the default email program create an
>email:
>
> start mailto:jasonm@charlesjones.com
>
> I have been unable to use this in Powershell. Do you know any paths or
> things that need to be added to my profile to use this?
>


My System SpecsSystem Spec
Old 03-06-2007   #3 (permalink)
Lance


 
 

Re: Running mailto from powershell

On Mar 6, 10:10 am, JMinahan <JMina...@discussions.microsoft.com>
wrote:
> I use the following command to have the default email program create an email:
>
> start mailto:jas...@charlesjones.com
>
> I have been unable to use this in Powershell. Do you know any paths or
> things that need to be added to my profile to use this?


Another option for you, should you decide you want to mail directly
from PowerShell instead of starting up a separate attended process:

NetCmdlets: http://geekswithblogs.net/lance/arch...28/107539.aspx

Lance

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Running PowerShell script from within an MSI? PowerShell
Re: how to see arguments with powershell when running winrs PowerShell
Re: Running python scripts under PowerShell PowerShell
Running WMI Query in without Powershell or VBS PowerShell
Scheduling running of PowerShell Scripts PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46