Get-PSResourceRepository
Menemukan dan mengembalikan informasi repositori terdaftar.
Sintaks
Get-PSResourceRepository
[[-Name] <String[]>]
[<CommonParameters>]
Deskripsi
Cmdlet ini mencari repositori sumber daya PowerShell yang terdaftar di komputer. Secara default, ia mengembalikan semua repositori terdaftar.
Contoh
Contoh 1
Contoh ini mengembalikan semua repositori yang terdaftar di komputer.
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
Contoh 2
Contoh ini menggunakan parameter Nama untuk mendapatkan repositori tertentu.
Get-PSResourceRepository -Name PSGallery
Name Uri Trusted Priority
---- --- ------- --------
PSGallery https://www.powershellgallery.com/api/v2 False 50
Contoh: 3
Contoh ini menggunakan parameter Nama untuk mendapatkan semua repositori yang diakhapi dengan Gallery
.
Get-PSResourceRepository -Name "*Gallery"
Name Uri Trusted Priority
---- --- ------- --------
PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
PSGallery https://www.powershellgallery.com/api/v2 False 50
Contoh 4
Contoh ini menggunakan parameter Nama untuk mendapatkan daftar respositori bernama.
Get-PSResourceRepository -Name "PSGallery","PoshTestGallery"
Name Uri Trusted Priority
---- --- ------- --------
PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
PSGallery https://www.powershellgallery.com/api/v2 False 50
Parameter
-Name
Nama repositori yang akan dicari. Penggunaan wildcard didukung. Penyelesaian tab untuk parameter ini berputar melalui nama repositori terdaftar.
Type: | String[] |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | True |
Input
String[]
Output
Microsoft.PowerShell.PSResourceGet.UtilClasses.PSRepositoryInfo
PSResourceGet
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk