Added a lot of stuff
This commit is contained in:
16
functions/Get-ChocoSourcePackages.ps1
Normal file
16
functions/Get-ChocoSourcePackages.ps1
Normal file
@@ -0,0 +1,16 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Outputs all package names for one or multiple Chocolatey sources.
|
||||
.EXAMPLE
|
||||
Get-ChocoSourcePackages -Sources repo1,repo2
|
||||
#>
|
||||
function Get-ChocoSourcePackages {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string[]]$Sources
|
||||
)
|
||||
$Sources | ForEach-Object {
|
||||
choco list --source=$_ -r | ForEach-Object {$_.split("|")[0]}
|
||||
} | Sort-Object -Unique
|
||||
}
|
||||
Reference in New Issue
Block a user