< Back

Split-Array

Mon Jan 13, 2020 2:32 am

NAME Split-Array



SYNOPSIS

Splits an input Array into chunks.





SYNTAX

Split-Array [-InArray] <Object[]> [[-SplitCount] <Int32>] [<CommonParameters>]





DESCRIPTION

Splits an input Array into chunks.





PARAMETERS

-InArray <Object[]>

input Array.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-SplitCount <Int32>

(Optional)Number of chunks to create from input file. Default = 4



Required? false

Position? 2

Default value 4

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

List of arrays





NOTES





AUTHOR: Cyrus Jamula

LASTEDIT: Febuary 13th, 2018



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$a=1..15



Split-Array -Input $a











RELATED LINKS