GPO installation failed

The installation and/or removal of GPO pushed software can sometimes fail with error %%1274. This behavior can occur if the network has not started up or is starting up too slow for the machine boot process. Apply/enable following GPO to the failing computer:

Computer Configuration -> Policies -> Administrative Templates -> System -> Logon -> Always wait for the network at computer startup and logon
Computer Configuration -> Policies -> Administrative Templates -> System -> Group Policy -> Startup policy processing wait time

This should solve the problem. You need to try out which processing wait time works. some people reported that 30 seconds is enough, others 120 seconds.

If not, have a look at https://serverfault.com/questions/44257/group-policy-installation-failed-error-1274

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/

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.