CmdLets/Library/Find-LibraryApplication.ps1
|
Function Find-LibraryApplication { [CmdletBinding()] Param( [Parameter(Mandatory=$True,ValueFromPipeline=$True)] [String[]]$Name ) Begin { If (!($Global:AppLibrary)) { Throw "Application Library has not been intitialized. Please run Intitialize-Library" } $Applications = @() } Process { Foreach ($Item in $Name) { $Applications += $Global:AppLibrary | Where-Object { $_.Name -like $Item} } } End { $Applications | Select-Object -Property Name } } |