C# 如何在给定模块(从文件加载)中找到cmdlet
我有一个充满PowerShell cmdlet的C#DLL,我想知道如何从PowerShell提示符检索cmdlet列表。我试过:C# 如何在给定模块(从文件加载)中找到cmdlet,c#,powershell,cmdlet,import-module,C#,Powershell,Cmdlet,Import Module,我有一个充满PowerShell cmdlet的C#DLL,我想知道如何从PowerShell提示符检索cmdlet列表。我试过: Import-Module .\psconfig.dll Get-Command -Name psconfig 但这不起作用。(导入可以工作,但不是Get命令) 如何正确地执行此操作,以便仅获取DLL中包含的cmdlet列表?get命令-Name psconfig正在查找名为psconfig的cmdlet。要获取从psconfig.dll导入的cmdlet列表,您
Import-Module .\psconfig.dll
Get-Command -Name psconfig
但这不起作用。(导入可以工作,但不是Get命令
)
如何正确地执行此操作,以便仅获取DLL中包含的cmdlet列表?
get命令-Name psconfig
正在查找名为psconfig
的cmdlet。要获取从psconfig.dll
导入的cmdlet列表,您需要为该模块列出导入的cmdlet:
Get-Command -ListImported -Module psconfig
或者只是
Get-Command -Module psconfig
Get命令-Name psconfig
正在查找名为psconfig
的cmdlet。要获取从psconfig.dll
导入的cmdlet列表,您需要为该模块列出导入的cmdlet:
Get-Command -ListImported -Module psconfig
或者只是
Get-Command -Module psconfig
Get Command-Module some Module?Get Command-Module some Module?从未使用过“true”cmdlet--C#,而不是powershell。我猜dll模块不需要psd1?@JaquelineVanek脚本模块也不需要模块清单。拥有一个是很好的做法。从未使用过“true”cmdlet--C#,而不是powershell。我猜dll模块不需要psd1?@JaquelineVanek脚本模块也不需要模块清单。有一个是很好的做法。