Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1408
  • Last Modified:

Get-logonstatistics

I see this is a useful command to run to gain knowledge about clients.

But when I run get-logonstatistics -identity me@mydomain.com | fl

I seem to get loads of entries, as in lots of different times, do they refer to different times I opened Outlook? Is there a way to add a switch just to get the latest entry?

Also, there is an entry for "latency". Does this mean latency from the machine where I ran Powershell or latency between the client and the mailbox server?
0
Joe_Budden
Asked:
Joe_Budden
  • 3
  • 2
1 Solution
 
AmonPereiraCommented:
Use the same command but after | type FT instead of FL.

Doing this it will show you all the options and you might add it to your next query.

0
 
Joe_BuddenAuthor Commented:
Well that just lists loads of different Logon times, some only a few minutes from each other..not sure why that is?

Also - do you know what the "latency" field refers to?
0
 
OctInvCommented:
To answer one question, I think the latency refers to network performance, or lack of it for RPC.

As for the actual cammand there are amny attributes you can report on, such as:

Get-LogonStatistics "firstname Surname" | Format-Table username,clientipaddress,logontime

Personally I prefer to use the get-mailboxstatistics cmdlt as it can produce more useful information:

Get-MailboxStatistics -Database "ExchangeServer\databse" | Sort -Property TotalItemSIze | ft DisplayName, @{expression={$_.totalitemsize.value.ToMB()};label="Mailbox Size(MB)"}, itemcount, lastlogontime, lastlogofftime,lastloggedonuseraccount
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
OctInvCommented:
It's late and my spelling is terrible ;-)
0
 
Joe_BuddenAuthor Commented:
Thanks

This morning I had an issue where if I checked get-logonstatistics latency for a user, the latency was listed as about 800. The user in question was saying that his Outlook was unresponsive.

However, if I ran a Ping from the same Exchange server I ran the get-logontstatistics command from, the result was about 20ms.

Do you know what could cause the difference?
0
 
OctInvCommented:
This could be any number of reasons and without knowing anything about your environment it is very difficult to comment. I would certianly start by using a performance monitoring tool to get the average RPC latancy reading. Also try other tools such as EXBPA. Is this issue just with one mailbox? If so is there something on the client machine that is submitting high RPC requests to Exchange? Some add in to Outlook maybe, or even a mobile device...? Really need more information.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now