I have a folder that I want automatically compress with a script to make space. For that, I use the following script for a folder called 'test':
$a = Get-Item "D:\Aither\Pca\Test"
$a.Attributes += "Compressed"
After some tests, the attribute "hidden" works with the previous code but not with the attribute "Compressed"
Compress contents to save disk space should be checked. Even when turning off my computer, it's not working.
Did I make a mistake in my code or it's just a rights issue ?
