I am currently trying to remove all special characters from folders in SharePoint online using powershell.
My approach: Retrieve all folders, remove special characters, create new folder and move files from old folder to new folder. For this I need the parent folder of the current folder and here I currently fail:
$subFolder = Get-PnPFolder -List “Shared Documents” -Includes ListItemAllFields
foreach($folder in $subFolder)
$name = $folder.name.Replace(“Ü”, “Ue”)
$parent = $folder.ParentFolder
Add-PnPFolder -Name $name -Folder $parent.path }
Anybody have an idea how I can get to the parent folder with Get-PnPFolder? Result remains NULL.
Any help is appreciated.