Get-PSProvider
지정된 PowerShell 공급자에 대한 정보를 가져옵니다.
구문
Default (기본값)
Get-PSProvider
[[-PSProvider] <String[]>]
[<CommonParameters>]
Description
Get-PSProvider cmdlet은 현재 세션에서 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 요소는 스냅인 또는 모듈에서 시작됩니다.
이러한 명령은 가 반환하는 Get-PSProvider 개체의 PSSnapin 및 모듈 속성을 사용합니다. 이러한 속성의 값에는 공급자를 추가하는 스냅인 또는 모듈의 이름이 포함됩니다.
첫 번째 명령은 세션의 모든 공급자를 가져오고 이름, 모듈 및 PSSnapin 속성 값을 사용하여 테이블의 형식을 지정합니다.
두 번째 명령은 Where-Object cmdlet을 사용하여 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 공급자의 이름 또는 이름을 지정합니다.
매개 변수 속성
| 형식: | String[] |
| Default value: | None |
| 와일드카드 지원: | False |
| DontShow: | False |
매개 변수 집합
(All)
| Position: | 0 |
| 필수: | False |
| 파이프라인의 값: | False |
| 속성 이름별 파이프라인의 값: | True |
| 나머지 인수의 값: | False |
CommonParameters
이 cmdlet은 일반적인 매개 변수인 -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction 및 -WarningVariable 매개 변수를 지원합니다. 자세한 내용은 about_CommonParameters를 참조하세요.
입력
String
하나 이상의 공급자 이름 문자열을 이 cmdlet으로 파이프할 수 있습니다.
출력
ProviderInfo
이 cmdlet은 세션의 PowerShell 공급자를 나타내는 개체를 반환합니다.