PowerShell Modules for SharePoint Online Administrators

Microsoft

As a SharePoint Online administrator, you have several tools available to you for automating tenant administration. When you are setting up a new workstation it can be challenging to figure out what to install and where to get it. This post summarizes the various PowerShell tools available for managing your SharePoint Online tenant and related components in Office 365.
 
SharePoint Online Management Shell
This is used for performing core SharePoint Online service administration.
Option #1 Download and install the SharePoint Online Management Shell 
  1. Download sharepointonlinemanagementshell_<version>_x<32/64>_en-us.msi
  2. Run the installer
  3. Once installed you can load this module into your scripts using:
    Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
 
Option #2 Install the SharePoint Online Management Shell from the PowerShell Gallery (Preferred)
If your operating system is using PowerShell 5.0 or newer, you can install the
SharePoint Online Management Shell by using the following command:
Install-Module -Name Microsoft.Online.SharePoint.PowerShell

More information:
Announcing availability of SharePoint Online Management Shell from PowerShell Gallery 
 
Office Dev PnP PowerShell Module
This solution contains a library of PowerShell commands that allows you to perform complex provisioning and artifact management actions towards SharePoint. The commands use CSOM and many can work against both SharePoint Online and SharePoint Server.
Installing the module from the PowerShell gallery:
Install-Module SharePointPnPPowerShellOnline -AllowClobber
More information:
 
SharePoint Online Client Side Object Model (CSOM)
For scenarios that are not covered by the SharePoint Online Management Shell or the Office Dev PnP PowerShell module you may be able to accomplish what you need with access to the client side object model.
Installing Package without Visual Studio installed
 1. Download the NuGet Commandline:
 2. From the directory where you saved nuget.exe run
Nuget install Microsoft.SharePointOnline.CSOM -OutputDirectory C:\<TargetDIR>\SPO_CSOM
More information:
Microsoft.SharePointOnline.CSOM Package Information 
 
Azure Azure AD Management Shell
This is used for managing top tenant level settings and for managing user provisioning and licensing. This requires global administrator rights and will not be necessary for many SharePoint operations.
Installing Azure AD Management Shell V2:
 
Security and Compliance Center
In your role as a SharePoint Online Administrator you may also be asked to manage some or all of the Security and Compliance center in Office 365. Managing this with PowerShell requires the use of Windows PowerShell Remoting.
Assuming the prerequisites are configured, you can connect to the Security and Compliance Center as follows:
#Enter credentials and establish connection
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://ps.compliance.protection.outlook.com/powershell-liveid/" -Credential $UserCredential -Authentication Basic -AllowRedirection
#Import cmdlets
Import-PSSession $Session
#Once you are done with your session be sure you disconnect
Remove-PSSession $Session
Note: If your account requires multifactor Authentication you must also have the Exchange Online Remote PowerShell Module, please see Connect to Office 365 Security & Compliance Center PowerShell using multi-factor authentication for more details.
 
More information:
 
PowerApps
With the preview launch of the PowerShell cmdlets for app creators and administrators, you can automate many of the monitoring and management tasks that are only possible manually today in Power Apps or the Power Apps Admin center. 
Install the administration module:
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
 
Install the creator module:
Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber
 
Once installed you connect to PowerApps as follows:
#Commercial
Add-PowerAppsAccount -Endpoint "prod"

#GCC - Not GCC HIGH or DOD
Add-PowerAppsAccount -Endpoint "usgov"
More Information:
0 Replies