In my last blog post, I explained two ways to tackle conditional mapping in ShareGate. In this post, I’ll show you how to use the PnP PowerShell module to handle conditional mapping more efficiently.
As I mentioned earlier, it’s not practical to rely on the ShareGate user interface for each site. That’s where I recommend a better approach -> using PnP PowerShell module.
PnP PowerShell Script:
No big deal! Here’s the scenario I mentioned earlier: you want to run a script that checks each item’s Status (a choice column in your SharePoint list), and if it’s set to “Pending”, the script should update it to “Approved”.
Tip: By default, ShareGate uses PowerShell v5.0, but PnP requires PowerShell v7 to run any scripts. So, if you want to run the PnP module from the same shell, use the
pwsh
command to launch the script.
As of now, this kind of conditional check from source and update it to destination isn’t possible using ShareGate alone.
Don’t know your client ID?, As of September 9th, 2024, this has become mandatory step. This article will guide you through how to do so.
This was just a simple use case. Yours might be more advanced. All the best tackling it!
Feel free to drop your thoughts or questions in the comments section below, I’d love to help if you’re trying something similar.
Thanks again for reading. I hope you’re finding these posts helpful.