Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. PowerShell
  3. PSReflect

PSReflect

BSD-3-ClausePowerShell

A PowerShell module for defining in-memory enums, structs, and Win32 functions without compiling C#.

GitHubGitHub
228 stars62 forks0 contributors

What is PSReflect?

PSReflect is a PowerShell module that allows developers to define enums, structs, and Win32 API functions entirely in memory without compiling C# code. It solves the problem of interacting with low-level Windows APIs dynamically and stealthily, making it easier to perform system-level operations directly from PowerShell scripts. This is especially useful for security testing, system administration, and automation tasks that require native API access.

Target Audience

Security researchers, red teamers, system administrators, and PowerShell developers who need to interact with Windows APIs dynamically without leaving compiled artifacts on disk.

Value Proposition

Developers choose PSReflect because it eliminates the need for C# compilation, reduces external dependencies, and enables stealthy in-memory execution of Win32 API calls, all within the familiar PowerShell environment.

Overview

Easily define in-memory enums, structs, and Win32 functions in PowerShell

Use Cases

Best For

  • Dynamically calling Win32 API functions from PowerShell scripts
  • Performing stealthy security assessments without disk artifacts
  • Interacting with low-level Windows system APIs for automation
  • Red team operations requiring in-memory execution of native functions
  • System administration tasks that need direct API access without compiled code
  • Creating custom enums and structs in PowerShell for API interactions

Not Ideal For

  • Projects targeting non-Windows operating systems or requiring cross-platform compatibility
  • Teams that prefer compiled, type-safe code over dynamic reflection for performance and reliability
  • Environments where disk-based execution logs are mandatory for security auditing or compliance

Pros & Cons

Pros

In-Memory Execution

Enables defining enums, structs, and Win32 functions without compiling to disk, reducing forensic traces and enabling stealth operations as highlighted in the README.

No External Dependencies

Works entirely within PowerShell, avoiding the need for C# compilation or additional tools, maintaining script portability and simplicity.

Dynamic Win32 API Access

Facilitates on-the-fly calling of native Windows APIs, useful for security testing and system administration without pre-compiled code.

Cons

Windows-Exclusive Limitation

Tied strictly to Windows and Win32 APIs, making it unsuitable for Linux, macOS, or any cross-platform development efforts.

Reflection Performance Overhead

Uses .NET reflection dynamically at runtime, which can be slower and less efficient than pre-compiled C# code for frequent or high-performance API calls.

Steep Learning Curve

Requires deep knowledge of Win32 APIs and advanced PowerShell features, not ideal for casual scripters or those new to low-level system programming.

Frequently Asked Questions

Quick Stats

Stars228
Forks62
Contributors0
Open Issues2
Last commit7 years ago
CreatedSince 2014

Tags

#win32-api#red-teaming#system-administration#scripting#powershell#reflection#security-research#windows

Built With

P
PowerShell
.
.NET

Included in

PowerShell5.4k
Auto-fetched 1 day ago

Related Projects

PowerSploitPowerSploit

PowerSploit - A PowerShell Post-Exploitation Framework

Stars12,997
Forks4,714
Last commit5 years ago
BloodHoundBloodHound

Six Degrees of Domain Admin

Stars10,539
Forks1,790
Last commit3 months ago
NishangNishang

Nishang - Offensive PowerShell for red team, penetration testing and offensive security.

Stars9,924
Forks2,546
Last commit2 years ago
PowerShellEmpirePowerShellEmpire

Empire is a PowerShell and Python post-exploitation agent.

Stars7,835
Forks2,925
Last commit6 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub