Added a lot of stuff

This commit is contained in:
Dan Franciscus
2019-07-10 11:24:06 -04:00
parent 920ac2710c
commit 59cf4a3d7d
5 changed files with 257 additions and 1 deletions

View 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
}