다음을 통해 공유


Get-InstalledPSResource

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

Syntax

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

Description

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

예제

예 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.0 버전 범위를 검색합니다 2.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은 로컬(파일 기반) 리포지토리의 와일드카드 검색을 지원하지 않습니다.

Type:String[]
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:True

-Path

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Scope

리소스의 scope 지정합니다.

Type:Microsoft.PowerShell.PSResourceGet.UtilClasses.ScopeType
Accepted values:CurrentUser, AllUsers
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Version

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

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

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

입력

String[]

출력

Microsoft.PowerShell.PSResourceGet.UtilClasses.PSResourceInfo

참고

모듈은 에 Get-PSResource 대한 Get-InstalledPSResource별칭으로 정의합니다.