Private/SendItemsToOutput.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
function SendItemsToOutput { Param ( [parameter()] [PSObject[]]$items, [parameter(Mandatory=$true)] [string[]]$typeName ) foreach ($i in $items) { $i.PSObject.TypeNames.Insert(0, $typeName) Write-Output $i } } |