PowerShellGet v3 Module
本文件涵蓋 PowerShellGet 模組 3.0.22-beta22 版。 此模組提供來與 PowerShellGet v2.2.x 相容。 此模組版本中的 Cmdlet 是 Proxy Cmdlet,可呼叫 Microsoft.PowerShell.PSResourceGet 模組中的對等 Cmdlet。
Proxy Cmdlet 會為使用 2.x 版 Cmdlet 的腳本提供相容性層。 在大部分情況下,腳本會繼續運作,而不需修改。 不過,模組之間的行為有一些差異。 Microsoft.PowerShell.PSResourceGet Cmdlet 不支援 PowerShellGet Cmdlet 的某些参數。 Proxy Cmdlet 會以無訊息方式捨棄不支持的參數、轉換某些參數,並將其他參數傳遞至 Microsoft.PowerShell.PSResourceGet 模組中的對等 Cmdlet。
如需 Microsoft.PowerShell.PSResourceGet 模組的詳細資訊,請參閱 about_PSResourceGet。
這很重要
Windows PowerShell 5.1 隨附 1.0.0.1 版 PowerShellGet 預安裝。 此版本的 PowerShellGet 具有有限的功能,且不支援 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. |