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))

 

 

 

Published by

Henrik Damgaard

Hi I’m Henrik and I write this blog based on useful topics I find interesting – mostly covering some of my technical interests : System Center Operations Manager (SCOM), BizTalk, Windows Server, PowerShell, SQL server, Internet Information Services, PHP and .NET I am currently holding a position as System Administrator with focus on Microsoft server products.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.