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

Popular posts from this blog

Azure MFA with Azure AD and RDS

Failed to setup initiator portal. Error status is given in the dump data.

Invalid pointer on gpresult /h gpreport.html