How do I set the compress bit for a file using a PS script?
how set compress bit file using ps script? i'd to compress files in folder with a script like gci | compress-item (made up).
thank you.
as quick way set ntfs compression (not zip), i'll use compact.exe command in powershell. example:
$cmd = "compact.exe /c /s:myfile.txt" cmd /c $cmd
Windows Server > Windows PowerShell
Comments
Post a Comment