A PowerShell module for decompiling .NET assemblies using the ILSpy decompiler engine.
ISpy module provides comprehensive cmdlets to decompile .NET assemblies into readable C# source code. Built on top of the ICSharpCode.Decompiler library (the engine behind ILSpy), it offers a powerful command-line interface for .NET assembly analysis and decompilation tasks.
- Complete Assembly Decompilation: Decompile entire .NET assemblies to organized C# source code
- Targeted Type Analysis: Focus on specific types, methods, or namespaces
- Cross-Platform Support: Works with .NET Framework, .NET Core, and .NET 5+ assemblies
- Flexible Output Options: Console output, single files, or organized directory structures
- Advanced Search Capabilities: Find types and methods across multiple assemblies
- Pipeline Integration: Full PowerShell pipeline support for batch operations
- Dependency Analysis: Analyze assembly dependencies and relationships
Install-Module ISpy- PowerShell: 7.4
- Clone this repository
- Open a terminal in the project directory
- Build the project:
& .\build.ps1- Import the module:
Import-Module .\output\ISpy.psd1This module exposes the following cmdlets for assembly analysis and decompilation:
| Cmdlet | Purpose | Documentation |
|---|---|---|
| Get-DecompiledSource | Decompile types (returns an object per type) | 📖 Details |
| Export-DecompiledSource | Export decompiled types to files with namespace organization | 📖 Details |
| Get-AssemblyInfo | Assembly metadata and information | 📖 Details |
| Get-Type | List and filter types within assemblies | 📖 Details |
| Expand-Type | Decompile specific methods or show type source (interactive) | 📖 Details |
| Get-Dependency | Assembly dependency mapping | 📖 Details |
| Get-Decompiler | Create configured CSharpDecompiler instances |
📖 Details |
see docs/en-us/ for examples.
ISpy/
├── src/ # Source code
│ ├── Cmdlets/ # PowerShell cmdlet implementations
│ ├── Models/ # Data transfer objects
│ └── Utilities/ # Helper classes
├── tests/ # Pester test suite
├── docs/en-us/ # PowerShell help documentation
├── output/ # Built module package
└── build.ps1 # Build script
- ICSharpCode.Decompiler: Core decompilation engine from ILSpy
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Update documentation as needed
- Submit a pull request
This project follows the same license terms as the ISpy project it's based on.
- ILSpy - The original .NET decompiler GUI application
- ICSharpCode.Decompiler - The decompiler engine NuGet package
Note: This module is designed for legitimate reverse engineering, learning, and analysis purposes. Please respect intellectual property rights and licensing terms when decompiling third-party assemblies.