Analyzing Exchange Transaction Log Generation Statistics UPDATED

The script published by the Exchange Team (Analyzing Exchange Transaction Log Generation Statistics) requires an update when run on a system that does not use the en-US locale as Culture.

When the script analyses the saved log file information, a DateTime error is thrown:

Cannot convert value „21/05/2010“ to type „System.DateTime“

See the original blog post for examples: https://techcommunity.microsoft.com/t5/exchange-team-blog/analyzing-exchange-transaction-log-generation-statistics/ba-p/606394

The script utilizes the Get-UICulture cmdlet to fetch the culture settings required to have [DATETIME]::Parse() work as expected.

DateTime values are stored in the CSV file using the UICulture setting, but [DATETIME]::Parse() uses the local culture settings to parse values by default.

To check your settings in PowerShell, use the following cmdlets:

  • Get-Culture
  • Get-UICulture

Links


Entdecke mehr von Granikos GmbH & Co. KG

Melde dich für ein Abonnement an, um die neuesten Beiträge per E-Mail zu erhalten.

Kurz-URL | Short URL: https://granikos.eu/go/xACY

Entdecke mehr von Granikos GmbH & Co. KG

Jetzt abonnieren, um weiterzulesen und auf das gesamte Archiv zuzugreifen.

Weiterlesen