Get-PSProvider

지정된 PowerShell 공급자에 대한 정보를 가져옵니다.

Syntax

Get-PSProvider
   [[-PSProvider] <String[]>]
   [<CommonParameters>]

Description

cmdlet은 Get-PSProvider 현재 세션에서 PowerShell 공급자를 가져옵니다. 특정 드라이브를 가져오거나 세션의 모든 드라이브를 가져올 수 있습니다.

PowerShell 공급자를 사용하면 파일 시스템 드라이브인 것처럼 다양한 데이터 저장소에 액세스할 수 있습니다. PowerShell 공급자에 대한 자세한 내용은 about_Providers 참조하세요.

예제

예제 1: 사용 가능한 모든 공급자 목록 표시

Get-PSProvider

이 명령은 사용 가능한 모든 PowerShell 공급자 목록을 표시합니다.

예제 2: 지정된 문자로 시작하는 모든 PowerShell 공급자 목록 표시

Get-PSProvider f*, r* | Format-List

이 명령은 문자 f 또는 r로 시작하는 이름을 가진 모든 PowerShell 공급자 목록을 표시합니다.

예제 3: 세션에 공급자를 추가한 스냅인 또는 모듈 찾기

Get-PSProvider | Format-Table Name, Module, PSSnapIn -AutoSize

Name        Module                        PSSnapIn
----        ------                        --------
Registry                                  Microsoft.PowerShell.Core
Alias                                     Microsoft.PowerShell.Core
Environment                               Microsoft.PowerShell.Core
FileSystem                                Microsoft.PowerShell.Core
Function                                  Microsoft.PowerShell.Core
Variable                                  Microsoft.PowerShell.Core
Certificate Microsoft.PowerShell.Security
WSMan       Microsoft.WSMan.Management

Get-PSProvider | Where {$_.ModuleName -eq "Microsoft.PowerShell.Security"}

Name            Capabilities      Drives
----            ------------      ------
Certificate     ShouldProcess     {cert}

이러한 명령은 세션에 공급자를 추가한 PowerShell 스냅인 또는 모듈을 찾습니다. 공급자를 포함한 모든 PowerShell 요소는 스냅인 또는 모듈에서 시작됩니다.

이러한 명령은 반환하는 ProviderInfo 개체 Get-PSProviderPSSnapin 및 Module 속성을 사용합니다. 이러한 속성의 값에는 공급자를 추가하는 스냅인 또는 모듈의 이름이 포함됩니다.

첫 번째 명령은 세션의 모든 공급자를 가져오고 이름, 모듈 및 PSSnapin 속성 값을 사용하여 테이블의 형식을 지정합니다.

두 번째 명령은 cmdlet을 Where-Object 사용하여 Microsoft.PowerShell.Security 스냅인에서 제공하는 공급자를 가져옵니다.

예제 4: 파일 시스템 공급자의 Home 속성 경로 확인

C:\> Resolve-Path ~

Path
----
C:\Users\User01

PS C:\> (get-psprovider FileSystem).home

C:\Users\User01

이 예제에서는 타일드 기호(~)가 FileSystem 공급자의 Home 속성 값을 나타내는 것을 보여 줍니다. Home 속성 값은 선택 사항이지만 FileSystem 공급자의 경우 다음과 같이 $env:HOMEDRIVE\$env:HOMEPATH 정의됩니다$HOME.

매개 변수

-PSProvider

이 cmdlet이 정보를 가져오는 PowerShell 공급자의 이름 또는 이름을 지정합니다.

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

입력

String

하나 이상의 공급자 이름 문자열을 이 cmdlet으로 파이프할 수 있습니다.

출력

ProviderInfo

이 cmdlet은 세션의 PowerShell 공급자를 나타내는 개체를 반환합니다.