Creating an array of objects in an object - Powershell -
i wish create array of events in calendar. both event , calendar objects. couldn't find documentation creation of simple array in object.
how -
$cal = new-object -type psobject -prop @{ year = 2013 events = @() } $event = new-object -type psobject -prop @{ date = [datetime] "2013-02-14" name = "valentines day" } $cal.events += $event
if have predefined calendar objects doesn't have property store events can utilize add-member
attach new property , store array in there.
arrays object powershell
No comments:
Post a Comment