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.
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 instead of RoboCopy or similar commands.
A robocopy script setup as a scheduled task should do what you're looking for
alanlam123Author Commented:
Is there a script reference
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!

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\
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)

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

Open in new window

alanlam123Author Commented:
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.