PowerShell: the preference variable $formatEnumerationLimit
Create an array of psCustomObject's. Each of these object has a property named txt and a property named elems. elems is also an array with a varying number of elements:
By default, the value of the preference variable$formatEnumerationLimit is set to 4, thus, PowerShell will write («unnest») up to the first 4 elements of elems:
$formatEnumerationLimit = 4 # Default
$objects | select-object txt, elems
#
# txt elems
# --- -----
# three {A, B, C}
# four {D, E, F, G}
# five {H, I, J, K...}
# six {M, N, O, P...}
# seven {S, T, U, V...}
When $formatEnumerationLimit is increased to 6, PowerShell will accordingly display up to the first six elements of an array:
$formatEnumerationLimit = 6
$objects | select-object txt, elems
#
# txt elems
# --- -----
# three {A, B, C}
# four {D, E, F, G}
# five {H, I, J, K, L}
# six {M, N, O, P, Q, R}
# seven {S, T, U, V, W, X...}