PowerShellGet

PowerShellGet 是一个模块,其中包含用于发现、安装、更新和发布 PowerShell 项目(如模块、DSC 资源、角色功能和脚本)的命令。

本文档介绍 PowerShellGet 模块的版本 2.2.5。

重要

Windows PowerShell 5.1 预安装了 PowerShell Get 版本 1.0.0.1。 此版本的 PowerShellGet 具有有限的功能,不支持 PowerShell 库的更新功能。 若要受支持,必须更新到最新版本。

PowerShellGet

Find-Command

在模块中查找 PowerShell 命令。

Find-DscResource

查找 Desired State Configuration (DSC) 资源。

Find-Module

查找与指定条件匹配的存储库中的模块。

Find-RoleCapability

在模块中查找角色功能。

Find-Script

查找脚本。

Get-InstalledModule

获取 PowerShellGet 安装的计算机上的模块列表。

Get-InstalledScript

获取已安装的脚本。

Get-PSRepository

获取 PowerShell 存储库。

Install-Module

从存储库下载一个或多个模块,并将其安装在本地计算机上。

Install-Script

安装脚本。

New-ScriptFileInfo

创建包含元数据的脚本文件。

Publish-Module

将指定模块从本地计算机发布到联机库。

Publish-Script

发布脚本。

Register-PSRepository

注册 PowerShell 存储库。

Save-Module

将模块及其依赖项保存在本地计算机上,但不安装该模块。

Save-Script

保存脚本。

Set-PSRepository

设置已注册存储库的值。

Test-ScriptFileInfo

验证脚本的注释块。

Uninstall-Module

卸载模块。

Uninstall-Script

卸载脚本。

Unregister-PSRepository

取消注册存储库。

Update-Module

将最新版本的指定模块从联机库下载并安装到本地计算机。

Update-ModuleManifest

更新模块清单文件。

Update-Script

更新脚本。

Update-ScriptFileInfo

更新脚本的信息。