process{if($ClientContext-eq$null){throw"Cannot bind argument to parameter 'ClientContext' because it is null."}if($PSCmdlet.ParameterSetName-eq'ClientObject'){if(-not$ClientObject.IsPropertyAvailable('Id')){Invoke-ClientContextLoad`-ClientContext$ClientContext`-ClientObject$ClientObject`-Retrieval'Id'}}else{if($PSCmdlet.ParameterSetName-eq'Identity'){$PathMethod=New-ObjectMicrosoft.SharePoint.Client.ObjectPathMethod(`$ClientContext,`$ParentObject.ClientObject.Path,`'GetItemById',`[object[]]$Identity)$ClientObject=New-ObjectMicrosoft.SharePoint.Client.ListItem($ClientContext,$PathMethod)Invoke-ClientContextLoad`-ClientContext$ClientContext`-ClientObject$ClientObject`-Retrieval'Id'trap{throw'The specified list item could not be found.'}}}$ClientObject.DeleteObject()$ClientContext.ExecuteQuery()}