PS File - copy files remotely with WINRM

Copy files with WINRM

Use the WINRM protocol to copy files to a remote computer.

  1. You
  2. Dir \\ DC02 \ Install $
  3. $ PSSession = New-PSSession -ComputerName DC02
  4. Copy-item -Path '. \ TLS1.2 Checker.exe' destination C: \ Install -ToSession $ PSSession
  5. Remove-PSSession $ PSSession
  6. dir \\ dc02 \ Install $

  1. Check file locally if available
  2. check if the destination exists
  3. Connect now
  4. Copy file into the established session
  5. Close session
  6. Check destination, if file exists

Remote Registry home network