Table of contents
TOC
折叠目录
展开目录

对声明版本范围的模块支持(1.* 等)

OpenLocalizationService|上次更新日期: 2016/12/7
|
1 参与者

现与 -MaximumVersion 结合的 -MinimumVersion 让用户能够在特定范围内获取/导入模块。 该参数还支持 .*。 以下示例演示其工作原理:

Now, you can combine **-MinimumVersion** and **-MaximumVersion** to import module within specific range:

PS C:\> Import-Module psreadline -Verbose -MinimumVersion 1.0 -MaximumVersion 1.2.*

VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\psreadline\1.1\psreadline.psd1'.
VERBOSE: Importing cmdlet 'Get-PSReadlineKeyHandler'.
VERBOSE: Importing cmdlet 'Get-PSReadlineOption'.
VERBOSE: Importing cmdlet 'Remove-PSReadlineKeyHandler'.
VERBOSE: Importing cmdlet 'Set-PSReadlineKeyHandler'.
VERBOSE: Importing cmdlet 'Set-PSReadlineOption'.
VERBOSE: Importing function 'PSConsoleHostReadline'.
© 2017 Microsoft