Home >Tips >PowerShell with SharePoint from Scratch >Upload files to SharePoint with scheduled task kalmstrom.com site map icon Site map  

Upload files to SharePoint Library with Scheduled Task

A PowerShell with SharePoint tutorial

PowerShell iconSharePoint has several methods to upload files from Windows Explorer to a document library, but if you want to do it automatically, you should use a PowerShell script.

In such a scenario, you can put all files that should be uploaded in a specific folder and then they will be uploaded automatically to the SharePoint library of your choice.

In the previous article, Peter Kalmström explainded how to expand the upload script that he created earlier, so that all copied files are moved to a subfolder. That way, they will not be uploaded to the library again.

In the demo below, Peter will not write new code but instead explain how to schedule a task that runs the script automatically. For that, he creates a "script running" task the Task Scheduler, which is included in Windows.

Note that the SharePoint credentials need to be stored in Windows Credential Manager if you want to run a PowerShell script that connects to SharePoint automatically. We have explained how to do that in an earlier article.
PowerShell with SharePoint from Scratch cover
In the next article, we will show how metadata can be included in the uploaded files.

You will find more detailed explanations in the book.

back icon next icon
Products Buy FAQ Services Tips Books Contact About Us Tools

Security and integrity

Copyright  Kalmstrom Enterprises AB  All rights reserved