代码之家  ›  专栏  ›  技术社区  ›  Dan

安装后如何获取Powershell Gallery软件包中的函数列表?

  •  -2
  • Dan  · 技术社区  · 1 月前

    如何从Powershell库中获取新安装的Powershell包中的Powershell函数列表?

    谢谢

    1 回复  |  直到 1 月前
        1
  •  2
  •   iRon    1 月前
    Get-Command -Module <ModuleName>
    

    例如:

    Install-Module -Name PSScriptAnalyzer
    
    Get-Command -Module PSScriptAnalyzer
    
    CommandType     Name                                       Version    Source
    -----------     ----                                       -------    ------
    Cmdlet          Get-ScriptAnalyzerRule                     1.23.0     PSScriptAnalyzer
    Cmdlet          Invoke-Formatter                           1.23.0     PSScriptAnalyzer
    Cmdlet          Invoke-ScriptAnalyzer                      1.23.0     PSScriptAnalyzer