I need to split a csv/Excel/text file. I require to split this file using PowerShell. I am invoking PowerShell script by my c# code. I need PowerShell script which could split file based on the size I pass. Suppose I have big file of size 1000 mb and I pass size of 100 mb . Then It should split big file in 10 files in each having equal size of 100 mb . Also I need to maintain the header of file in each small file.
Please help me on this.