Windows-Powershell Compress-Archive:流程顺序是什么?

Windows-Powershell Compress-Archive: Whats the process order?

我有一个简单的 "error.log" 压缩脚本,想知道 Windows Powershell "Compress-Archive" 命令执行其操作的顺序,特别是当您将压缩文件移动到另一个驱动器时.所以如果我有

$compress = @{
    LiteralPath = $SourceDir
    DestinationPath = $TagetZip
}

Compress-Archive @compress

$TargetZip 在 "remote" 驱动器上(例如非常慢的外部 HDD),它会先压缩,然后移动吗?它会直接将内容流式传输到遥控器吗?最坏的情况是它先将文件复制到远程然后再压缩。

Compress-Archive 使用交换文件和 RAM 内存创建存档,然后将其移动到目标位置。