powershell - 如何找出 PowerShell cmdlet 的 DLL 路径

标签 powershell

我正在使用从模块导入的一些 cmdlet,并且想找出 DLL 的物理位置,以便我可以在它们上使用 dotPeek 或 Reflector。有没有办法以某种方式找出DLL路径?

最佳答案

接受的答案适用于 cmdlet,但不适用于 native 函数,例如 Add-BgpRouter。或 Add-PrinterDriver .要确定函数的文件路径,请使用

$Function = Get-Command Add-BgpRouter
(Get-Module $Function.ModuleName).Path

关于powershell - 如何找出 PowerShell cmdlet 的 DLL 路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16189085/

相关文章:

powershell - 在 Powershell 中列出等于或低于给定深度的文件夹

loops - Powershell 可以一次循环遍历集合 N 个对象吗?

linux - 是否可以编写一个在 bash/shell 和 PowerShell 中运行的脚本?

powershell - foreach 的输入和输出到表中的列

windows - 使用命令行查找在给定日期后修改的 Windows 文件

c# - 通过 C# 中的属性检索嵌套 Powershell 对象的值

powershell - 导入-PFXCertificate : The specified network password is not correct

powershell - 如何将参数从批处理文件传递到 Powershell 脚本内的函数

Powershell CmdLet 和一次性字段/CA1001

powershell - 使用来自 cmd.exe 的多行 PowerShell 命令