Is there a resource on how to pass Object[]as a parameter to a PowerShell function?
Both of these functions are cmdlets, and they are exported correctly, but I do not see the object $Returnin the second function.
Do I need something like the following?
ParameterAttribute.ValueFromPipeline Property (System.Management.Automation)
$Return = My-Function -Param "value"
$ModifiedReturn = My-SecondFunction -Input $Return
Where is my function definition:
function My-SecondFunction
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True)]
[Object[]]$Input
)
begin {}
process
{
Write-Host "test: $Input"
}
end {}
}
source
share