Posts

Showing posts from September, 2018

Test WMI Query Connection PowerShell

Image
In this post, I describe a quick way to test a WMI connection with a query run using PowerShell.  This can be done from both local and remote machines. Local Machine Open PowerShell and run the following example command: Get-WmiObject -query "SELECT * FROM Win32_OperatingSystem" You can replace the query parameter value with other WMI queries. Remote Machine To test a WMI connection to a remote machine, open PowerShell and run the following example command, replacing the ComputerName parameter value with the appropriate machine name: Get-WmiObject -query "SELECT * FROM Win32_OperatingSystem -ComputerName MachineName wbemtest You can also test WMI by running wbemtest (Start > Run > wbemtest). Press the Connect button, then the Connect button again, then the Query button: Paste SELECT * FROM Win32_OperatingSystem into the Enter Query textbox, then press the Apply button to see the Query Result : This can also be used to test WMI on remote

HTTP Error 401.2 - Unauthorized IIS You are not authorized to view this page due to invalid authentication headers

Image
This post describes how to fix the error for web applications in IIS: HTTP Error 401.2 - Unauthorized You are not authorized to view this page due to invalid authentication headers. Cause This error can occur when you attempt to access an IIS web application and the Windows Authentication settings in IIS have been incorrectly configured. Resolution To resolve the issue, browse to the web application in IIS, go to Authentication and ensure Windows Authentication is enabled: Next, with 'Windows Authentication' selected, press 'Providers...' in the right hand Actions pane, then check that both 'Negotiate' and 'NTLM' are present:

PowerShell does not open on Windows Server 2008 R2

Image
This post describes one way to fix the issue when PowerShell does not open on Windows Server 2008 R2. Issue On Windows Server 2008 R2, after installing WMF 5.0, PowerShell does not open. Pressing the shortcut results in the PowerShell window briefly displaying then immediately disappearing. If you try to run PowerShell from a command prompt, you will see the error "The type initializer for 'System.Management.Automation.Tracing.PSEtwLog' threw an exception. Resolution To resolve the issue, install the Microsoft .NET Framework 4.5. Video YouTube link:  PowerShell does not open on Windows Server 2008 R2 Related Posts -  WARNING: Unable to resolve package source 'https //www.powershellgallery.com/api/v2' -  .NET Framework has not been installed because a certificate chain could not be built to a trusted root authority -  A file that is required cannot be installed because the cabinet file has an invalid digital signature. This may indicate that