Get-InstalledScript

获取已安装的脚本。

语法

Default (默认值)

Get-InstalledScript
    [[-Name] <String[]>]
    [-MinimumVersion <String>]
    [-RequiredVersion <String>]
    [-MaximumVersion <String>]
    [-AllowPrerelease]
    [<CommonParameters>]

说明

cmdlet Get-InstalledScript 获取 CurrentUserAllUsers 范围的已安装脚本。

这是 Get-InstalledPSResource 中 cmdlet 的代理 cmdlet。 有关详细信息,请参阅 Get-InstalledPSResource

示例

示例 1:获取所有已安装的脚本

Get-InstalledScript

此命令获取所有已安装的脚本。

示例 2:按名称获取已安装的脚本

Get-InstalledScript -Name "Required-Scri*"
Version    Name                                Type       Repository           Description
-------    ----                                ----       ----------           -----------
2.5        Required-Script1                    Script     local1               Description for the Required-Script1 script
2.5        Required-Script2                    Script     local1               Description for the Required-Script2 script
2.5        Required-Script3                    Script     local1               Description for the Required-Script3 script

此命令获取名称开头的 Required-Scri脚本。

参数

-AllowPrerelease

包括在标记为预发行版的结果脚本中。

代理 cmdlet 将此参数映射到 预发行版 参数 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
支持通配符:True
不显示: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

输入

String

String

输出

Object