Monday, March 3, 2014

Exchange 2010 - Outlook Client versions Report

So, I have been investigating remoting as a method of speeding up the processing of long and tedious reports. My first (and probably best) test case, is to read each of the various RPC Client Access Logs on all the Client Access Servers in my Org and generate this report.


  1. Exchange be installed in exactly the same location on all the servers. 
  2. Remoting be enabled on each server. 

$ScriptBlock =  {
 Param (
 if ($NumberofHours -gt 0) { $NumberofHours = $NumberofHours * -1}
 $LogPath = 'd:\Program Files\Exchange\Logging\RPC Client Access\*.LOG'
 $csvHeader = "date_time","session_id","seq_number","client_name","organization_info","client_software","client_software_version","client_mode","client_ip","server_ip","protocol","application_id","operation","rpc_status","processing_time","operation_specific","failures"
 $today = (Get-Date).AddHours($NumberofHours)
 if (Test-Path $LogPath) {
  $Logs = get-childitem -path $LogPath | ?{$_.lastwritetime -ge $today}
  $logs | %{Import-Csv -Header $csvHeader -Path $_}  | ?{$_."Client_Software" -eq "outlook.exe" -and $_."client_name" -ne $null -and $_."client_name" -ne "client_name"}# | select -Unique Client_Name,Client_Software_Version 

$servers = get-ClientAccessServers
$csv = Invoke-Command -ComputerName $servers -ScriptBlock $ScriptBlock -ArgumentList -1

This script builds a script block. This script block reads the log file as a CSV, filtering out all the connections where Outlook connected and the client name is populated. Now, you can run query to get an idea of the various versions of Outlook that are still connecting in your environment.  For example, this will create a hash table where each Client is mapped to a single copy of Outlook.

$ClientTable = @{}
$csv | ?{!$ClientTable[$_.client_name]} | %{$ClientTable[$_.client_name] = $_.client_software_version}

$ClientTable["/o=Excgange/ou=Exchange Admin Grou/...Recipients/"]  -> returns  14.0.7113.5005

No comments:

Post a Comment