process{if($ClientContext-eq$null){throw"Cannot bind argument to parameter 'ClientContext' because it is null."}$ClientObjectCollection=$ParentObject.ClientObject.Listsif($PSCmdlet.ParameterSetName-eq'All'){Invoke-ClientContextLoad`-ClientContext$ClientContext`-ClientObject$ClientObjectCollection`-Retrieval$RetrievalWrite-Output$ClientObjectCollection-NoEnumerate:$NoEnumerate}if($PSCmdlet.ParameterSetName-eq'Identity'){$PathMethod=New-ObjectMicrosoft.SharePoint.Client.ObjectPathMethod(`$ClientContext,`$ClientObjectCollection.Path,`'GetById',`[object[]]$Identity)$ClientObject=New-ObjectMicrosoft.SharePoint.Client.List($ClientContext,$PathMethod)Invoke-ClientContextLoad`-ClientContext$ClientContext`-ClientObject$ClientObject`-Retrieval$RetrievalWrite-Output$ClientObjecttrap{throw'The specified list could not be found.'}}if($PSCmdlet.ParameterSetName-eq'Url'){$PathMethod=New-ObjectMicrosoft.SharePoint.Client.ObjectPathMethod(`$ClientContext,`$ParentObject.ClientObject.Path,`'GetList',`[object[]]$Url)$ClientObject=New-ObjectMicrosoft.SharePoint.Client.List($ClientContext,$PathMethod)Invoke-ClientContextLoad`-ClientContext$ClientContext`-ClientObject$ClientObject`-Retrieval$RetrievalWrite-Output$ClientObjecttrap{throw'The specified list could not be found.'}}if($PSCmdlet.ParameterSetName-eq'Name'){try{$PathMethod=New-ObjectMicrosoft.SharePoint.Client.ObjectPathMethod(`$ClientContext,`$ClientObjectCollection.Path,`'GetByTitle',`[object[]]$Name)$ClientObject=New-ObjectMicrosoft.SharePoint.Client.List($ClientContext,$PathMethod)Invoke-ClientContextLoad`-ClientContext$ClientContext`-ClientObject$ClientObject`-Retrieval$Retrieval}catch{Invoke-ClientContextLoad`-ClientContext$ClientContext`-ClientObject$ClientObjectCollection`-Retrieval'Include(RootFolder.Name)'$ClientObject=$ClientObjectCollection|Where-Object{$_.RootFolder.Name-eq$Name}if($ClientObject-eq$null){throw'The specified list could not be found.'}Invoke-ClientContextLoad`-ClientContext$ClientContext`-ClientObject$ClientObject`-Retrieval$Retrieval}Write-Output$ClientObject}}