Get-InstalledModule
取得 PowerShellGet 所安裝電腦上的模組清單。
語法
Default (預設值)
Get-InstalledModule
[[-Name] <String[]>]
[-MinimumVersion <String>]
[-RequiredVersion <String>]
[-MaximumVersion <String>]
[-AllVersions]
[-AllowPrerelease]
[<CommonParameters>]
Description
Get-InstalledModule Cmdlet 會取得使用 PowerShellGet 安裝在電腦上的 PowerShell 模組。 若要查看系統上已安裝的所有模組,請使用 Get-Module -ListAvailable 命令。
這是 Get-InstalledPSResource 中 Cmdlet 的 Proxy Cmdlet。 如需詳細資訊,請參閱 Get-InstalledPSResource。
範例
範例 1:取得所有已安裝的模組
Get-InstalledModule
Version Name Type Repository Description
------- ---- ---- ---------- -----------
2.0.0 PSGTEST-UploadMultipleVersionOfP... Module GalleryINT Module for DAC functionality
1.3.5 AzureAutomationDebug Module PSGallery Module for debugging Azure Automation runbooks, emulating AA native cmdlets
1.0.1 AzureRM.Automation Module PSGallery Microsoft Azure PowerShell - Automation service cmdlets for Azure Resource Manager
此命令會取得所有已安裝的模組。
範例 2:取得模組的特定版本
Get-InstalledModule -Name "AzureRM.Automation" -MinimumVersion 1.0 -MaximumVersion 2.0
Version Name Type Repository Description
------- ---- ---- ---------- -----------
1.0.1 AzureRM.Automation Module PSGallery Microsoft Azure PowerShell - Automation service cmdlets for Azure Resource Manager
此命令會從 1.0 版到 2.0 版取得 AzureRM.Automation 模組的版本。
參數
-AllowPrerelease
在標示為發行前版本的結果模組中包含 。
Proxy Cmdlet 會將此參數對應至 的Get-InstalledPSResource參數。
參數屬性
| 類型: | SwitchParameter |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-AllVersions
Proxy Cmdlet 會先將此參數 -Version * 轉換成 ,再呼叫 Get-InstalledPSResource。
參數屬性
| 類型: | SwitchParameter |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-MaximumVersion
Proxy Cmdlet 會使用此參數的值來建立 NuGet 版本搜尋字串,以搭配 的 Version 參數 Get-InstalledPSResource使用。
參數屬性
| 類型: | String |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-MinimumVersion
Proxy Cmdlet 會使用此參數的值來建立 NuGet 版本搜尋字串,以搭配 的 Version 參數 Get-InstalledPSResource使用。
參數屬性
| 類型: | String |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-Name
指定要取得之模組名稱的陣列。
參數屬性
| 類型: | String[] |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | 0 |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-RequiredVersion
Proxy Cmdlet 會使用此參數的值來建立 NuGet 版本搜尋字串,以搭配 的 Version 參數 Get-InstalledPSResource使用。
參數屬性
| 類型: | String |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
CommonParameters
此 Cmdlet 支援一般參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。