Move-SPWeb

Move an SPWeb from one URL to another.

Move-SPWeb [-UrlName [<String>]]

Parameters

1

ParameterRequiredTypeDescription
UrlNameFalseString

Specifies the URL name of the Web. If not specified then the current URL name is used. For example, if moving http://portal/foo/bar, "bar" is the URL name of the Web.

Detailed Description

Move an SPWeb from one URL to another.

Copyright 2016 Falchion Consulting, LLC

> For more information on this cmdlet and others:

> http://blog.falchionconsulting.com/

> Use of this cmdlet is at your own risk.

> Gary Lapointe assumes no liability.

Examples

------------------EXAMPLE 1-----------------------

PS C:\> Move-SPWeb -Identity "http://portal/foo/bar" -Parent "http://portal/"

This example moves the Web located at http://portal/foo/bar to http://portal/bar.

------------------EXAMPLE 2-----------------------

PS C:\> Move-SPWeb -Identity "http://portal/foo/bar" -Parent "http://portal/" -UrlName "foobar"

This example moves the Web located at http://portal/foo/bar to http://portal/foobar.

------------------EXAMPLE 3-----------------------

PS C:\> Move-SPWeb -Identity "http://portal/foo/bar" -UrlName "foobar"

This example moves the Web located at http://portal/foo/bar to http://portal/foo/foobar.