Archive for October 2010

Beware of the BIT!

I’ve been spending the past week or so changing a colleagues scripts into SSRS reports so we can automate things a bit better. During some QA checks I noticed that I was coming out with higher counts on one section of the report. Much to my frustration the two queries looked identical and I had […]

Send email with Powershell

There’s two methods I often use for sending email in my Powershell scripts. The first uses the Send-MailMessage cmdlet and the second resorts to using the .Net Framework. Why do I use two methods? Well…. ?View Code POWERSHELLSend-MailMessage -To ‘me@here.com’ -From ‘sender@here.com’ -Subject ‘Test Message’ -Body ‘This is a test message.’ -SmtpServer ‘smtp.server.com'; The Send-MailMessage […]

Tweet-SQL: Storing searches in a table

A Tweet-SQL user emailed me recently about how to store results from the tweet_src_search procedure in a table. Twitter returns an atom feed for search requests so you have to handle this slightly differently compared to other Tweet-SQL procedures. Here’s a quick walk-through of how we can get Twitter search results into a database table […]

Powershell… Making it difficult for yourself!

Today I was reading the post Powershell is Really Easy… If you know what you’re doing and it really struck a chord with me. A few days ago I discovered the ConvertTo-HTML cmdlet that can easily convert Powershell objects into formatted html pages. As I’ve written a few scripts producing html output, by sticking together […]