Mục lục bài viết
Update: 2022-02-09 14:57:03,You Cần tương hỗ về Set-PnPListItem date. Bạn trọn vẹn có thể lại phản hồi ở cuối bài để Ad đc tương hỗ.
The PowerShell commands of the PnP Frameworkhave many useful commands that help you manage SharePoint trực tuyến. One of these commands is the Set-SPOListItem Command.
Tóm lược đại ý quan trọng trong bài
Set-SPOListItem Identity <ListItemPipeBind> [ContentType <ContentTypePipeBind>] [Values <Hashtable>] [Web <WebPipeBind>] List <ListPipeBind>
All the parameters are quite easy to understand:
ParameterTypeRequiredDescriptionContentTypeContentTypePipeBindFalseSpecify either the name, ID or an actual content typeIdentityListItemPipeBindTrueThe ID of the listitem, or actual ListItem objectListListPipeBindTrueThe ID, Title or Url of the list.ValuesHashtableFalseUse the internal names of the fields when specifying field namesWebWebPipeBindFalseThe web to apply the command to. Omit this parameter to use the current web.
The majority of the issues with this command are related to the Values. How do you update all the different column formats. In this article Im trying to give a full overview of all the possible options.
I have created a list called TestList and Ive added a list item to the list. For each column type of Ive added a new column to the list.
Table of Contents
Set-SPOListItem -List TestList -Identity 1 -Values @Title = Title New
For a simple multiple lines of text column the following will work:
Set-SPOListItem -List TestList -Identity 1 -Values @MultiText = New text
To update formatting in the rich text field use the following syntax by including html.
Set-SPOListItem -List TestList -Identity 1 -Values @MultiText = New text
For a choice column called Choicethat has the options
The following syntax can be used:
Set-SPOListItem -List TestList -Identity 1 -Values @Choice = Value 1
Set-SPOListItem -List TestList -Identity 1 -Values @Number = 10
Set-SPOListItem -List TestList -Identity 1 -Values @Currency = 10
Set-SPOListItem -List TestList -Identity 1 -Values @DateAndTime = 03/10/năm ngoái 14:16
Ok, setting lookups can be really complicated. Well not with the PnP PowerShell commands. Simply use the ID of the item in the Lookup:
Set-SPOListItem -List TestList -Identity 1 -Values @Lookup = 2
Set-SPOListItem -List TestList -Identity 1 -Values @YesNo = No
Setting a person field is harder
Set-SPOListItem -List TestList -Identity 1 -Values @Person = 3
The above sets the person field to the owner groupof the site. I found that 1 sets the user toan internal user. 2 gives an invalid user.
For a multi-people column the following lines of PowerShell will add 2 people:
$peopleArr = @()
$peopleArr +=
$peopleArr +=
Set-SPOListItem -List testlist -Identity 1 -Values @People=$peopleArr
Set-SPOListItem -List TestList -Identity 1 -Values @Hyperlink = sharepains, SharePains
Like Loading…
Office 365 SharePoint Team Site or Team Site SharePoint Online ConfigurationOffice 365 SharePoint The New Site Contents A Complete Overview
Reply
9
0
Chia sẻ
– Một số từ khóa tìm kiếm nhiều : ” Video full hướng dẫn Set-PnPListItem date tiên tiến và phát triển nhất , Share Link Cập nhật Set-PnPListItem date “.
You trọn vẹn có thể để lại Comments nếu gặp yếu tố chưa hiểu nha.
#SetPnPListItem #date Set-PnPListItem date