SharePoint Online: Copy Values from One Column to Another using PowerShell

Requirement: Copy values from one column to another column in SharePoint Online list. PowerShell to Copy List Column Value in SharePoint Online To copy values between columns in the same list, use this PnP PowerShell script: For field types like single lines of text, choice this script works fine. However, for other…

Read more

SharePoint Online: Change Column Order in List using PowerShell

Requirement:  Change Column Ordering in SharePoint Online List. How to Change the Column Order in SharePoint Online? To change the order of columns in a SharePoint Online list or library, do the following: Navigate to the list or library where you want to reorder the columns. Click on Settings gear >> list…

Read more

SharePoint Online: Find Unused Lists based on Last Modified Date

Requirement: Find Unused SharePoint Online Lists based on Last Modified Date How to Get the List Last Modified Date in SharePoint Online? Go to the “Site Contents” page (https://tenant.sharepoint.com/_layouts/15/viewlsts.aspx) of the site either from the left navigation or from the site settings menu of the site, which lets you get the last…

Read more

SharePoint Online: How to Delete a List Template using PowerShell?

Requirement: Delete list template in SharePoint Online How to delete a list template SharePoint Online? To remove a list template in SharePoint Online, do the following: Login to your SharePoint Online site collection (List templates are scoped at site collection level) >> Click on Settings >> Site Settings On the Site Settings…

Read more

SharePoint Online: Archive Large List Items to another List using PowerShell

Requirement: Archive a large list by moving old items to a new list, in order to improve performance. How to Archive List Items in SharePoint Online? You can use the “Site Content and Structure” page to move list items in SharePoint Online. You can access it with the URL: https://tenant.sharepoint.com/_layouts/15/sitemanager.aspx, E.g. https://crescent.sharepoint.com/sites/marketing/_layouts/15/sitemanager.aspx…

Read more

SharePoint Online: Copy Attachments from List to Document Library using PowerShell

Requirement: Copy all attachments from a SharePoint Online List to Document Library How to Copy Attachments from SharePoint Online List? Here is the trick to copy all attachments from the SharePoint Online list: SharePoint stores list item attachments by creating sub-folders for each list item based on the item id under a…

Read more

SharePoint Online: How to Set Value and Disable a Field in List New Form?

Requirement: Disable a Field in SharePoint Online List New Form (NewForm.aspx). How to Set Value and Disable a Field in New Form? I had to fill a few field values from the URL query string and disable those fields in SharePoint Online New Form. My URL for New form would like: https://crescent.sharepoint.com/lists/ack/NewForm.aspx?ID=1&DeviceType=Monitor…

Read more

Fix “List cannot be deleted while on hold or retention policy” Error on SharePoint Online

Problem:  When trying to delete a document library in SharePoint Online, it gave an error message “list cannot be deleted while on hold or retention policy.” Solution: As the error message says: List cannot be deleted while on hold or retention policy, this error is due to the site is under hold…

Read more

How to Get a List by GUID in SharePoint Online?

Requirement: Get a List from GUID in SharePoint Online. Get List by GUID in SharePoint Online: To get a list from its GUID, you can use this URL: https://crescent.sharepoint.com/_layouts/15/listedit.aspx?List=GUID, This takes you to the list settings page of the given GUID. Let’s use PowerShell CSOM to get a list from GUID: PowerShell…

Read more

SharePoint Online: Copy List or Document Library to Another Site using PnP PowerShell

Requirement: Copy Document Library to another site using PowerShell SharePoint Online: Copy Document Library to Another site using PnP PowerShell PnP provisioning engine lets us copy site objects such as lists and libraries, site columns, content types, composed looks, pages, etc. We can export existing customization to XML file and use it…

Read more