Tuesday, May 10, 2011

Moving SPWeb inside the SPSSite in SharePoint 2010 using PowerShell

This script will move the site “ToBeMoved” to be under “ToBeMovedTo” and change its Url and Title to “Moved”



$w = Get-SPWeb 'http://servername/ToBeMoved'
$w.Url
$w.ServerRelativeUrl = '/ToBeMovedTo/Moved'
$W.Title = 'Moved'
$w.Update()
$w.Url


Please note that it will take some time to be updated.

3 comments:

nabajyoti said...

!!you have just saved someone...Thanks...

nabajyoti said...

You just saved someone his day!!! Thanks..

CBarkers said...

When I think i've done a full library to do this and there is a so simple solution for this... Thanks saving me from ignorance

Running Proxmox Inside Hyper-V on Windows 11: Nested Virtualization Lab Setup

I have a good PC at home with an Intel i9 12th Gen processor, 96GB RAM, and 1TB of unused disk storage. It’s our family PC for everyday use,...