다음을 통해 공유


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 개체를 출력합니다.