Hi,
The parameter -Parent only accepts an Int32 so $ParentID cannot be an array. You have to pass one item of the array to the cmdlet each time.
https://learn.microsoft.com/en-us/powershell/module/sharepoint-pnp/add-pnpnavigationnode?view=sharepoint-ps#parameters
Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.