Forum Discussion
copy an mhtml document from a local share to a SharePoint Online document library on a schedule
Joe...you're best option would be to use PowerShell and add the file to the library. Here is a script that will help.
- Joe FischerJul 17, 2018Brass Contributor
Thanks Steve,
This looks too easy :)
Is there a way to automate that?
It looks like it will prompt for a password.
Thanks Again,
joe
- spucelikJul 17, 2018
Microsoft
Joe...use this variable to "hard" code the password to avoid the prompt:
$Password = ConvertTo-SecureString –String "<PASSWORD>" –AsPlainText -Force
You can also use the task scheduler to run the script. here are the actions you should use when configuring the task.
Program/Script: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Add Arguments: -psconsolefile "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\CONFIG\POWERSHELL\Registration\psconsole.psc1" -command "[FullPathToScript]"
- Joe FischerJul 17, 2018Brass Contributor
Thanks Again,
I will le you know how it goes..
Joe