Date and Month display

Change List/ library name using PowerShell

<#
******-----------------------------------------------------------------------******
Author          -> Shiv Mangal Singh
Date            -> 1st Oct - 2015
Description     -> This Script will change the List & documnet library name accordingly
#Here $libOriginalUrl is the Orginal List/document Library Name
# Here $libNewUrl is the Updated List/document Library Name
# Call the function to Check all Users Access
# MoveTo is the function to update the List/document Library Name accordingly
******-----------------------------------------------------------------------******
 #>
Add-PSSnapin Microsoft.SharePoint.Powershell  -EV Err  -EA "SilentlyContinue"

$libOriginalUrl = "/Shared%20Documents";
$libNewUrl = "/Projetc%20Shared%20Documents";
$web = Get-msWeb -Identity "https://mslb.contoso.net/sites/test123/"
$lib = $web.GetList($web.Url + $libOriginalUrl)
$rootFolder = $lib.RootFolder;
$rootFolder.MoveTo($web.Url + $libNewUrl)

No comments:

Post a Comment