How to find out DLL path of a PowerShell cmdlet
try with
( get-command my-cmdlet ).dll
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