Skip to main content
1 of 2
jAC
  • 217
  • 1
  • 4
  • 10

I was able to get this to work by doing the following adjustment (adding string to the variable)

$RootFolder = '/Path/To/Folder'

$folders = Get-PnPFolderItem -FolderSiteRelativeUrl $RootFolder

foreach ($folder in $folders){
    [string] $folderName = $folder.Name
    $user = Get-PnPUser | Where Title -Like "*$folderName*"}
}
jAC
  • 217
  • 1
  • 4
  • 10