Update a Sharepoint List (document library)

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 14 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
ismailc
Posts: 37
Last visit: Tue Jun 09, 2015 12:16 am

Update a Sharepoint List (document library)

Post by ismailc »

Good day, I need help.
I need to update a Sharepoint List using Powershell from my PC & not on the Sharepoint Server. Very new to Powershell - only installed yesterday on my PC.
I installed powershell got powershell to execute a simple script successfully. Now trying to update the Document Library Ran this on my PC: PS C:> .Powershell1.ps1
i get the following error: New-Object : Cannot find type [Microsoft.SharePoint.SPSite]: make sure the asse mbly containing this type is loaded. At C:Powershell1.ps1:7 char:21 + $spSite = new-object <<<< Microsoft.SharePoint.SPSite
The code of the file: [System.Reflection.Assembly]::LoadWithPartialName(
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Update a Sharepoint List (document library)

Post by jvierra »

Updates directly to teh database are possible but be careful as you have little control over much of the environment.

Good Luck
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

Update a Sharepoint List (document library)

Post by jhicks »

If you can do something with VBScript you can easily do it in PowerShell, sometimes even easier. PowerShell can work with COM objects like VBScript and even with VBScript objects like wscript.network.
This topic is 14 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked