Cách nén và giải nén tệp bằng PowerShell trong Windows 10

How Zip Unzip Files Using Powershell Windows 10



Là một chuyên gia CNTT, tôi thường được hỏi về cách nén và giải nén tệp bằng PowerShell trong Windows 10. Dưới đây là tóm tắt nhanh các lệnh bạn cần biết. Để nén một tệp, hãy sử dụng lệnh Add-Type để tham chiếu cụm System.IO.Compression.FileSystem, sau đó sử dụng phương thức CreateFromDirectory của lớp ZipFile. Ví dụ: Add-Type -AssemblyName System.IO.Compression.FileSystem [IO.Compression.ZipFile]::CreateFromDirectory('C:folder ozip

Bài ViếT Phổ BiếN