Forum Thread: Move Files Over Domain with Command Line

Move Files Over Domain with Command Line

Is there a command line utility or anything that can be used to move files from one computer to another over a domain network?

Heres what im trying to do:
Screenshot a sytem at regular intervals for a specific period of time

Accomplished with this simple batch :

@echo off
cd C:\pstools
md psexec
cd c:\pstools

psexec nircmd.exe loop 2000 3000 savescreenshotwin C:\pstools\psexec\scr~$currdate.MMddyyyy$-~$currtime.HHmmss$.jpeg

Pro : The systems i'll be using this on already have the pstools directory in the C: Drive, and this batch does what i need in terms of number of screenshots and frequency.

Con : The screenshots are saved in the remote machines drive and i would like to automate the process of copying them over the network.

Will convert the bat to backgroung executable to avoid cmd window
Can anyone help?
Also i have gotten domain admin creds.. :)
thanks

7 Responses

i would try to do this (but never tested it):

  1. create a simple Apache server (it doesn't have to contain a website) and store your screenshots in the root directory of that server.
  1. use the Linux command line utility called "wget" to download the file from the Apache server.

-Phoenix750

If you have domain admin creds why just the screenshots? With domain admin creds you essentially own the domain. What ever your reason please explain the setup a little better.

Is the victim and the attacker located on the same LAN or are you trying to cross a WAN like the internet?
If crossing the internet do you have remote access to the domain via the domain admin creds?

i think he means his own domain, and for some reason wants to take screenshots of a certain PC in that domain

-Phoenix750

If its from one domain computer to another domain computer on the same network and you have domain admin credentials I would try powershell with unc paths. For example:

Move-Item -Path \\ComputerA\C$\path_to_pics\*.jpeg -Destination \\ComputerB\C$\path_to_folder -Credentials (Get-Credentials)

Or something like that.

well that could work too.

-Phoenix750

Thanks for responding

Yes DILL im trying to move the screenshots over the network to one location

The exe will be run on various different computers over the domain and what i want to do is to move the screenshots out from the local drives completely to another location i can safely access them.

The powershell idea sounds promising though...haven't done much work in that area of powershell, but could i use it to move files from different machines over the same domain to say, one folder on one machine?

EDIT:
Did the research and yes powershell will do the job.
Thanks for the help

Share Your Thoughts

  • Hot
  • Active