 <pre><code>$s = get-content YourFileName | Out-String $a = $s.ToCharArray() $a[0..103] # will return an array of first 104 chars </code></pre> <p>You can get your string back the following way, the replace removes space char( which is what array element separators turn into)</p> <pre><code>$ns = ([string]$a[0..103]).replace(" ","") </code></pre>