Cmdlets for Microsoft SharePoint

Build 24.0.9060

Remove-SharePoint Cmdlet

Parameters   Output Objects  

Deletes Microsoft SharePoint data.

Syntax

Remove-SharePoint [parameters]

Remarks

The Remove-SharePoint cmdlet allows you to use a syntax similar to SQL DELETE statements to delete Microsoft SharePoint data.

$conn = Connect-SharePoint -User 'MyUserAccount' -Password 'MyPassword' -AuthScheme 'NTLM' -URL 'http://sharepointserver/mysite;'
Remove-SharePoint -Connection $conn -Table "Calendar" -Id "1"
The Where parameter can also be used to specify the primary key:
Remove-SharePoint -Connection $conn -Table "exTablePowershell;" -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'" | Remove-SharePoint

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