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?
Asked
Active
Viewed 7,881 times
2 Answers
23
-
This even works with native cmdlets - `( get-command Rename-Item ).dll`. Of course you still have to do some digging to find the actual provider (e.g. `FileSystemProvider` in the GAC's `System.Management.Automation.dll`). – Ohad Schneider Mar 27 '16 at 00:50
2
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

pirateofebay
- 930
- 1
- 10
- 25