Welcome!  English (US) Language Switcher

Adding tasks from Powershell

selan Pro says:

If you do any work on Windows servers, you probably have used Powershell. Here is a simple Powershell function that will allow you to easily add tasks to RTM from the command line.

Add this function to your Powershell profile, substituting the appropriate values for your email.

function rtm($smartadd) {
Send-MailMessage -from %your-from-email% -to %your-rtm-email%@rmilk.com -subject "$smartadd" -smtpserver %your-email-server%

You can then call the rtm function from the Powershell command line. It takes one parameter, which is the Smart Add description of your task, in double quotes.

For example,
> rtm "Post my RTM tips and tricks !1 ^tomorrow"

Posted at 7:47pm on November 12, 2012

axehandle says:

I've recently ended up managing a bunch of Windows Server boxes, but I don't know PowerShell yet. How do I set my SMTP or mail server credentials?

Posted 2 years ago

martinvilange says:

@selan: That's very helpfull. Thank you.

@axehandle: Look at http://blogs.msdn.com/b/rkramesh/archive/2012/03/16/sending-email-using-powershell-script.aspx

Posted 2 years ago

emily (Remember The Milk) says:

Hi selan,

Thanks for sharing this -- you're this week's Tips & Tricks Tuesday winner. :) We've upgraded your Remember The Milk account with a year of Pro.

Posted 2 years ago

Log in to post a reply.