Get-InstalledScript
Gets an installed script.
Syntax
Default (Default)
Get-InstalledScript
[[-Name] <String[]>]
[-MinimumVersion <String>]
[-RequiredVersion <String>]
[-MaximumVersion <String>]
[-AllowPrerelease]
[<CommonParameters>]
Description
The Get-InstalledScript
cmdlet gets installed scripts for CurrentUser and AllUsers scopes.
Examples
Example 1: Get all installed scripts
Get-InstalledScript
This command gets all installed scripts.
Example 2: Get installed scripts by name
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
This command gets scripts where the name begins with Required-Scri.
Parameters
-AllowPrerelease
Includes in the results scripts marked as a prerelease.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-MaximumVersion
Specifies the maximum, or latest, version of a script to get. The MaximumVersion and RequiredVersion parameters are mutually exclusive; you cannot use both parameters in the same command.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-MinimumVersion
Specifies the minimum version of a script to get. The MinimumVersion and RequiredVersion parameters are mutually exclusive; you cannot use both parameters in the same command.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Name
Specifies an array of names of scripts to get. Wildcards are accepted.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | True |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-RequiredVersion
Specifies the exact version of a script to get.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.