Skip to content

Instantly share code, notes, and snippets.

@HarmJ0y
Last active August 31, 2022 17:27
Show Gist options
  • Save HarmJ0y/38c1fabcc5c59118c824 to your computer and use it in GitHub Desktop.
Save HarmJ0y/38c1fabcc5c59118c824 to your computer and use it in GitHub Desktop.
random data file one-liner
$megs=1000;$w=New-Object IO.streamWriter $env:temp\data.dat;[char[]]$c='azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN0123456789-_';1..$megs|ForEach-Object{1..4|ForEach-Object{$r=$c|Get-Random -Count $c.Count;$s=-join $r;$w.Write($s*4kb);}};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment