Wednesday 6 September 2017

Update List/Library url in SharePoint Online

Today I am providing the Power Shell Script that will update the Title and URL of a given List/library in a SharePoint online site as per user input and requirement.

Inputs
Username - User name to connect to the site. User should be global admin and must have full control on the site
Password - Password for the given user
siteURL - URL of the site where list/library exist
listtitle - Library title 
listtitlenew - Please enter the new display name for given list/Library. Enter same name as above if you dont want to change the title
newurl - Enter new url without space

Outputs
Script will update the title and url of the given list/library.

Example-
To show result in power shell screen
.\scriptname.ps1
 to get output in a file
.\scriptname.ps1 | out-file “FilePath\Filename.txt”

Dependencies –
This script sould be executed from a Machine where SharePoint Online Management Shell is installed.
Machine should be connected to Internet.
Make sure SharePoint Management Shell, Powershell or Powershell ISE what ever you are using to run this script must be started as administrator.
For executing this scipt User must be a global admin in Office 365 and must have contribute permission on the list/library.
How to execute -
Copy this script and paste in Note pad.
Save this file as .ps1.
Run this script in SharePoint Online Management Shell/Power shell/ Power shell ISE.
Follow on screen instructions.

FOR ANY HELP ON THIS SCRIPT USE "GET-HELP .\SCRIPTNAME.PS1 --FULL" AFTER SAVING THIS FILE.
https://drive.google.com/open?id=0BznVpoE_ln0AdFV0Y2kzLWt0c2s