title: How to modify Last Write Time and Last Access on folder
body: <p>We need to change the folder attributes in relation to Last Write Time and Last Access on lots of folders on the server.</p>
  
  <p>We found away to do this by running Powershell as follow:</p>
  
  <pre><code>set-itemproperty -Path C:\testsource\folder1 -Name LastWriteTime -Value ((get-date).adddays(-90))
  </code></pre>
  
  <p>As you can see the get-date method is adding adddays stuff. Is there any function that can sets the exactly as "2013-05-03 11:31" upto a minute ?</p>
  
  <p>The reason is that I had this exact date for instance from previous backup "2013-05-03 11:31" and need to be replaced "2015-03-12 18:31" as you can see if it's very challenge to set addminute cause we are dealing with hundreds folder.</p>
  
  <p>Thanks for the input.</p>