Get MessageTrackingLog in Powershell

In this example we will get all failed messages in specific period:

Get-MessageTrackingLog -Start "7/15/2019 08:00 AM" -End "7/15/2019 03:00 PM" -ResultSize "Unlimited" -EventId FAIL | Select EventId,Source,TimeStamp,Sender,{$_.Recipients},MessageSubject | Export-Csv mail_fail.csv

Command inspired by https://anandthearchitect.com/2012/07/06/exchange-2010-how-to-export-message-tracking-results-to-excel-sheet/

Remove GPO installed software from machine

Here a simple step to remove GPO instaled software from your machine and make it reapply the GPO:

  • Remove software from Control Panel -> Software
  • Find and the clear the software UID from
    HKLM\Software\Microsoft\Windows\Current Version\Group Policy\AppMgmt
  • OR delete HKLM\Software\Microsoft\Windows\Current Version\Group Policy completely
  • open terminal/cmd as administrator and execute
    gpupdate /force
  • and last, reboot the desktop

After a reboot the GPO should have been (re)applied and the software been installed.

Activate Windows Server in Powershell/Command

First check editions which can be upgraded to from evaluation:

# Dism /Online /Get-TargetEditions

Then launch the activation process with:

# Dism /online /Set-Edition:ServerStandard /AcceptEula /ProductKey:12345-67890-12345-67890-12345

Please remember to replace “Set-Edition” and “Productkey” values with your desired ones.