Get-InstalledModule
获取 PowerShellGet 安装的计算机上的模块列表。
语法
Default (默认值)
Get-InstalledModule
[[-Name] <String[]>]
[-MinimumVersion <String>]
[-RequiredVersion <String>]
[-MaximumVersion <String>]
[-AllVersions]
[-AllowPrerelease]
[<CommonParameters>]
说明
Get-InstalledModule cmdlet 获取使用 PowerShellGet 在计算机上安装的 PowerShell 模块。 若要查看系统上安装的所有模块,请使用 Get-Module -ListAvailable 命令。
这是 Get-InstalledPSResource 中 cmdlet 的代理 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
包括在标记为预发行版的结果模块中。
代理 cmdlet 将此参数映射到 预发行版 参数 Get-InstalledPSResource。
参数属性
| 类型: | SwitchParameter |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-AllVersions
代理 cmdlet 在调用-Version *之前将此参数Get-InstalledPSResource转换为此参数。
参数属性
| 类型: | SwitchParameter |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-MaximumVersion
代理 cmdlet 使用此参数的值来创建 NuGet 版本搜索字符串,以便与 Version 参数 Get-InstalledPSResource一起使用。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-MinimumVersion
代理 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
代理 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。