Public/Add-Parameter.ps1
function Add-Parameter { [CmdletBinding()] param ( [Parameter( Mandatory, ValueFromPipeline )] [ValidateNotNullOrEmpty()] [PsCustomObject] $Pipeline, [Parameter( Mandatory, Position = 0 )] [ValidateNotNullOrEmpty()] [string] $Name, [Parameter( Mandatory, Position = 1 )] [ValidateNotNullOrEmpty()] [string] $Type ) process { $Pipeline.properties.parameters | Add-Member $Name ([PSCustomObject]@{ type = $Type }) } } |