SharePoint PowerShell Overview
Microsoft PowerShell is a command-line shell and scripting language that provides an administrator full access to applicable application programming interfaces (APIs). Administrators can interact directly with SharePoint Server to manipulate web applications, site collections, sites, lists and much more. In addition, an administrator can script cmdlets (pronounced "command-lets").
By default, Powershell is located at the following path: <%SystemRoot%>\System32\WindowsPowerShell\v1.0\PowerShell.exe.
PowerShell can be used by authorized admins to perform a wide variety of tasks in SharePoint on-premises and SharePoint Online. Microsoft provides the cmdlets used for these 2 systems and the Patterns and Practices (PnP) group has created an additional set of modules that provide many additional capabilities.
For a list of SharePoint Server on-premises cmdlets, see SharePoint Server cmdlets
For a list of SharePoint Online cmdlets, see SharePoint Online cmdlets
For a list of the SharePoint PnP cmdlets, see SharePoint PnP cmdlets
Verify that you have the following administrative permissions:
- You must be assigned SharePoint administrator role. For more information, see Default administrative roles and user groups and About the SharePoint admin role in Microsoft 365.
IMPORTANT: You can use a specific group of PowerShell with SharePoint Online. For more information, see Office 365 PowerShell for SharePoint Online.
There are several PowerShell learning resources for SharePoint IT professionals.
TechNet Scripting Center
The TechNet Scripting Center includes many resources to help you learn the basics about PowerShell. It also contains script repositories with samples of scripts that are typically used with various Microsoft products. The following table shows the main learning resources.
|Windows PowerShell Documentation on TechNet||This section of the TechNet Library contains web copies of the core PowerShell Get-Help topics. The section also has web copies of the PowerShell Getting Started document, the PowerShell.exe help, and a PowerShell primer.|
|Scripting With Windows PowerShell||The home page for PowerShell scripting learning resources.|
|Windows PowerShell Owner's Manual||Web-based guide for getting started with PowerShell.|
|Windows PowerShell Quick Reference||Downloadable copy of the Quick Reference document that is installed with PowerShell.|
As you read these resources, consider that the following concepts and cmdlets are useful ones to learn before you use PowerShell for SharePoint Server: