Skip to content

Conversation

@ojopiyo
Copy link

@ojopiyo ojopiyo commented Dec 11, 2025

Improvements / Safety Features

  1. Error Handling - The try/catch block ensures the script reports errors instead of failing silently.
  2. Check for Existing URL - Prevents overwriting a folder or list that already exists at the target URL.
  3. Updates List Object Directly - Set-PnPList -Identity $list avoids confusion after moving the folder.
  4. Informative Output - Write-Host shows clear messages on success or failure.

Improvements / Safety Features
1. Error Handling - The try/catch block ensures the script reports errors instead of failing silently.
2. Check for Existing URL - Prevents overwriting a folder or list that already exists at the target URL.
3. Updates List Object Directly - Set-PnPList -Identity $list avoids confusion after moving the folder.
4. Informative Output - Write-Host shows clear messages on success or failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant