Functions/New-IACategoryObject.ps1
Function New-IACategoryObject{ Param( [Parameter(Mandatory = $true)] [String]$Name, [String]$Description, [String]$Order ) $IACategoryObject = New-Object -TypeName PSObject $IACategoryObject | Add-Member -MemberType NoteProperty -Name 'Name' -Value $Name if($Description){ $IACategoryObject | Add-Member -MemberType NoteProperty -Name 'Description' -Value $Description } if($Order){ $IACategoryObject | Add-Member -MemberType NoteProperty -Name 'Order' -Value $Order } return $IACategoryObject } |