Created
April 21, 2022 05:34
-
-
Save informationsea/c7a50548ce198eb05345a4ef8c2e8783 to your computer and use it in GitHub Desktop.
Create large file with PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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