No, no, no. You don't want to hardcode all of those New-Item's, that's what the ForEach loops are for.
And you changed the directory structure. From: names like D:\Test\Directory7\1.txt where you asked how to replace the "7" with the numbers 1-6. Now you've got everything in folder1, with subfolders that are just a number.
Look at this.
1..7 | ForEach-Object {
""
$Dir = "D:\Test\Directory{0}" -f $_
$Dir # Show the directory name
# Create the directory here.
1..10 | ForEach-Object {
$File = "{0}\{1}.txt" -f $Dir, $_
$File # Show the file name
# Create the file here
}
}