# IISParser – PowerShell Module

Modern IIS log parser for PowerShell and .NET with native C# cmdlets, cross-platform support, and dependency-free log analysis.

pages

Modern IIS log parser for PowerShell and .NET with native C# cmdlets, cross-platform support, and dependency-free log analysis.

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](https://github.com/Kabindas/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

<!-- PowerForge markdown source sha256:3A36E9ABDD1092BD27BA1EF79F4F8FB4A6672E35994414F0AB5CDDBA253061BF; title=True -->

<!-- PowerForge markdown artifact sha256:667B2C4A8220132FF45CE43053E8B44116B627CE23836921E25AE04FDAE2D368 -->
