PowerShell Script to update columns in SharePoint Online

Quick ready-to-use PowerShell script that you can give your admins to update single or multiple fields in a SharePoint Online site.

Download the attached script from above and save it as .ps1.

The Script will ask for the following (for your admins to enter) :

  • "Enter the Admin URL of 0365 (eg. https://<Tenant Name>-admin.sharepoint.com)"
  • "Enter the username of 0365 (eg. admin@<tenantName>.onmicrosoft.com)"
  • "Please enter the password for $($userName)" -AsSecureString
  • "Enter the Site URL"

Change the following in the script :

  • Library Name
   Look for "$_list = $_lists.GetByTitle("Documents")"
  • Columns to Update
Look for   $listItem["ProjectID"] = $listItem["TempProjectID"] # Update Field Value Here