How to automate using powershell script

Hi Expert

How to automate it using powershell script daily to transfer 2 files from a network drive and upload it to google drive without user interfering.
alanlam123Asked:
Who is Participating?
 
QlemoConnect With a Mentor Batchelor, Developer and EE Topic AdvisorCommented:
If you want direct access to Google Drive instead of relying on automated synhronisation as shown above, you'll have use something like https://github.com/prasmussen/gdrive instead of RoboCopy or similar commands.
0
 
kenfcampCommented:
A robocopy script setup as a scheduled task should do what you're looking for
0
 
alanlam123Author Commented:
Is there a script reference
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
kenfcampCommented:
Based on your question I'm assuming the network drive is mapped to a drive letter on the system you'll be running this on

With this in mind you could try:

robocopy Z:\some-folder\file1.doc C:\Users\user-name\Documents\google-drive-folder\
robocopy Z:\some-folder\file2.doc C:\Users\user-name\Documents\google-drive-folder\
0
 
Hello ThereSystem AdministratorCommented:
Create a new task that will run Powershell.exe under admin account and then in Arguments field write the path to your script.
(arguments:  -ExecutionPolicy RemoteSigned -File C:\script.ps1)

Script
robocopy S:\yourFile1 C:\Users\%username%\Disk Google\
robocopy S:\yourFile2 C:\Users\%username%\Disk Google\

Open in new window

0
 
alanlam123Author Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.