Blog: Powershell

Using Windows Powershell, you can get timestamps for creation, last access, and last write times. 

Examples:

  • PS>$(Get-Item ).creationtime=$(Get-Date "mm/dd/yyyy hh:mm am/pm")
  • PS>$(Get-Item ).lastaccesstime=$(Get-Date "mm/dd/yyyy hh:mm am/pm")
  • PS>$(Get-Item ).lastwritetime=$(Get-Date "mm/dd/yyyy hh:mm am/pm")

Another thing that the Powershell can be used for is setting the timestamps to whatever value you want.  It can be future or past.

Here is an example of setting the last write time of file “test.txt” to 1-1-2020:

  • PS>$(get-item test.txt).lastwritetime=$(set-date "01/01/2020")

 

Public folder permissions can be challenge with Exchange 2007, primarily because Microsoft removed the options from the GUI and replaced them with Powershell commands.  It’s particularly difficult to make mass changes because there’s not a single command to propagate permissions to all subfolders.  However Microsoft does provide Powershell scripts to help with this.  By default they are saved at C:\Program Files\Microsoft\Exchange Server\Scripts.  [more]

More information about these scripts is available at http://technet.microsoft.com/en-us/library/aa997966%28EXCHG.80%29.aspx.