How to Change File Properties (ReadOnly, CreationTime etc.) Using PowerShell

Changing file properties is quite easy with PowerShell.

 

Remove ReadOnly attribute:

Set-ItemProperty -Path 'C:\Program Files\desktop.ini' -Name IsReadOnly -Value $false

 

Change CreationTime (90 days back in time):

Set-ItemProperty -Path 'C:\Program Files\desktop.ini' -Name CreationTime -Value ((Get-Date).AddDays(-90))