The type initializer for 'System.Management.Automation.Tracing.PSEtwLog' threw an exception.

This post describes how to fix: The type initializer for 'System.Management.Automation.Tracing.PSEtwLog' threw an exception.

Background

I recently installed XIA Configuration on Windows Server 2008 and wanted to scan a Microsoft Azure tenant.  In order to do so, I first had to install the Azure PowerShell cmdlets.  This required WMF 5.0 which I downloaded and installed.

Error

I then tried to open PowerShell but it immediately closed.  When I tried to open PowerShell in a command prompt, I could see the error was

'The type initializer for 'System.Management.Automation.Tracing.PSEtwLog' threw an exception.'

Fix

After doing some research, I discovered I also needed to install .NET Framework 4.5.  PowerShell then opened successfully and I was able to install the Azure PowerShell cmdlets and run the scan.

Video

You can see this fix in the following video PowerShell does not open on Windows Server 2008:


Comments

Popular posts from this blog

LG TV This app will now restart to free up more memory

LG TV Clear All Browsing History Data

Excel Import CSV not using "Use First Row as Headers"