Wpis z mikrobloga

jak skopiować plik z komputera na inny komputer

#powershell #windows

$ Session = new-PSSession -ComputerName PowerShellAzureMachine -Credential $ cred
Copy-Item -Path C:\temp\localfile.txt -Destination C:\localfile.txt -ToSession $ session

$ File = [System.IO.File] :: ReadAllBytes ( “C:\temp\localfile.txt”)
Invoke-Command -session $ session -ArgumentList $ file -ScriptBlock {[System.IO.File] :: WriteAllBytes ( “C:\localfile2.txt”, $ args)}
GNU / #linux #unix i inne

rsync -a ./plik.txt janusz@12.23.34.56:/
#heheszki #roklinuksa #linuxmasterrace
Pobierz
źródło: comment_S3NrNINQan4fw68YaCXP2rDqnzfRRIRx.jpg
  • 9