SOLVED

Exporting list of Outlook client versions

%3CLINGO-SUB%20id%3D%22lingo-sub-36383%22%20slang%3D%22en-US%22%3EExporting%20list%20of%20Outlook%20client%20versions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-36383%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20to%20export%20an%20inventory%20of%20outlook%20client%20versions%20used%20by%20our%20end%20users.%20Can%20some%20one%20please%20advice%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20tried%20using%26nbsp%3BGet-ConnectionByClientTypeDetailReport%20but%20it%20doesnot%20give%20Outlook%20versions.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-36383%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E2013%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E2016%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHybrid%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOutlook%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-36754%22%20slang%3D%22en-US%22%3ERe%3A%20Exporting%20list%20of%20Outlook%20client%20versions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-36754%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3E%3CFONT%20color%3D%22%23000000%22%3EThanks%2C%20Vasil.%20%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CFONT%20color%3D%22%23000000%22%3EPlease%20use%20the%20export%20button%20as%20described%20by%20Vasil%20to%20export%20any%20data%20from%20the%20usage%20reports%20at%20this%20point.%20%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CFONT%20color%3D%22%23000000%22%3EIn%20spring%202017%2C%20we%20will%20make%20new%20reporting%20APIs%20available%20that%20will%20allow%20you%20to%20programmatically%20access%20the%20information%20from%20the%20usage%20reports.%20Going%20forward%2C%20please%20use%20the%20APIs%20as%20the%20new%20usage%20reports%20will%20not%20be%20accompanied%20by%20PowerShell%20cmdlets.%3C%2FFONT%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EAnne%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-36707%22%20slang%3D%22en-US%22%3ERe%3A%20Exporting%20list%20of%20Outlook%20client%20versions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-36707%22%20slang%3D%22en-US%22%3E%3CP%3EAttached%20the%20powershell%20script%20as%20file%2C%20copy%2Fpaste%20and%20run%20the%20script%2C%20it%20should%20work.%20The%20error%20is%20due%20to%20the%20line%20breaks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-36611%22%20slang%3D%22en-US%22%3ERe%3A%20Exporting%20list%20of%20Outlook%20client%20versions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-36611%22%20slang%3D%22en-US%22%3E%3CP%3EI%20get%20the%20following%20errors%20when%20running%20this%20script%20-%20see%20attached%20file%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-36549%22%20slang%3D%22en-US%22%3ERe%3A%20Exporting%20list%20of%20Outlook%20client%20versions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-36549%22%20slang%3D%22en-US%22%3EThanks%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F3694%22%20target%3D%22_blank%22%3E%40NarasimaPerumal%20Chandramohan%3C%2FA%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-36547%22%20slang%3D%22en-US%22%3ERe%3A%20Exporting%20list%20of%20Outlook%20client%20versions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-36547%22%20slang%3D%22en-US%22%3E%3CP%3EUse%20the%20below%20EXO%20PowerShell%20script%2C%20here%20we%20use%20Search-MailboxAuditLog%20which%20has%20the%20client%20information.%20This%20method%20needs%20auditing%20to%20be%20enabled%20on%20all%20mailboxes%20and%20will%20be%20slower%20due%20to%20the%20audit%20log%20search.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%24UserCredential%20%3D%20Get-Credential%0A%24Session%20%3D%20New-PSSession%20-ConfigurationName%20Microsoft.Exchange%20-ConnectionUri%0Ahttps%3A%2F%2Foutlook.office365.com%2Fpowershell-liveid%2F%20-Credential%20%24UserCredential%20-Authentication%20Basic-%0AAllowRedirection%0AImport-PSSession%20%24Session%0A%0A%24mailboxs%20%3D%20Get-MailBox%20%0A%24mailboxs%20%7C%20Foreach-Object%7B%0A%24mailbox%3D%24_%0A%0ASearch-MailboxAuditLog%20-StartDate%20(%5Bsystem.DateTime%5D%3A%3ANow.AddDays(-2))%20-EndDate%20(%5Bsystem.DateTime%5D%3A%3ANow.AddDays(%2B1))%20-Operations%20MailboxLogin%20-Identity%20%24mailbox.UserPrincipalName%20-ShowDetails%7Cwhere-object%7B%24_.ClientInfoString-like%20%22*Client%3DMicrosoft.Exchange.Mapi%3B*%22%20-or%20%24_.ClientInfoString%20-like%20%22*Client%3DMicrosoft.Exchange..Autodiscover%3B*%22%20%7D%20%7Cselect%20LogonUserDisplayName%2CClientInfoString%2CLastAccessed%2CClientIPAddress%20-First%201%20%7Cfl%0A%7D%3C%2FPRE%3E%3CP%3EBelow%20is%20the%20sample%20output%20for%20a%20user.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20838px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F9466i86358AB4BADC5704%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22client%20version.png%22%20title%3D%22client%20version.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-36476%22%20slang%3D%22en-US%22%3ERe%3A%20Exporting%20list%20of%20Outlook%20client%20versions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-36476%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20shows%20licenses%2C%20but%20not%20user%20versions.%20Like%20it%20won't%20show%20you%20if%20the%20user%20is%20running%20Office%202013%20or%20Office%202016.%20That%20is%20what%20would%20be%20beneficial%20-%20to%20show%20what%20client%20version%20the%20user%20has%20installed.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-36469%22%20slang%3D%22en-US%22%3ERe%3A%20Exporting%20list%20of%20Outlook%20client%20versions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-36469%22%20slang%3D%22en-US%22%3E%3CP%3EGo%20to%20the%20O365%20admin%20portal%20-%26gt%3B%20Reports%20-%26gt%3B%20Usage%20-%26gt%3B%20Email%20app%20usage%20-%26gt%3B%20press%20the%20Export%20button.%20No%20way%20to%20get%20this%20report%20via%20PowerShell%20afaik%20(%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F210%22%20target%3D%22_blank%22%3E%40Anne%20Michels%3C%2FA%3E%26nbsp%3Bmight%20prove%20me%20wrong%20here).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20need%20even%20more%20details%20compared%20to%20what's%20shown%20in%20the%20report%2C%20down%20to%20the%20individual%20build%20number%2C%20you%20will%20have%20to%20browse%20the%20Audit%20logs%20and%20get%20the%20relevant%20data%20from%20them.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Deleted
Not applicable

Hi All,

 

I need to export an inventory of outlook client versions used by our end users. Can some one please advice?

 

i tried using Get-ConnectionByClientTypeDetailReport but it doesnot give Outlook versions.

7 Replies
Highlighted
Best Response
Solution

Go to the O365 admin portal -> Reports -> Usage -> Email app usage -> press the Export button. No way to get this report via PowerShell afaik (@Anne Michels might prove me wrong here).

 

If you need even more details compared to what's shown in the report, down to the individual build number, you will have to browse the Audit logs and get the relevant data from them.

Highlighted

This shows licenses, but not user versions. Like it won't show you if the user is running Office 2013 or Office 2016. That is what would be beneficial - to show what client version the user has installed.

Highlighted

Use the below EXO PowerShell script, here we use Search-MailboxAuditLog which has the client information. This method needs auditing to be enabled on all mailboxes and will be slower due to the audit log search.

 

$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri
https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic-
AllowRedirection
Import-PSSession $Session

$mailboxs = Get-MailBox 
$mailboxs | Foreach-Object{
$mailbox=$_

Search-MailboxAuditLog -StartDate ([system.DateTime]::Now.AddDays(-2)) -EndDate ([system.DateTime]::Now.AddDays(+1)) -Operations MailboxLogin -Identity $mailbox.UserPrincipalName -ShowDetails|where-object{$_.ClientInfoString-like "*Client=Microsoft.Exchange.Mapi;*" -or $_.ClientInfoString -like "*Client=Microsoft.Exchange..Autodiscover;*" } |select LogonUserDisplayName,ClientInfoString,LastAccessed,ClientIPAddress -First 1 |fl
}

Below is the sample output for a user.

client version.png

Highlighted
Highlighted

I get the following errors when running this script - see attached file

 

 

Highlighted

Attached the powershell script as file, copy/paste and run the script, it should work. The error is due to the line breaks.

Highlighted

Thanks, Vasil.

Please use the export button as described by Vasil to export any data from the usage reports at this point.

In spring 2017, we will make new reporting APIs available that will allow you to programmatically access the information from the usage reports. Going forward, please use the APIs as the new usage reports will not be accompanied by PowerShell cmdlets.

Thanks,

Anne