Forum Discussion
Asutosh
Aug 06, 2025Copper Contributor
Need to Convert SharePoint Document Set to Normal Folder Without Changing URL
I have an existing Document Set in a SharePoint Online document library that I want to convert into a standard folder. However, it's critical that I do not move the files or change the URL structure,...
volteak
Aug 07, 2025Brass Contributor
Use a PowerShell script to convert a document set to a folder while retaining the URL:
Connect-PnPOnline -Url https://yourdomain.sharepoint.com/sites/yoursite
$docSet = Get-PnPListItem -List Documents” -Id <ItemID>
$docSet[ContentTypeId] = 0x0120 # Folder content type ID
$docSet.Update()
Invoke-PnPQuery