IISParser – PowerShell Module

IISParser - Modern IIS Log Parser for .NET and PowerShell

IISParser is available as a PowerShell module from the PowerShell Gallery. It is a native C# rewrite with C# cmdlets, completely dependency-free. This project is inspired by the discontinued IISLogParser by Kabindas.

📦 PowerShell Module

📦 NuGet Package

🛠️ Project Information

👨‍💻 Author & Social


What it's all about

IISParser is a modern, fast IIS log parser for PowerShell and .NET:

  • Fully implemented in C#
  • Provides native PowerShell cmdlets
  • No external dependencies
  • Cross-platform (Windows, Linux, macOS with PowerShell 7+)

Originally, IISLogParser handled IIS log parsing. After it was discontinued, IISParser continues the concept as a self-contained modern implementation.


Installation

Install-Module -Name IISParser -Scope CurrentUser

To use IISParser in a .NET project:

dotnet add package IISParser

Updating

Update-Module -Name IISParser

Tip: Restart PowerShell if the module was already loaded.


Usage Examples

PowerShell

Import-Module IISParser

# Get first and last 5 lines from IIS log
Get-IISParsedLog -FilePath "C:\Logs\u_ex220507.log" | Select-Object -First 5
Get-IISParsedLog -FilePath "C:\Logs\u_ex220507.log" | Select-Object -Last 5

# Skip and filter
Get-IISParsedLog -FilePath "C:\Logs\u_ex220507.log" -First 5 -Last 5 -Skip 1

Detailed output:

Get-IISParsedLog -FilePath "C:\Logs\u_ex220507.log" -First 1 -Skip 1 | Format-List

.NET

using IISParser;

var parser = new ParserEngine("C:\\Logs\\u_ex220507.log");

foreach (var record in parser.ParseLog())
{
    Console.WriteLine($"{record.Timestamp:o} {record.UriPath}");
}

Credits

  • Original inspiration: IISLogParser by Kabindas