Forum Discussion
Editing 'SharePoint added' file properties on the local computer with PowerShell
Hello all, first time posting here, thank you all in advance!
We have a SharePoint library with a templates folder that users download documents from. They will then edit and add information, and upload the finished document to another SharePoint folder.
I have automated a lot of the process with a PowerShell script on their desktops. My script opens the file (always an excel file, so I use the com object abilities in PowerShell), fill a few cells with some default data based on the user who is logged in and the current date and so on. I then save it to a local folder (with an informative file name) for editing and open the file for the user.
But now that our SharePoint library is getting fuller, I am trying to make better use of SharePoint file properties and indexed columns. I have noticed the columns I added to our library are visible on the info page of the workbooks in excel, so they are part of the file even when its on the local computer. And I can even edit the fields in excel, before uploading them to SharePoint.
I would like to do this automatically for the user in my PowerShell script. I am already opening the file and filling some cells. Can I also set these properties that are used by SharePoint?