Closed clarkec2 closed 4 months ago
@clarkec2 , thank you for reporting this issue. Could you please verify the entered Site Name? It should not contain any spaces. Also, check if the Site exists in Deleted or Active Sites. If it does, either delete it permanently or use a different name when running the script.
We have attempted to use TEOC, TeamsEOCSite and TeamsEmergencyOperationsCenter. All with the same error. No sites exist in our tenant with those names. I was able to work around the issue by manually creating the site in the SP Admin, then running the following to apply the template
$TemplateFilePath = "";
$DestinationSiteUrl = Read-Host -Prompt "Please enter destination SharePoint site URL (e.g. https://sharepoint.com/sites/SiteName)";
Connect-PnPOnline -Url $DestinationSiteUrl -Interactive;
Invoke-PnPSiteTemplate -Path $TemplateFilePath;
Disconnect-PnPOnline;
@clarkec2 , Please ensure that you are executing these scripts on PowerShell 7.2 or later, as it is a prerequisite for using PnP PowerShell. Additionally, update PnP PowerShell and attempt to run the scripts again.
Thanks for the tip, I am and have been running the up to date versions of both Powershell and the PNP Module. Looking over the provided template the issue may have lied in with the SiteName/SiteURL coding not taking in account for custom domains and branding. Weve gotten past it!
I have custom URLs in place and was able to alter the EOC-Provision script to connect to our tenant, however whenever I put the Site Name in to be created I am met with this... I am not using any special characters anywhere and have altered the variables multiple times all with no success.