ansible/test/integration/targets/win_find/files/set_filedate.ps1
2017-02-08 22:19:08 +00:00

6 lines
211 B
PowerShell

$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