copy file to remote desktop drive - powershell

I want to copy a file from my local C:\filename.png to the remote computer to which I am connected via remote desktop's C:\ drive.
Is it possible to copy using powershell or anyother terminal command?
I am using windows 7 (local PC) --- Remote Desktop (Windows Server 2003)

If your host's c: drive is injected into a terminal services session, it just gets a new drive letter in the remote session.
On my network, my host machine's drives are injected into a VM and C: becomes M:.
So in that case, in the remote session:
copy c:\file.png m:\png
BUt perhaps a beter way - from your host:
Copy \\remote\c$\file.png c:\file.png

My remote session usually names the local resource tsclient, such that I can browse my local C drive with this PS command:
Set-Location \\tsclient\C
then I can do anything I would normally do on the local file system, e.g. copying:
copy \\tsclient\C\file.txt C:\file.txt

You can share a folder on your server and map it as network drive on the client computer. Then you can use the copy command.
At the server side you kann check and deplace the files manually or with a program.

if both are Windows 7 ;
Just copy and paste done in ordinary window

If both machines run the same OS, then it can be achieved
If you are using mstc program then
Go to Remote Desktop Connection -> Options -> Local Resources -> check the drivers option and connect to the remote PC. Then you can perform copy paste like usual

Related

Sync a network drive to local drive with samba

I am working on a windows server which has a CentOS8 vm. I need to sync a directory /mnt/test on the CentOS machine with a folder in C:/ or D:/ in windows server. I did a samba share and was able to map the shared folder /mnt/test as a network drive H:/ on the windows machine. Whatever files I write to /mnt/test appear on H:/ . However I want to sync /mnt/test with some folder in local C or D drive since the downstream application can not read network paths.

How do I get remote access with PowerShell?

I want to connect to a specific set of laptops on our domain remotely. I need to have it log to the C drive, and search out a specific folder, then report back on a specific file contained in the folder.
I have found scripts that have shown me how to locate and show if the path exists, along with a specific file name at the end of the path. I created a test file on my laptop and the script worked flawlessly.
However, I need it to reach out over our domain, log into the target laptop, locate the file and contents then create a report on the findings. This will need to be done over VPN to the devices on our network.
My main issue at this point is finding the commands to invoke PowerShell to log onto the remote computers.
A rough overview on how to remote execute commands with PowerShell.
Enable PSRemoting with Enable-PSRemoting MS docs
Establish a remote connection with Enter-PSSession -ComputerName testserver123.global.local
This opens a prompt of the remote server where you can run commands. Your PS prompt will get a prefix indicating the remote server.
A useful link is here from 4sysops

transfer file from server to home computer

I have a text file on the server(linux) at work and now I am at home. I am a putty user. to connect to the server from home I have to connect to another server (which means I can connect to the server at work, indirectly from home) so I can't use scp command or winscp to transfer or copy my file to my computer at home. does anybody know that how I can transfer or copy my file from the server at work to my home computer(windows system)? thanks.
Since it's a text file, putty's capture feature should work for you. In putty, the capture feature is in Category Session → Logging. Just specify the local filename that you want to save the text file to on your Windows machine, then use Linux's cat command to cat the file on the remote Linux host. With capture enabled in putty, it should save the output of the cat command (i.e. the contents of the text file) to a file locally on your Windows machine.

Copy Files from client machine to Hyper-V Core Host

I would like to import some VMs into a Hyper-V 2012 Core Host (The VMs are Win 7 with different browser versions)
When I use the Hyper-V Manager GUI from my client machine to import the VMs, it only allows me to select files on the Host. I have the VMs on my local client machine. I would like to create a folder on the host and copy my VMs up there.
The host is Hyper-V Core, so I believe PowerShell is my only option. I have, or can get, the necessary access I would need.
You should be able to create a directory on the remote host and copy files to it via UNC paths (assuming the administrative shares are enabled and accessible on the remote host):
New-Item -Type Directory \\hypervisor\C$\some\folder
Copy-Item C:\local\vm \\hypervisor\C$\some\folder -Recurse
Provide alternative credentials via the -Credential parameter if necessary.

How to connect eclipse from local to server

I have a eclipse on windows 7 system and I am trying some code on it.
But as my database is on server that is not my local systems so how can I connect eclipse to remote server so that I can write code on local and run on server.
Is it possible then please let me know and that server to which I want to connect that is Linux server.
Do you have to run your program remotely just because your database resides on the other server? Most databases allow connecting over TCP/IP.
Otherwise my suggestion is to add you public ssh key on the server, and then create a script which copies your class files and then executes your java program on your server, such as:
scp -r classfolder remoteuser#remotesystem:folderpath
ssh remoteuser#remotesystem java -cp folderpath the.created.Program
The public key removes the need for you to enter your password for each command.