function unchunk-PSObject {param([Parameter(Mandatory = $true)]$PSobject) $intermediateprop = @() #create an intermediate array to store our properties that we will comb out from objectchunks. foreach ($chunk in $PSobject) #for each of the two chunks (or more), parse each property in the chunk. (chunk.psobject.properties) { foreach ($property in $chunk.psobject.properties){$intermediateprop += $property} #insert each property into an intermediate table. } $viewobjects = @() $unchunkedobject = new-object pscustomobject #instantiate a new $object for return from the base function. foreach ($property in $intermediateprop) #pull out the properties we care about and insert them with add-member into the new object. { add-member -inputobject $unchunkedobject -membertype $property.membertype -name $property.name -value $property.value -force } $unchunkedobject }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 8410 | Aaron Bockelie |
Root checkin, Perforce Powershell wrapper. Still lots of work to be done, namely documentation and deployment tools, for instance, get-help needs work on the majority of these tools. Additionally, the /lib structure needs a little bit of condensation, probably into major groups (depot, userspec, clientspec, group management, and so on) that way function family can exist under each resource. |