Unregister-PSResourceRepository
로컬 컴퓨터에서 등록된 리포지토리를 제거합니다.
Syntax
Unregister-PSResourceRepository
[-Name] <String[]>
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
cmdlet은 로컬 컴퓨터에서 등록된 리포지토리를 제거합니다.
예제
예 1
이 예제에서는 로컬 컴퓨터에서 리포지토리를 제거 PSGv3
합니다.
Get-PSResourceRepository
Name Uri Trusted Priority
---- --- ------- --------
PSGallery https://www.powershellgallery.com/api/v2 True 10
Local file:///D:/PSRepoLocal/ True 20
PSGv3 https://www.powershellgallery.com/api/v3 True 50
Unregister-PSResourceRepository -Name PSGv3
Get-PSResourceRepository
Name Uri Trusted Priority
---- --- ------- --------
PSGallery https://www.powershellgallery.com/api/v2 True 10
Local file:///D:/PSRepoLocal/ True 20
예제 2
이 예제에서는 단일 명령에서 등록된 여러 리포지토리를 제거하는 방법을 보여줍니다. Name 매개 변수는 제거할 리포지토리의 이름을 포함하는 배열을 허용합니다.
Get-PSResourceRepository
Name Uri Trusted Priority
---- --- ------- --------
PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
PSGallery https://www.powershellgallery.com/api/v2 False 50
psgettestlocal file:///c:/code/testdir True 50
Unregister-PSResourceRepository -Name PoshTestGallery, psgettestlocal
Get-PSResourceRepository
Name Uri Trusted Priority
---- --- ------- --------
PSGallery https://www.powershellgallery.com/api/v2 False 50
매개 변수
-Confirm
cmdlet을 실행하기 전에 확인을 요청합니다.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
제거할 하나 이상의 리포지토리의 이름입니다.
Type: | String[] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PassThru
지정하면 제거된 각 리포지토리에 대해 PSRepositoryInfo 개체를 출력합니다.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
cmdlet을 실행할 경우 발생하는 일을 표시합니다. cmdlet이 실행되지 않습니다.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
입력
String[]
출력
Microsoft.PowerShell.PSResourceGet.UtilClasses.PSRepositoryInfo
기본적으로 cmdlet은 개체를 반환하지 않습니다. PassThru 매개 변수를 사용하면 cmdlet은 제거된 각 리포지토리에 대해 PSRepositoryInfo 개체를 출력합니다.
관련 링크
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
PSResourceGet
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기