How to Get Content Type ID in SharePoint using PowerShell?

Requirement: A typical usage of Content Types is reusable metadata in SharePoint. At times, You may need to get content type id by name in order to  assign the content type to lists and libraries programmatically. Lets get content type id in SharePoint 2013 using PowerShell. How to find content type id…

Read more

Get All Site Collections in a Web Applications using PowerShell

How to get all site collections of a web application in SharePoint? To get all site collections in web application, from SharePoint central Admin, follow these steps: Go to SharePoint Central Admin Site >> Application Management  Click on the “View all site collections” link under Site Collections Group. Select your web application….

Read more

Add-Remove User to SharePoint Multi-Valued People Picker Field using PowerShell

Requirement: We have a SharePoint list called “Projects” with 1000s of items. The list has a field called “Team Members” which allows multiple user values. We often get a requirement to either add or remove a particular user to all items or specific items filtered by other columns in the list. Solution: Adding-removing…

Read more

SharePoint Online: How to Check In a Document using PowerShell?

Check out-Check in feature in SharePoint avoids conflicts in typical collaboration environments, where multiple users may try to edit the same document at the same time. You must check in the document back in order to make the changes available to all other users, Even if the document is saved. How to…

Read more

SharePoint Online: How to Check Out a Document using PowerShell?

Checking out a document in SharePoint ensures that you are the only one making edits to it. The purpose of checkout is to prevent conflicts in a collaborative environment where multiple people may try to edit the same document or list items at the same time. So, When a file is checked…

Read more

SharePoint Online: Check If File Exists in Document Library using PowerShell

Requirement: Check if a file exists in SharePoint online document library using PowerShell CSOM. PowerShell to check if a file exists in SharePoint Online document library: Let’s check if a file exists in SharePoint document library with PowerShell. This checks if file exists in SharePoint document library with csom PowerShell. PnP PowerShell…

Read more

SharePoint Online: Check If List Exists using PowerShell

Requirement: Check if a particular list exists in a given SharePoint online site using PowerShell CSOM script. PowerShell Script to check if List Exists in SharePoint Online: Here is the SharePoint Online PowerShell check if a list exists. Method 2: PowerShell to Check If Lists Exists in SharePoint Online Instead of “Try-Catch”…

Read more

SharePoint Online: Check if Site Collection, Subsite Exists using PowerShell

Requirement: Check if site or site collection exists in SharePoint Online using PowerShell. How to check if a site exists in SharePoint Online? To confirm if a site collection exists in SharePoint Online, You can quickly head on to: SharePoint admin center at https://<tenant>-admin.sharepoint.com Expand Sites >> Active Sites Enter the site…

Read more

Update SharePoint List Items from CSV File using PowerShell

Requirement: Update SharePoint List Items from CSV file. A bit background: We have a list with 1000’s of rows of organization-wide experts. Later we added a new field for “Department”. Now the requirement is to update the Department field for a specific list of users. While the datasheet view can be used…

Read more