2016-03-24 7 views

答えて

1

回答:

前V5にPowerShellを使用したファイルを圧縮するには、いくつかの実装があり、V5にコマンドレットcompress-archiveがあります。

Hereあなたの質問(ローカルソース、unc dest)と同様のリンクを見つけることができますが、同じように別の方法で動作する必要があります。

0

両方のコンピュータにpowershellがインストールされている場合は、次のコードを実行するだけです。

Legit credentials = new credentials. 
$s = New-PSSession -ComputerName RemotePc -Credential LegitCredentials 
Invoke-Command -Session $s -ScriptBlock 
{ 
Add-Type -assembly "system.io.compression.filesystem" 
[io.compression.zipfile]::CreateFromDirectory($SourcePath,$destinationPath) 
Move-item from $destinationPath to sharedPath 
Move-item from sharedpath to localpath 
} 
関連する問題