WinRM

Requires: Administrative access, member of the Remote Management Users group, or have explicit permissions for PowerShell Remoting in the session configuration

Test Connection

Test-NetConnection -ComputerName [target hostname] -Port 5985 #(5986 for https)

Create Remoting Session

$Session = New-PSSession -ComputerName [target hostname]

Copy File from Local to Target

Copy-Item -Path C:\samplefile.txt -ToSession $Session -Destination C:\Users\Administrator\Desktop\

Copy File from Target to Local

Copy-Item -Path "C:\Users\Administrator\Desktop\DATABASE.txt" -Destination C:\ -FromSession $Session

Last updated