Find-Package 패키지 원본에서 사용할 수 있는 소프트웨어 패키지를 찾습니다.
Get-PackageProvider 및 Get-PackageSource 공급자에 대한 세부 정보를 표시합니다.
중요합니다
PackageManagement 모듈에 포함된 명령은 Visual Studio의 패키지 관리자 콘솔에서 NuGet 모듈에서 제공하는 명령과 다릅니다. 각 모듈에는 다른 모듈에서 사용할 수 없는 명령이 있습니다. 이름이 같은 명령은 특정 인수에 따라 다릅니다. 자세한 내용은 Visual Studio의 패키지 관리자 콘솔에 대한 PowerShell 참조 설명서를 참조하세요.
예제
예제 1: 패키지 공급자에서 사용 가능한 모든 패키지 찾기
이 명령은 등록된 갤러리에서 사용 가능한 모든 PowerShell 모듈 패키지를 찾습니다.
Get-PackageProvider 사용하여 공급자 이름을 가져옵니다.
Find-Package -ProviderName NuGet
Name Version Source Summary
---- ------- ------ -------
NUnit 3.11.0 MyNuGet NUnit is a unit-testing framework for all .NET langua...
Newtonsoft.Json 12.0.1 MyNuGet Json.NET is a popular high-performance JSON framework...
EntityFramework 6.2.0 MyNuGet Entity Framework is Microsoft's recommended data acce...
MySql.Data 8.0.15 MyNuGet MySql.Data.MySqlClient .Net Core Class Library
bootstrap 4.3.1 MyNuGet Bootstrap framework in CSS. Includes fonts and JavaSc...
NuGet.Core 2.14.0 MyNuGet NuGet.Core is the core framework assembly for NuGet...
Find-PackageProvider 매개 변수를 사용하여 공급자 NuGet지정합니다.
예제 2: 패키지 원본에서 패키지 찾기
이 명령은 지정된 패키지 원본에서 패키지의 최신 버전을 찾습니다. 패키지 원본이 제공되지 않으면 Find-Package 설치된 각 패키지 공급자와 해당 패키지 원본을 검색합니다.
Get-PackageSource 사용하여 원본 이름을 가져옵니다.
Find-Package -Name NuGet.Core -Source MyNuGet
Name Version Source Summary
---- ------- ------ -------
NuGet.Core 2.14.0 MyNuGet NuGet.Core is the core framework assembly for NuGet...
Name 매개 변수를 사용하여 NuGet.Core패키지 이름을 지정합니다.
Source 매개 변수는 MyNuGet패키지를 검색하도록 지정합니다.
Name Version Source Summary
---- ------- ------ -------
NuGet.Core 2.14.0 MyNuGet NuGet.Core is the core framework assembly for NuGet...
NuGet.Core 2.14.0-rtm-832 MyNuGet NuGet.Core is the core framework assembly for NuGet...
NuGet.Core 2.13.0 MyNuGet NuGet.Core is the core framework assembly for NuGet...
...
NuGet.Core 1.1.229.159 MyNuGet NuGet.Core is the core framework assembly for NuGet...
Nuget.Core 1.0.1120.104 MyNuGet NuGet.Core is the core framework assembly for NuGet...
Name 매개 변수를 사용하여 NuGet.Core패키지를 지정합니다.
ProviderName 매개 변수는 MyNuGet패키지를 검색하도록 지정합니다.
AllVersions 사용 가능한 모든 버전이 반환되도록 지정합니다.
Name Version Source Summary
---- ------- ------ -------
NuGet.Core 2.9.0 MyNuGet NuGet.Core is the core framework assembly for NuGet...
NuGet.Core 2.8.6 MyNuGet NuGet.Core is the core framework assembly for NuGet...
NuGet.Core 2.8.0 MyNuGet NuGet.Core is the core framework assembly for NuGet...
NuGet.Core 2.7.0 MyNuGet NuGet.Core is the core framework assembly for NuGet...
Name 매개 변수를 사용하여 NuGet.Core패키지 이름을 지정합니다.
ProviderName 매개 변수는 NuGet패키지를 검색하도록 지정합니다. MinimumVersion 2.7.0가장 낮은 버전을 지정합니다. MaximumVersion 2.9.0가장 높은 버전을 지정합니다.
AllVersions 최소값과 최대값으로 지정된 대로 범위가 반환되는지 확인합니다.
예제 6: 파일 시스템에서 패키지 찾기
이 명령은 로컬 컴퓨터에 저장된 파일 확장명을 .nupkg 패키지를 찾습니다.
파일은 NuGet같은 갤러리에서 다운로드한 패키지입니다.
PS> Find-Package -Source C:\LocalPkg
Name Version Source Summary
---- ------- ------ -------
Microsoft.Web.Xdt 3.0.0 C:\LocalPkg\ Microsoft Xml Document Transformation (XDT)...
NuGet.Core 2.14.0 C:\LocalPkg\ NuGet.Core is the core framework assembly...
이 cmdlet은 일반적인 매개 변수인 -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction 및 -WarningVariable 매개 변수를 지원합니다. 자세한 내용은 about_CommonParameters를 참조하세요.
입력
None
개체를 이 cmdlet에 파이프로 연결할 수 없습니다.
출력
SoftwareIdentify
이 cmdlet은 SoftwareIdentity 개체를 반환합니다.
참고
중요합니다
2020년 4월부터 PowerShell 갤러리는 더 이상 TLS(전송 계층 보안) 버전 1.0 및 1.1을 지원하지 않습니다. TLS 1.2 이상을 사용하지 않는 경우 PowerShell 갤러리에 액세스하려고 할 때 오류가 발생합니다. 다음 명령을 사용하여 TLS 1.2를 사용하고 있는지 확인합니다.