SharePoint Online: How to Create a New List from Existing List?

Requirement: Create a list from an existing list in SharePoint Online. SharePoint Online: Create a List from an Existing List Creating a list, as same as the existing list structure is a common requirement in SharePoint. We used the “Site list as Template” approach in previous versions of SharePoint and in the…

Read more

SharePoint Online: Remove a Custom Theme using PowerShell

Requirement: Remove a custom theme in SharePoint Online. Remove a Theme in SharePoint Online Using PowerShell: We can remove a custom theme from SharePoint Online tenant using Remove-SPOTheme cmdlet SharePoint Online: PowerShell to Delete a Theme We can also use PnP PowerShell to remove a theme in SharePoint Online. If you remove…

Read more

SharePoint Online: CAML Query with IsNull and IsNotNull Examples in PowerShell

Requirement: Get all items from a list where a particular filed value is Null. SharePoint Online: CAML Query IsNull Example Here is the example of how IsNull operator can be used in CAML: SharePoint Online: CAML query with IsNotNull Operator in PowerShell Similarly, You can use “<IsNotNull>” Operator to get list items…

Read more

How to Add Owner to Office 365 Group using PowerShell?

Requirement: Add Owner to Office 365 group using PowerShell How to Set Group Owners in Office 365? To add members to Office 365 group through Microsoft 365 admin center, follow these steps: Login to the Microsoft 365 Admin Center site: https://admin.microsoft.com Expand Groups and Click on Groups link in the left navigation. …

Read more

Find All Office 365 Group Owners using PowerShell

Requirement: Get Office 365 Group Owners How to Get Office 365 Group Owners? To get Office 365 group owners from Microsoft 365 admin center, Log in to the Microsoft 365 Admin Center site: https://admin.microsoft.com Expand Groups and Click on the Groups link in the left navigation.  The group’s page lists all groups…

Read more

Fix “Connect-AzureAD : The term ‘Connect-AzureAD’ is not recognized as the name of a cmdlet, function, script file, or operable program.” Error

Problem: When trying to connect to Azure AD from PowerShell, using: “Connect-AzureAD” cmdlet, received an error: “Connect-AzureAD: The term ‘Connect-AzureAD’ is not recognized as the name of a cmdlet, function, script file, or operable program.” Solution: Install the Azure AD Module! Open PowerShell as an administrator, Enter: Install-Module AzureAD Confirm the installation…

Read more

SharePoint Online: Get Files and Sub-Folders Count on Each Folder in a Document Library using PowerShell

Requirement:  Get the count of files and sub-folders at each folder in a SharePoint Online document library. How to Get the Number of Files and Sub-Folders at Each Folder of a Document Library? When a document library has multiple folders, sub-folder, and files, you can get the number of files and sub-folders…

Read more

SharePoint Online: Change the UI to Modern Experience or Classic Experience using PowerShell

Requirement: Change Classic Experience to Modern Experience and Modern UI to Classic in SharePoint Online. How to Activate Modern Experience from Classic? The modern experience in SharePoint Online lists and libraries is faster, mobile-friendly, and easier to use.  It brings new functionalities and components, However, some features can only be used in…

Read more

SharePoint Online: Error Handling with Try Catch in PowerShell

One of the best practices while writing PowerShell scripting is handling potential errors to ensure smooth execution of the script when something goes wrong. Who can guarantee a script can run correctly in different environments every time? Error handling in PowerShell is made easy with try-catch blocks similar to .NET. So, when…

Read more