> Get-ChildItem '.\新規 Text Document.txt' | Select-Object -Property CreationTime
CreationTime
------------
2021/06/30 11:31:54
> Get-ChildItem '.\新規 Text Document.txt' | Select-Object -Property LastWriteTime
LastWriteTime
-------------
2021/07/14 11:15:14
> Set-ItemProperty '.\新規 Text Document.txt' -Name LastWriteTime -Value '2021/07/14 06:09:00'
更新時刻に現在日時を混ぜて使いたいなら、環境変数を使うのが楽。
コマンドラインやバッチファイルから、以下の様に実行すると、シングルコーテーションの中身も置換されてから実行されるのでシンプル。
@powershell -Command "Set-ItemProperty '.\新規 Text Document.txt' -Name LastWriteTime -Value '%DATE% 01:01:00'"