Replies: 4 comments
-
Please set tracing to "debug" using Set-PnPTraceLog and provide further information. This will allow the community to better understand the issue. |
Beta Was this translation helpful? Give feedback.
-
Same here as well, will have to move this to discussions since this an issue with the environment itself and not the cmdlet. |
Beta Was this translation helpful? Give feedback.
-
I have the same issue. Randomly I get the error "Cannot get site https://$MY-URL". Is there some fix for this? |
Beta Was this translation helpful? Give feedback.
-
It looks like site provisioning isn't completely done, even though you set wait. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a script that creates a new sharepoint site. One of the steps involves modifying some of the settings for the site, which I do via the following command:
Set-PnPTenantSite -Connection $Connection -Identity "$SiteFullURL" -DenyAddAndCustomizePages:$false -DisableAppViews:Disabled -DisableFlows:Disabled -Wait -ErrorVariable result -ErrorAction Continue
It will, completely randomly, fail with:
Set-PnPTenantSite: /$PATH/MasterSiteCreateScript.ps1:104:9
Line |
104 | Set-PnPTenantSite -Connection $Connection -Identity "$SiteFul …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot get site https://$MY-URL.
To get around it, I have had to put it into a loop where I retry the command several times.
Expected behavior
I expect it to execute successfully. The site most definitely exists.
Actual behavior
It randomly fails for unknown reasons.
Steps to reproduce behavior
Pseudocode is:
New-PnPTenantSite -Url $SiteFullURL -Owner $SiteOwner -Title $SiteTitle -Template $SiteTemplate -TimeZone $TimeZone -RemoveDeletedSite -Wait
$Connection = Connect-PnPOnline -Url $SiteFullURL -ReturnConnection -Credentials $Credential
Set-PnPTenantSite -Connection $Connection -Identity "$SiteFullURL" -DenyAddAndCustomizePages:$false -DisableAppViews:Disabled -DisableFlows:Disabled -Wait -ErrorVariable result -ErrorAction Continue
Step 8 fails randomly with the above error, despite the fact that I had very obviously created the site and had performed multiple operations against it already. A subsquent attempt likely succeeds, so I've had to put that command into a while loop to retry.
What is the version of the Cmdlet module you are running?
Confirmed with 1.10.0 and 1.11.0
Which operating system/environment are you running PnP PowerShell on?
Beta Was this translation helpful? Give feedback.
All reactions