Saturday, 20 September 2014

Create multiple instances of custom Powershell object

function Aka($x,$y)
{
 $hash = @{          
        Value1       = $x
        Value2       = $y
    }                  
                                   
   New-Object PSObject -Property $hash  
}

$Obj=@()
$Obj+=Aka 1 2
$Obj+=Aka 2 3
$Obj+=Aka 3 4


No comments:

Post a Comment

ServiceNow onboarding Sailpoint