March 10, 2009 11:17 by
dana
Prior to Exchange 2007, one of the commonly used features was the ability to view a list of all mailboxes along with their size and the number of items in the mailbox. This functionality has been removed from the Management Console in Exchange 2007. Not to fear, though, all is not lost. The following command shell script can be used to retrieve a list of all mailboxes on a server along with the mailbox size and the number of items.
Get-MailboxStatistics –Server <server name> | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount
Replace <server name> with the name of the Exchange 2007 server to query.
March 3, 2009 17:33 by
dana
SQL Server Integration Services offers an easy way to send email in your packages, but out-of-the-box it only supports sending plain text email. Below is a script that can be used to send HTML email.
'// Example :
'// SendMail("recipient@theiremail.com, _
'// alerts@mycompany.ca, _
'// "I can now send HTML Email :)", _
'// "<B>Yipee!</B> I can send email messages using HTML formatting from SSIS.", _
'// True)
Private Sub SendMail( _
ByVal SendTo As String, _
ByVal From As String, _
ByVal Subject As String, _
ByVal Body As String, _
Optional ByVal IsBodyHtml As Boolean = True, _
Optional ByVal SMTPServer As String = "localhost", _
Optional ByVal UserName As String = "", _
Optional ByVal Password As String = "", _
Optional ByVal Domain As String = "", _
Optional ByVal Attachments As String = "")
Dim oMessage As System.Net.Mail.MailMessage
Dim mySmtpClient As System.Net.Mail.SmtpClient
oMessage = New System.Net.Mail.MailMessage(From, SendTo, Subject, Body)
oMessage.IsBodyHtml = IsBodyHtml
'//Attachments
If Not String.IsNullOrEmpty(Attachments) Then
Dim sFiles() As String
Dim sFile As String
sFiles = Split(Attachments, ";")
For Each sFile In sFiles
If Not String.IsNullOrEmpty(sFile) Then
oMessage.Attachments.Add(New Net.Mail.Attachment(sFile))
End If
Next
End If
mySmtpClient = New System.Net.Mail.SmtpClient(SMTPServer, 25)
If UserName = "" Then
mySmtpClient.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials
Else
mySmtpClient.Credentials = New System.Net.NetworkCredential(UserName, Password, Domain)
End If
mySmtpClient.Send(oMessage)
End Sub
February 18, 2009 22:59 by
dana
Ok, I admit that I like statistics. Numbers are interesting to me. Take the number 4 for instance...ok, nevermind. What I really want to talk about is the Google Zeitgeist from 2008, especially as it relates to Canada. For the uninitiated, Google Zeitgeist is a collection of information that Google makes available regarding what is popular according to search trends. Shown below is a list of the top 10 most popular searches made by Canadians in 2008.
Most Popular
- facebook
- youtube
- lyrics
- weather
- games
- google
- hotmail
- yahoo
- map
- canada
Source: http://www.google.com/intl/en/press/zeitgeist2008/#top
Interesting, eh? I'm actually quite fearful of what this tells us about ourselves! Can it be that there are that many Canadians that still need to SEARCH for facebook? How about Google...there are a whole lot of people out there using Google to search for Google. Sigh... Some may find that depressing, I call it job security. :)