Tips & Tricks Tuesday: Adding tasks from PowerShell
Calling all systems admins and command-line lovers! This week’s tip, shared by selan, provides a quick way to add tasks while using Windows PowerShell. It can be handy when you want to add a server task, or anything else that comes to mind while you’re knee-deep in SQL statements.
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”
Thanks for sharing this tip, selan! You’re our Tips & Tricks Tuesday winner this week.
Do you have a suggestion for our weekly Tips & Tricks post? Got an interesting set-up or idea? Head over to the Tips & Tricks forum, add a new topic, and let us know how you use Remember The Milk. Each week we’ll give away a 1 year Pro account to the user whose idea inspires the Tips & Tricks Tuesday blog post for that week.