Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

Copy a text file from local pc to Windows VM using Powershell

$
0
0

Hello,

I need to copy a text file form my pc into the Windows 2012 Vm and I should do it using powershell.

I can connect to VM using Powershell remoting.

I tried the following command but they don't work :

1)robocopy C:\Desktop\tests.txt -Destination myVM.cloudapp.net\c$     > this doesn't work becuase I can not enter credential

2)Copy-Item -Path C:\Desktop\tests.txt -Destination \\myVM.cloudapp.net\c$\test.txt     > this doesn't work becuase I can not enter credential and I don't know how this command works without putting credential of the destination

3) Start-BitsTransfer C:\Desktop\tests.txt -Destination myVM.cloudapp.net\c$

Any Help is highly appreciated.



Viewing all articles
Browse latest Browse all 12545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>