Functions/Test-ObjectInput.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
Function Test-ObjectInput { [CmdletBinding()] Param ( [Parameter(Mandatory)][psobject]$PSObjectInput ) $HashTable = @() Write-Verbose "PSObjectInput is: $PSObjectInput" [int]$I = 1 <# ForEach ($Item in $PSObjectInput) { Write-Verbose "$I" $I++ Write-Verbose "$Item" $HashTable += @( [pscustomobject]@{ ArrayItem = $Item ItemNumber = $I } ) } #> $PSObjectInput } |