SharePoint PnP PowerShell - 从“选择”字段中进行选择

问题描述 投票:0回答:1

我试图从选择字段中选择选项,但选择字段不作为文本返回。

标题字段是一个选择字段:

Id    Title              GUID
--    -----              ----
76    76_                0452370b-7278-43ab-915a-e29aa6a815f7

我期待的是以下之一:

  • 打开
  • 出售
  • 丢失

这是相关代码:

foreach ($subsite in $sites) {
    # Get the web object of the subsite
    $subWeb = Get-PnPWeb -Identity $subsite.Id
    $ctx.load($subWeb.Lists)    
    $projectStatus = Get-PnPList -Identity "Lists/Project Status" -Web $subWeb
    Invoke-PnPQuery    
    if ($projectStatus) {
        Write-Host "$($subsite.Title): $($projectStatus.Id)"
        $listItems = Get-PnpListItem -List $projectStatus.Id -Web $subWeb
        foreach ($item in $listItems) {            
            $item
        }
    }
}
powershell sharepoint
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.