Unregister-PSResourceRepository
Eltávolít egy regisztrált adattárat a helyi gépről.
Syntax
Unregister-PSResourceRepository
[-Name] <String[]>
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
A parancsmag eltávolít egy regisztrált adattárat a helyi gépről.
Példák
1\. példa
Ebben a példában eltávolítja az PSGv3
adattárat a helyi gépről.
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\. példa
Ez a példa bemutatja, hogyan távolíthat el több regisztrált adattárat egyetlen parancsból. A Name paraméter elfogad egy tömböt, amely az eltávolítandó adattárak nevét tartalmazza.
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
Paraméterek
-Confirm
Jóváhagyást kér a parancsmag futtatása előtt.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Egy vagy több eltávolítandó adattár neve.
Type: | String[] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PassThru
Ha meg van adva, egy PSRepositoryInfo objektumot ad ki minden eltávolított adattárhoz.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Bemutatja, mi történne a parancsmag futtatásakor. A parancsmag nem fut.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Bevitelek
String[]
Kimenetek
Microsoft.PowerShell.PSResourceGet.UtilClasses.PSRepositoryInfo
Alapértelmezés szerint a parancsmag nem ad vissza objektumokat. A PassThru paraméter használatakor a parancsmag egy PSRepositoryInfo objektumot ad ki minden eltávolított adattárhoz.
Kapcsolódó hivatkozások
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: