Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out DLL path of a PowerShell cmdlet

Tags:

powershell

I am using some cmdlets imported from a module and would like to find out where the DLLs are physically located so that I can use dotPeek or Reflector on them. Is there a way to find out the DLL path somehow?

like image 851
Borek Bernard Avatar asked Apr 24 '13 10:04

Borek Bernard


1 Answers

The accepted answer will work for cmdlets but not native functions such as Add-BgpRouter or Add-PrinterDriver. To determine the file path of a function use

$Function = Get-Command Add-BgpRouter
(Get-Module $Function.ModuleName).Path
like image 54
pirateofebay Avatar answered Sep 23 '22 13:09

pirateofebay