Untitled
unknown
plain_text
a year ago
358 B
4
Indexable
$rnd = New-Object Random
$chunkSize = 1MB
$totalSize = 10GB
$filePath = "$pwd\randomData.bin"
$fs = [System.IO.File]::OpenWrite($filePath)
$chunks = [math]::Ceiling($totalSize / $chunkSize)
for ($i = 0; $i -lt $chunks; $i++) {
$out = New-Object byte[] $chunkSize
$rnd.NextBytes($out)
$fs.Write($out, 0, $out.Length)
}
$fs.Close()Editor is loading...
Leave a Comment