在其余 API 的输出中:https ://graph.microsoft.com/beta/sites//lists//items,我可以像这样获得 Listitem 值:
"@odata.etag": xxx,
"createdDateTime": xxx,
"eTag": xxx,
"id": xx,
"lastModifiedDateTime": xx,
"webUrl": xxx,
"createdBy": {
"user": {
"displayName": "System Account"
}
},
我想为每个 List 项目获取这些项目数据,但在下面的 foreach 代码中,我只能获取项目的标题和 ID:
$spqQuery = [Microsoft.SharePoint.Client.CamlQuery]::CreateAllItemsQuery()
$items=$ll.GetItems($spqQuery)
$ctx.Load($items)
$ctx.ExecuteQuery()
foreach($item in $items){
Write-Host $item["Title"] $item["id"] -f Yellow
}
如果我写 $item["webUrl"],将得到空值。如何在powershell中获取其他列表项数据?