TenBrink Tech Technology | Life

18Apr/07

VS 2005 R2 SP1 RC (enough acronyms for you?)

In what is possibly the worst product name ever, Virtual Server 2005 R2 SP1 (RC) is online and can be downloaded here. This is a release candidate build, not RTM code.

  • Share/Bookmark
18Apr/07

Exchange Server 2007 Update 1

In the very cool department, today sees the first Update to Microsoft Exchange Server 2007 posted to the download site. You can see the list of issues fixed in KB 930809, and remember to always patch safe – test in a lab before deploying to production.

If you want some more information about the update methodology on Exchange 2007, see the blog post by the Exchange Team earlier.

  • Share/Bookmark
18Apr/07

Culture of Trust

If the security group at your place of work queried you for your password, would you give it to them?

Would you give them unfettered access to your files, your accounts, your identity? Would you let them roam the Internet, send emails, compose files, all the while with your name on the fingerprints?

And who controls the auditing systems? They do, of course.

Doesn't this sound like a supreme WTF?

Well, it's reality here at work as well, as that is exactly what

  • Share/Bookmark
16Apr/07

Dillon’s Disappearing Act

Many have wondered about where I've been and what I've been doing not keeping up on this blog. Well, the past couple months have been a whirlwind of activity. I got married to my wonderful now-wife Andrea, continue to juggle multiple projects at work, and find a little time here and there to tinker with Exchange, SharePoint, and System Center – all while still maintaining this great personality.

On the Exchange front, let's catch up by grabbing some of the links out of my feed reader of interest lately that you may have missed.

How about some code, recently written to scan all of the public folders and return items with the word "shark" (for this example) in the body? You'll have to modify to get your own reporting style, I've provided mine.

Public Function FolderTreeEnum(Optional ByVal objFolder As Outlook.MAPIFolder = Nothing) As Outlook.MAPIFolder

Dim objApp As Outlook.Application

Dim objNS As Outlook.NameSpace

Dim colStores As Outlook.Folders

Dim objStore As Outlook.MAPIFolder

Dim colFolders As Outlook.Folders

Dim objResult As Outlook.MAPIFolder

Dim I As Long

 

On Error Resume Next

objApp = CreateObject("Outlook.Application")

objNS = objApp.GetNamespace("MAPI")

colStores = objNS.Folders

 

If objFolder Is Nothing Then

'If objFolder is not passed, assume this is the initial call and cycle through stores

For Each objStore In colStores

objResult = FolderTreeEnum(objStore)

' Logging stuff

Console.WriteLine(objStore.FullFolderPath & vbTab & objStore.Items.Count & vbTab & objStore.Folders.Count)

If Not objResult Is Nothing Then FolderTreeEnum = objResult

Next

Else

colFolders = objFolder.Folders

'Cycle through the sub folders with recursive calls to this function

For Each objFolder In colFolders

objResult = FolderTreeEnum(objFolder)

 

' Logging and eval

Console.WriteLine(count & vbTab & objFolder.FullFolderPath & vbTab & objFolder.Items.Count & vbTab & objFolder.Folders.Count)

My.Application.Log.WriteEntry(count & vbTab & objFolder.FolderPath & vbTab & objFolder.Items.Count & vbTab & objFolder.Folders.Count, TraceEventType.Information, 1)

count = count + 1

GetItems(objFolder)

 

If Not objResult Is Nothing Then FolderTreeEnum = objResult

Next

End If

 

objResult = Nothing

colFolders = Nothing

objNS = Nothing

objApp = Nothing

End Function

 

Private Sub GetItems(ByVal objFolder As Outlook.Folder)

Dim items As Outlook.Items = objFolder.Items

Dim TransCount As Integer = 0

 

For Each item As Object In items

Dim strBody As String = item.body

If InStr(strBody, "transmission", CompareMethod.Text) Then

Console.WriteLine(True)

TransCount = TransCount + 1

End If

Next

 

My.Application.Log.WriteEntry(objFolder.FolderPath & vbTab & TransCount, TraceEventType.Information, 2)

 

End Sub

Some of the code comes complimentary of here, an excellent source of MAPI/VB code for messaging.

More to come soon, and I'll keep up to date for certain.

  • Share/Bookmark