Tag: How to

Fast event log search in PowerShell with the FilterHashtable parameter

In my last post, I showed you how to display and find specific events with the Get-WinEvent cmdlet. Whereas you can filter event messages easily with the Where-Object cmdlet, using the Data key from the FilterHashtable parameter is much faster. Contents of this article - Measuring the speed difference - Raw data structure of an … Continue reading Fast event log search in PowerShell with the FilterHashtable parameter

How to import a certificate into the Local COMPUTER’s store

IMPORTANT NOTE If your .CER certificate contains a private key, you can only import it through the MMC console. Neither the certutil nor the Import-Certificate cmdlet keeps the private key during the import process. The Import-PfxCertificate cmdlet keeps the private key, but it does not import .CER certificates. Import the certificate with Certutil The following … Continue reading How to import a certificate into the Local COMPUTER’s store

How to import a certificate into the Local USER’s store

IMPORTANT NOTE If your .CER certificate contains a private key, you can only import it through the MMC console. Neither the certutil nor the Import-Certificate cmdlet keeps the private key during the import process. The Import-PfxCertificate cmdlet keeps the private key, but it does not import .CER certificates. Import the certificate with Certutil The following … Continue reading How to import a certificate into the Local USER’s store

Credential prompt: command line or dialog box?

Credential prompt: command line or dialog box?

Technically there is no security difference between the two methods. It's only a matter of preferences and the behavior depends of a single registry value. Be prompted at the command line Set the ConsolePrompting value to True Be prompted from a dialog box Set the ConsolePrompting value to False or anything else than True. Or … Continue reading Credential prompt: command line or dialog box?

Parse log files with PowerShell

Parse log files with PowerShell

If you have to find information in unstructured log files, PowerShell offers a variety of cmdlets that can help you parse text files to extract the information you need. In my last article, I showed you how to search the Windows Event Log with Get-Event. That's where you usually spot most of the pertinent messages. … Continue reading Parse log files with PowerShell