I have a script that exports a site and restores it in another web application. I want to check if the target site already exists. Is there an easy way to tell if www.example.org/sites/asite/ is free, without throwing an error in Powershell?
Tell me more
×
SharePoint Stack Exchange is a question and answer site for
SharePoint enthusiasts. It's 100% free, no registration required.
|
Using Powershell's ErrorAction you can suppress the error if a web does not exist.
|
|||
|
|
|
SharePoint 2010:
SharePoint 2007:
|
|||||||||||
|
