Created
October 10, 2017 22:59
-
-
Save chrisbrownie/312ce89aec8f321fc51a7ec501971d02 to your computer and use it in GitHub Desktop.
Used in blog post: Copying files to a server using PowerShell Sessions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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