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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
try with
( get-command my-cmdlet ).dll
回答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
标签:
powershell