ansible/test/integration/targets/win_find/files/set_filedate.ps1

7 lines
211 B
PowerShell
Raw Normal View History

2017-02-08 23:19:08 +01:00
$date = Get-Date -Year 2016 -Month 11 -Day 1 -Hour 7 -Minute 10 -Second 5 -Millisecond 0
$item = Get-Item -Path "$($args[0])"
$item.CreationTime = $date
$item.LastAccessTime = $date
$item.LastWriteTime = $date