PowerShellGet Module
PowerShellGet 是一個模組,其中包含探索、安裝、更新和發佈 PowerShell 成品的命令,例如模組、DSC 資源、角色功能和腳本。
此站臺上的 Cmdlet 參考文件記載了模組的最新版本。
這很重要
自 2020 年 4 月起,PowerShell 資源庫不再支援傳輸層安全性 (TLS) 1.0 和 1.1 版。 如果您未使用 TLS 1.2 或更高版本,當您嘗試存取 PowerShell 資源庫時,會收到錯誤。 使用下列命令以確保您使用 TLS 1.2:
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
如需詳細資訊,請參閱 PowerShell 部落格中的 公告 。
PowerShellGet Cmdlet
| 指令程式 | Description |
|---|---|
| Find-Command |
Finds PowerShell commands in modules. |
| Find-DscResource |
Finds Desired State Configuration (DSC) resources. |
| Find-Module |
Finds modules in a repository that match specified criteria. |
| Find-RoleCapability |
Finds role capabilities in modules. |
| Find-Script |
Finds a script. |
| Get-InstalledModule |
Gets a list of modules on the computer that were installed by PowerShellGet. |
| Get-InstalledScript |
Gets an installed script. |
| Get-PSRepository |
Gets PowerShell repositories. |
| Install-Module |
Downloads one or more modules from a repository, and installs them on the local computer. |
| Install-Script |
Installs a script. |
| New-ScriptFileInfo |
Creates a script file with metadata. |
| Publish-Module |
Publishes a specified module from the local computer to an online gallery. |
| Publish-Script |
Publishes a script. |
| Register-PSRepository |
Registers a PowerShell repository. |
| Save-Module |
Saves a module and its dependencies on the local computer but doesn't install the module. |
| Save-Script |
Saves a script. |
| Set-PSRepository |
Sets values for a registered repository. |
| Test-ScriptFileInfo |
Validates a comment block for a script. |
| Uninstall-Module |
Uninstalls a module. |
| Uninstall-Script |
Uninstalls a script. |
| Unregister-PSRepository |
Unregisters a repository. |
| Update-Module |
Downloads and installs the newest version of specified modules from an online gallery to the local computer. |
| Update-ModuleManifest |
Updates a module manifest file. |
| Update-Script |
Updates a script. |
| Update-ScriptFileInfo |
Updates information for a script. |