pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
989 stars 662 forks source link

Feature request: cmdlet to check if "alias" (URL) can be used to create a new site #2695

Closed heinrich-ulbricht closed 4 years ago

heinrich-ulbricht commented 4 years ago

Reporting an Issue or Missing Feature

Missing Feature

Expected behavior

I want to delete and re-create a site in SPO under the same URL. After deleting the site I want to check if the URL is available for re-use (which may take seconds or up to 24 hours according to the official docs).

Actual behavior

There is no such cmdlet. But apparently there is an API which is used by the tenant site creation UI and some private code in PnP-Sites-Core, too:

https://github.com/pnp/PnP-Sites-Core/blob/93f12b1f342b432a2a99b8bb119508fc7af8cb22/Core/OfficeDevPnP.Core/Sites/SiteCollection.cs#L1034

This could be leveraged to check if a site is available because if not it will suggest a different URL than requested.

Which version of the PnP-PowerShell Cmdlets are you using?

ghost commented 4 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

KoenZomers commented 4 years ago

Nice idea @heinrich-ulbricht, working on the PR to add this functionality.

KoenZomers commented 4 years ago

PR has been filed in PnP Sites Core (https://github.com/pnp/PnP-Sites-Core/pull/2657) and PnP PowerShell (https://github.com/pnp/PnP-PowerShell/pull/2698) which adds this functionality.