Skip to content

Instantly share code, notes, and snippets.

@chrisbrownie
Created October 10, 2017 22:59
Show Gist options
  • Save chrisbrownie/312ce89aec8f321fc51a7ec501971d02 to your computer and use it in GitHub Desktop.
Save chrisbrownie/312ce89aec8f321fc51a7ec501971d02 to your computer and use it in GitHub Desktop.
Used in blog post: Copying files to a server using PowerShell Sessions
$session = New-PSSession -ComputerName MyServer
Copy-Item -Path "C:\myfile.txt" -Target "C:\SomeServerFolder" -ToSession $session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment