Skip to main content

Posts

Showing posts from March, 2009

Sanitizing Get-LogonStatistics cmdlet data to view better Logon stats in Exchange 2007

If you have used the get-Logonstatistics cmdlet you will know that it’s a great tool for looking at who’s logged onto your Exchange server using Outlook but the results set that it returns can be a little awkward to use in a continuative way. This is way of saying there is a lot of noise in what is returned also because logons are happening at different times of the day if you are looking to log this information over a period of time so you can do statistical analysis of the data it can be a little difficult. So what this script does is first looks at sanitizing the data by only looking at the results from get-Logonstatistics that actually represent mailboxes and also reduces down each logon so it only shows one entry per IP/Client connection. To create files that can be used to look at logon statistics it records the results of each query in a daily file and uses some logic to find new logons and filter existing ones. How it works Like many of the scripts I post it uses a lot of d...

Creating Emails based on a Twitter feed / Friends timeline status updates

Continuing on from my previous post about posting your current Exchange calendar appointments as twitter status updates this script explores some more creative uses of the Twitter and Exchange 2007 API's. This script will read your current Twitter account details and grab your friend’s timeline and then create emails in your inbox (or other folder of choice) for each update in your friends twitter timelines (or the people your following). To match up the Received time of the email with the time the status update is posted on Twitter the script sets the necessary mapi properties to make the message appear that it was received at the same time as the status update was posted. To keep track of which updates have been created as email it downloads the latest feed and then on each run it uses Xpath to read the XML file and loads a hashtable which is used to ensure that no status update is created as an email twice. To access Exchange and create the messages in the inbox from the twitt...
All sample scripts and source code is provided by for illustrative purposes only. All examples are untested in different environments and therefore, I cannot guarantee or imply reliability, serviceability, or function of these programs.

All code contained herein is provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.