Overwriting existing file like 1..10 > file.txt
, 1..10 | Out-File file.txt
, or 1..10 | Set-Content file.txt
, never changes creation time in NTFS.
You have to delete the file explicitly like rm file.txt; 1..10 > file.txt
, or change creationTime explicitly like Set-ItemProperty .\file.txt -name CreationTime -Value (Get-Date)
.