I need to transfer files from one computer to a computer on another network using windows. The other computer requires user authentication. It currently works using rsync with Linux and a SSH key. However, I need to do this from a windows machine now. I am trying to do this with Net Use and Robocopy, but I keep getting a "System error 64 has occurred. The specified network name is no longer available." from the net use command.
My current code:
net use \\pcname.website.com\IPC$ /user:pcname\Username password
I have opened up ports 135-139 and 445 both UDP and TCP on the computer's firewall and the router. Is there something else I need to do to the remote machine or add to my code? I did not set up the remote computer profile, but I am the current sole maintainer of it and can edit is as necessary.
Can someone please also clarify the following;
I am using powershell 2.0. I am new to powershell and networking, but not new to programming.
Thanks in advance.
Use the Fully Qualified Domain Name (FQDN)
Copy-item "c:\foldername\" -destnation "\\example.com\c$\foldername\" -credential (get-credential)
here is the same example using robocopy
RoboCopy "C:\homefolder" \\server.com\c$\destinationfolder /E /COPYALL /ZB /LOG+:C:\temp\RoboCopyLog.txt /TEE
You must be logged in to reply to this topic.