Get-InstalledModule
取得計算機上安裝的模組。
語法
Default (預設值)
Get-InstalledModule
[[-Name] <String[]>]
[-MinimumVersion <Version>]
[-RequiredVersion <Version>]
[-MaximumVersion <Version>]
[<CommonParameters>]
Description
Get-InstalledModule Cmdlet 會取得使用 PowerShellGet 安裝在電腦上的 PowerShell 模組。 若要查看系統上已安裝的所有模組,請使用 Get-Module -ListAvailable 命令。
範例
範例 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 模組的版本。
參數
-MaximumVersion
指定要取得之模組的最大值或最新版本。 MaximumVersion 和 RequiredVersion 参數互斥;您無法在同一個命令中使用這兩個參數。
參數屬性
| 類型: | Version |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-MinimumVersion
指定要取得的單一模組最低版本。 MinimumVersion 和 RequiredVersion 參數互斥;您無法在同一個命令中使用這兩個參數。
參數屬性
| 類型: | Version |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-Name
指定要取得之模組名稱的陣列。
參數屬性
| 類型: | String[] |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | 0 |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-RequiredVersion
指定要取得之模組的確切版本。
參數屬性
| 類型: | Version |
| 預設值: | 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。