다음을 통해 공유


Get-InstalledPSResource

PowerShellGet통해 컴퓨터에 설치된 모듈 및 스크립트를 반환합니다.

구문

Default (기본값)

Get-InstalledPSResource
    [[-Name] <String[]>]
    [-Version <String>]
    [-Path <String>]
    [-Scope <ScopeType>]
    [<CommonParameters>]

Description

이 cmdlet은 모듈 및 스크립트 설치 경로를 검색하고 찾은 각 리소스 항목을 설명하는 PSResourceInfo 개체를 반환합니다. 이는 Get-InstalledModule v2의 Get-InstalledScript cmdlet의 결합된 출력과 동일합니다.

예제

예제 1

이 예제에서는 컴퓨터에 설치된 모든 버전의 모듈 및 스크립트를 반환합니다.

Get-InstalledPSResource

예제 2

이 예제에서는 PowerShellGet사용하여 설치된 Az 모듈의 모든 버전을 반환합니다.

Get-InstalledPSResource Az

예제 3

다음은 현재 디렉터리에 설치된 Az 모듈의 모든 버전을 반환하는 예제입니다.

Get-InstalledPSResource Az -Path .

예제 4

이 예제에서는 Az 모듈이 시스템에 설치된 경우 특정 버전의 Az 모듈을 반환합니다.

Get-InstalledPSResource Az -Version 9.4.0

예제 5

이 예제에서는 지정된 버전 범위 내에 설치된 모든 버전의 Az 모듈을 반환합니다.

Get-InstalledPSResource Az -Version "(1.0.0, 3.0.0)"

예제 6

이 예제에서는 시스템에 설치된 경우 PowerShellGet 모듈의 특정 미리 보기 버전을 반환합니다.

Get-InstalledPSResource PowerShellGet -Version 3.0.19-beta19
Name          Version Prerelease Repository Description
----          ------- ---------- ---------- -----------
PowerShellGet 3.0.19  beta19     PSGallery  PowerShell module with commands for discovering, installing, updating and p…

예제 6

이전 예제에서는 PowerShellGet 버전 3.0.14-beta14가 시스템에 설치된 것으로 나타났습니다. 이 예제에서는 버전설치된 모듈을 식별하기 위해 시험판 레이블을 포함하여 전체 버전을 제공해야 합니다.

Get-InstalledPSResource PowerShellGet -Version 3.0.19

이 명령의 출력은 없습니다.

예제 7

이 예제에서는 시스템에 4가지 버전의 PSReadLine 설치되어 있음을 알 수 있습니다. 두 번째 명령은 2.2.02.3.0사이의 버전 범위를 검색합니다.

Get-InstalledPSResource PSReadLine
Name       Version Prerelease Repository Description
----       ------- ---------- ---------- -----------
PSReadLine 2.3.0   beta0      PSGallery  Great command line editing in the PowerShell console host
PSReadLine 2.2.6              PSGallery  Great command line editing in the PowerShell console host
PSReadLine 2.2.5              PSGallery  Great command line editing in the PowerShell console host
PSReadLine 2.2.2              PSGallery  Great command line editing in the PowerShell console host
PSReadLine 2.2.0   beta4      PSGallery  Great command line editing in the PowerShell console host
Get-InstalledPSResource PSReadLine -Version '[2.2.0, 2.3.0]'
Name       Version Prerelease Repository Description
----       ------- ---------- ---------- -----------
PSReadLine 2.3.0   beta0      PSGallery  Great command line editing in the PowerShell console host
PSReadLine 2.2.6              PSGallery  Great command line editing in the PowerShell console host
PSReadLine 2.2.5              PSGallery  Great command line editing in the PowerShell console host
PSReadLine 2.2.2              PSGallery  Great command line editing in the PowerShell console host

NuGet 버전 규칙에 따라 시험판 버전이 안정적인 버전보다 작으므로 2.2.0-beta4 지정된 버전 범위의 2.2.0 버전보다 작습니다.

매개 변수

-Name

찾을 리소스의 이름입니다. 와일드카드는 지원되지만 NuGet은 * 문자만 허용합니다. NuGet은 로컬(파일 기반) 리포지토리의 와일드카드 검색을 지원하지 않습니다.

매개 변수 속성

형식:

String[]

Default value:None
와일드카드 지원:True
DontShow:False

매개 변수 집합

(All)
Position:0
필수:False
파이프라인의 값:True
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-Path

검색할 경로를 지정합니다.

매개 변수 속성

형식:String
Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-Scope

리소스의 범위를 지정합니다.

매개 변수 속성

형식:Microsoft.PowerShell.PSResourceGet.UtilClasses.ScopeType
Default value:None
허용되는 값:CurrentUser, AllUsers
와일드카드 지원:False
DontShow:False

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-Version

반환할 리소스의 버전을 지정합니다. 값은 NuGet 버전 관리 구문을 사용하여 정확한 버전 또는 버전 범위일 수 있습니다.

NuGet 버전 범위에 대한 자세한 내용은 패키지 버전 관리참조하세요.

PowerShellGet은 NuGet 버전 범위 설명서에 나열된 최소 포괄 버전 제외한 모든 버전을 지원합니다. 버전으로 1.0.0.0 사용하면 버전 1.0.0.0 이상(최소 포함 범위)이 생성되지 않습니다. 대신 값은 필수 버전으로 간주됩니다. 최소 포함 범위를 검색하려면 버전 범위로 [1.0.0.0, ] 사용합니다.

매개 변수 속성

형식:String
Default value:None
와일드카드 지원:True
DontShow:False

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

CommonParameters

이 cmdlet은 일반적인 매개 변수인 -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction 및 -WarningVariable 매개 변수를 지원합니다. 자세한 내용은 about_CommonParameters를 참조하세요.

입력

String

출력

Microsoft.PowerShell.PSResourceGet.UtilClasses.PSResourceInfo

참고

모듈은 Get-PSResourceGet-InstalledPSResource별칭으로 정의합니다.