Cmdlets for Microsoft SharePoint

Build 24.0.8963

Update-SharePoint Cmdlet

Parameters   Output Objects  

Updates Microsoft SharePoint data.

Syntax

Update-SharePoint [parameters]

Remarks

The Update-SharePoint cmdlet allows you to use a syntax similar to SQL UPDATE statements to update Microsoft SharePoint data.

$conn = Connect-SharePoint -User 'MyUserAccount' -Password 'MyPassword' -AuthScheme 'NTLM' -URL 'http://sharepointserver/mysite;'
Update-SharePoint -Connection $conn -Table "Calendar" -Columns @("Location") -Values @("France") -Id "1"
The Where parameter can also be used to specify the primary key of the table:
Update-SharePoint -Connection $conn -Table "Calendar" -Columns @("Location") -Values @("France") -Where "Id = '1'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-SharePoint -Connection $conn -Table Calendar -Where "Location = 'Chapel Hill'" | Update-SharePoint -Columns @("Location") -Values @("Chapel Hill 2")

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.8963