Closed ryder-cayden closed 1 month ago
Hi @ryder-cayden By any chance are you able to use SharePoint Online PowerShell cmdlet Set-SPOHomeSite to set the Home Site? If yes , can please confirm whether you get the same error as using set-pnphomesite?
Hi @reshmee011... The Set-SPOHomeSite works fine based on my testing. I did not get the same error.
I could reproduce the issue with set-pnphomesite. I checked the code, nothing unusual. It used to work in the past. I will try to find out why it is not working.
@reshmee011 - found a fix for this , will PR as well shortly. Ran into this while working for a customer project, sorry 😟
@reshmee011 @ryder-cayden - this issue has been fixed now. Will be available in tomorrow's nightly builds and the next major one when we release it. Thanks for reporting and looking into it.
Thanks so much @gautamdsheth for the fix.
Reporting an Issue
Running the Set-PnPHomeSite when you have multiple Viva Connections throws the following error: "Set-PnPHomeSite: Operation is not valid due to the current state of the object."
Expected behavior
The Home site should be configured without any error.
Actual behavior
There is an error when running that cmdlet
Steps to reproduce behavior
Set-PnpHomeSite -HomeSiteUrl https://tenantName.sharepoint.com/sites/intranet
(please change the HomeSiteUrl parameter accordingly)What is the version of the Cmdlet module you are running?
2.3.0 and 2.4.0
Which operating system/environment are you running PnP PowerShell on?