Unregister-PSRepository
取消注册存储库。
语法
Default (默认值)
Unregister-PSRepository
[-Name] <String[]>
[<CommonParameters>]
说明
Unregister-PSRepository cmdlet 取消注册当前用户的存储库。
这是 Unregister-PSResourceRepository 中 cmdlet 的代理 cmdlet。 有关详细信息,请参阅 Unregister-PSResourceRepository。
示例
示例 1:注销存储库
此示例取消注册名为 myNuGetSource 的存储库。
Unregister-PSRepository -Name "myNuGetSource"
示例 2:注销所有存储库
此示例使用 Get-PSRepository 获取所有已注册的存储库,并使用管道操作员将其传递给 Unregister-PSRepository 以注销它们。
Get-PSRepository | Unregister-PSRepository
参数
-Name
指定要删除的存储库的名称数组。
参数属性
| 类型: | String[] |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | 0 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。