I created a new SP Online site using PnP cmdlet.
New-PnPTenantSite
Is there a way to track if the new site is ready or getting provisioned?
I created a new SP Online site using PnP cmdlet.
New-PnPTenantSite
Is there a way to track if the new site is ready or getting provisioned?
@PrateekSrivastava-2439
I'm checking how the things are going on about this issue. Whether the answer helps you?
You can accept the answer if it helps.
If an 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.
Try to use -wait
like New-PnPTenantSite -Title Contoso -Url "https://tenant.sharepoint.com/sites/contoso" -Owner user@example.org - Wait -TimeZone 4 -Template STS#
You could visit the site collection directly using the URL to check whether the site collection is exist.
You could use PowerShell to check whether the site collection is exist.
$AdminCenterURL = "https://tenant -admin.sharepoint.com"
$SiteURL = "site collection URL "
$Cred = Get-Credential
Try
{
#Connect to Tenant Admin
Connect-PnPOnline -URL $AdminCenterURL -Credential $Cred
#Check if site exists
$Site = Get-PnPTenantSite | Where {$_.Url -eq $SiteURL}
If ($Site -eq $null)
{
Write-host "Site Collection $($SiteURL) doesn't exists!" -foregroundcolor Yellow
}
Else
{
Write-host "Site $($SiteURL) exists already!" -foregroundcolor Green
}
}
catch {
write-host "Error: $($_.Exception.Message)" -foregroundcolor Red
}
Go to SharePoint admin center -> Sites -> Active sites -> Search the site collection name to check whether the site collection is exist.
If an 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.
The problem is Get-PnPTenantSite always returns true if you call this immediately after New-PnPTenantSite.
But by that time the site doesn't show up under Active Sites.
And so if you try to connect the newly created site ,it throws an error as the site is still in the process of being created
This shows that the site has not been created.
If an 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.
5 people are following this question.