使用 Compress-Archive 更新現有 ZIP
Compress-Archive -Path C:\Documents\* -Update -DestinationPath C:\Archives\Documents.zip
- 這將新增或替換所有檔案
Documents.zip與C:\Documents中的新檔案
Compress-Archive -Path C:\Documents\* -Update -DestinationPath C:\Archives\Documents.zip
Documents.zip 與 C:\Documents 中的新檔案