in my PowerShell cmdlet I get an arbitrary number of items via pipeline and want to return chunks of a specified number of items.
When, for example, my script gets as input:
("A", "B", "C", "D", "E", "F", "G")
And I define, let's say 4 as chunk size, I'd like to return something like this:
(
("A", "B", "C", "D"),
("E", "F", "G")
)
Any help would be appreciated.