我正在网络共享上创建存档以进行备份。
如果我在复制VS之前在本地创建zip文件,那么PowerShell / Windows在幕后的做法有何不同。直接使用网络路径?
选项A
Compress-Archive -Path C:\Something -DestinationPath \\server\share\file.zip
选项B
Compress-Archive -Path C:\Something -DestinationPath C:\file.zip
Move-Item C:\file.zip $networkpath
答案 0 :(得分:2)
我使用Measure-Command测试两种情况。这并没有提供有关幕后发生的事情或回答原始问题的任何学术信息,但它非常有用。
选项A 需要277秒才能完成。
选项B 需要156秒才能完成。