Sunday 4 July 2021

SharePoint Online Management Shell: Getting Started

In this blog, we will be discussing SharePoint Online Management Shell. The introduction, installation, and some example commands.


Introduction

SharePoint Online Management Shell is a tool that contains a Windows PowerShell module that allows administrators to manage their SharePoint Online subscription in Office 365 using PowerShell.

SharePoint administrators can manage Sites, Users, Tenants and etc. Some of the tasks can be performed in the Microsoft 365 admin center, but not all operations are possible. Command-line operations in Windows PowerShell are composed of a series of commands. We can perform read, write, and execute command-line operations, and they are easier in PowerShell.


Installation

SharePoint Online Management Shell is not present out-of-the-box on the Windows operating system. You need to install the SharePoint Online Management Shell and connect to SharePoint Online.

There are two options:

1. Download and install the SharePoint Online Management Shell .msi package.


2. Install the module from the PowerShell Gallery


Open Windows PowerShell (or CMD) in administrative mode and install the SharePoint Online Management Shell by running the below command:

Install-Module -Name Microsoft.Online.SharePoint.PowerShell

Once the module is installed, execute the below command in administrative mode to check its details:
Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version

To update the SharePoint Online Management Shell, run the below command in administrative mode:
Update-Module -Name Microsoft.Online.SharePoint.PowerShell

To uninstall the SharePoint Online Management Shell, run the below command in administrative mode:
Uninstall-Module -Name Microsoft.Online.SharePoint.PowerShell


Run the below command to connect with the SharePoint Online admin center. Enter the SharePoint admin account credentials in the request dialogue box.

Connect-SPOService -Url https://developer5-admin.sharepoint.com




To disconnect and close the connection, run the below command:

Disconnect-SPOService -Url https://developer5-admin.sharepoint.com


🚀 "Happy Coding" 🚀

No comments:

Post a Comment