Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create large file with PowerShell
$FillData1 = ""
for ($i = 0; $i -lt 1000; $i++) {
$FillData1 += "0"
}
$FillData2 = ""
for ($i = 0; $i -lt 1000; $i++) {
$FillData2 += $FillData1
}
#$FillData3 = ""
#
#for ($i = 0; $i -lt 1000; $i++) {
# $FillData3 += $FillData2
#}
echo FillData OK
while (1) {
Add-Content -Path test.dat -Value $FillData2 -ErrorAction Stop
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment