Skip to content

Instantly share code, notes, and snippets.

@informationsea
Created April 21, 2022 05:34
Show Gist options
  • Save informationsea/c7a50548ce198eb05345a4ef8c2e8783 to your computer and use it in GitHub Desktop.
Save informationsea/c7a50548ce198eb05345a4ef8c2e8783 to your computer and use it in GitHub Desktop.
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