Skip to content

Latest commit

 

History

History
55 lines (34 loc) · 1.34 KB

README.md

File metadata and controls

55 lines (34 loc) · 1.34 KB

ReflectCmdlet

PowerShell Gallery Version

Sometime you want to understand how exactly PowerShell cmdlets work. The Get-CommandSource cmdlet or gcmso alias finds the source code/implementation for a cmdlet.

This module is for Windows PowerShell 3.0 or above.

How To Use

 Get-CommandSource 
     [-Name] <String>
     [-Decompiler {dnSpy | ILSpy | dotPeek | JustDecompile | Reflector | GitHub}]

It can be used in a many ways:

Get-CommandSource "Write-Host"

Get-CommandSource Write-Host

gcmso Write-Host
 
"Write-Host" | Get-CommandSource

Get-Command Write-Host | Get-CommandSource

Install

To install the module you can run in a PowerShell following command:

Install-Module -Name ReflectCmdlet

To install the module using the PowerShellGet v3:

Install-PSResource -Name ReflectCmdlet

Or download this module from PowerShell Gallery: https://www.powershellgallery.com/packages/ReflectCmdlet/

License

Inspired by the this script from Oisin Grehan: http://www.nivot.org/post/2008/10/30/ATrickToJumpDirectlyToACmdletsImplementationInReflector

The source code is available under The MIT License (MIT)