Skip to content

Commit 4298c69

Browse files
Merge pull request #941 from MicrosoftDocs/main
[AutoPublish] main to live - 07/17 10:34 PDT | 07/17 23:04 IST
2 parents 7c5e423 + a85fe15 commit 4298c69

40 files changed

+2368
-2070
lines changed

.openpublishing.redirection.ms-sp-ps.json

Lines changed: 956 additions & 956 deletions
Large diffs are not rendered by default.

.openpublishing.redirection.spserver.json

Lines changed: 858 additions & 858 deletions
Large diffs are not rendered by default.

sharepoint/docfx.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"content": [
44

55
{"files": ["**/*.yml", "**/*.md"], "src": "docs-conceptual", "dest": "sharepoint" },
6-
6+
77
{"files": ["**/toc.yml"], "src": "sharepoint-ps", "version": "sharepoint-ps", "exclude": ["docs-conceptual"], "dest": "module/sharepoint-ps"},
88
{"files": ["**/*.yml"], "src": "sharepoint-ps", "version": "sharepoint-ps", "exclude": ["docs-conceptual"], "dest": "module"},
99
{"files": ["**/*.md"], "src": "sharepoint-ps/sharepoint-server", "version": "sharepoint-ps", "dest": "module/sharepoint-server"},
1010
{"files": ["**/*.md"], "src": "sharepoint-ps/sharepoint-online", "version": "sharepoint-ps", "dest": "module/sharepoint-online"},
1111
{"files": ["**/*.md"], "src": "virtual-folder", "version": "sharepoint-ps", "dest": "module" },
12-
12+
1313
{"files": ["**/toc.yml"], "src": "sharepoint-server-ps", "version": "sharepoint-server-ps", "exclude": ["docs-conceptual"], "dest": "module/sharepoint-ps"},
1414
{"files": ["**/*.yml"], "src": "sharepoint-server-ps", "version": "sharepoint-server-ps", "exclude": ["docs-conceptual"], "dest": "module"},
1515
{"files": ["**/*.md"], "src": "sharepoint-server-ps/sharepoint-server", "version": "sharepoint-server-ps", "dest": "module/sharepoint-server"},
@@ -44,15 +44,16 @@
4444
"feedback_system": "Standard",
4545
"feedback_product_url": "https://github.com/MicrosoftDocs/OfficeDocs-SharePoint-powershell/issues",
4646
"author": "techwriter40",
47+
"manager": "meerak",
4748
"ms.author": "pamgreen",
4849
"ms.devlang": "powershell",
4950
"ms.date": "09/08/2021",
5051
"ms.topic": "reference",
51-
"contributors_to_exclude": [
52-
"rjagiewich",
53-
"traya1",
54-
"rmca14",
55-
"claydetels19",
52+
"contributors_to_exclude": [
53+
"rjagiewich",
54+
"traya1",
55+
"rmca14",
56+
"claydetels19",
5657
"jborsecnik",
5758
"tiburd",
5859
"garycentric",

sharepoint/docs-conceptual/index.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ landingContent:
2929
- text: Get started with SharePoint Online Management Shell
3030
url: sharepoint-online/connect-sharepoint-online.md
3131
- text: Cmdlet reference
32-
url: /powershell/module/sharepoint-online
32+
url: /powershell/module/microsoft.online.sharepoint.powershell
3333

3434
# Card
3535
- title: SharePoint Server Subscription
3636
linkLists:
3737
- linkListType: reference
3838
links:
3939
- text: Overview
40-
url: sharepoint-server/sharepoint-server-sub-cmdlets.md
40+
url: sharepoint-server/sharepoint-server-sub-cmdlets.md
4141
- text: Cmdlet reference
42-
url: /powershell/module/sharepoint-server
42+
url: /powershell/module/sharepointserver
4343

4444

4545
# Card
@@ -48,17 +48,17 @@ landingContent:
4848
- linkListType: reference
4949
links:
5050
- text: Overview
51-
url: sharepoint-server/sharepoint-server-cmdlets.md
51+
url: sharepoint-server/sharepoint-server-cmdlets.md
5252
- text: Cmdlet reference
53-
url: /powershell/module/sharepoint-server
53+
url: /powershell/module/microsoft.sharepoint.powershell
5454

5555
# Card
5656
- title: PnP PowerShell
5757
linkLists:
5858
- linkListType: reference
5959
links:
6060
- text: Overview
61-
url: sharepoint-pnp/sharepoint-pnp-cmdlets.md
61+
url: sharepoint-pnp/sharepoint-pnp-cmdlets.md
6262
- text: Cmdlet reference
6363
url: https://pnp.github.io/powershell/
6464
- text: PowerShell Gallery
@@ -75,6 +75,6 @@ landingContent:
7575
url: /powershell/scripting/overview
7676
- text: More resources for learning PowerShell
7777
url: /powershell/scripting/learn/more-powershell-learning
78-
7978

80-
79+
80+
Lines changed: 63 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,89 @@
11
---
2-
title: SharePoint Server Cmdlets
2+
description: Learn about the Microsoft.SharePoint.Powershell module, which contains cmdlets for managing SharePoint Server.
3+
title: Overview of the Microsoft.SharePoint.Powershell module
34
ms.service: sharepoint-powershell
45
---
56

6-
# SharePoint Server Cmdlets
7+
# Overview of the Microsoft.SharePoint.Powershell module
78

8-
For a listing of the SharePoint Server cmdlets, see [SharePoint Server cmdlets](xref:SharePointServer)
9+
For a listing of the SharePoint Server cmdlets, see [Microsoft.SharePoint.Powershell cmdlets][04].
910

1011
## Accessing PowerShell for SharePoint Server
1112

12-
After you install SharePoint Server, applicable PowerShell cmdlets are available in the SharePoint 2016 Management Shell. You can manage most aspects of SharePoint Server in the SharePoint Management Shell. You can create new site collections, web applications, user accounts, service applications, proxies, and more. Commands that you type in the SharePoint Management Shell return SharePoint objects that are based on the Microsoft .NET Framework. You can apply these objects as input to subsequent commands or store the objects in local variables for later use.
13+
After you install SharePoint Server, applicable PowerShell cmdlets are available in the SharePoint
14+
2016 Management Shell. You can manage most aspects of SharePoint Server in the SharePoint Management
15+
Shell. You can create new site collections, web applications, user accounts, service applications,
16+
proxies, and more. Commands that you type in the SharePoint Management Shell return SharePoint
17+
objects that are based on the Microsoft .NET Framework. You can apply these objects as input to
18+
subsequent commands or store the objects in local variables for later use.
1319

14-
With the SharePoint Management Shell, you do not have to register the snap-in that contains the cmdlets. Registration of the Microsoft.SharePoint.PowerShell.dll module for SharePoint Server cmdlets is automatic, as a result of the **Add-PSSnapin Microsoft.SharePoint.PowerShell** line in the SharePoint.ps1 file that is located in %CommonProgramFiles%\Microsoft Shared\Web Server Extensions\<version>\Config\PowerShell\Registration, where version "15" equals SharePoint Server 2013, and version "16" equals SharePoint Server 2016. To use the PowerShell console, you must register this snap-in manually.
20+
With the SharePoint Management Shell, you don't have to register the snap-in that contains the
21+
cmdlets. Registration is handled by the `Add-PSSnapin Microsoft.SharePoint.PowerShell` line in the
22+
`SharePoint.ps1` file. This file is located in
23+
`%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\<version>\Config\PowerShell\Registration` folder.
1524

16-
Whether you use the SharePoint Management Shell or the PowerShell console, you can also load additional snap-ins.
25+
- `<version>` 15 equals SharePoint Server 2013
26+
- and `<version>` 16 equals SharePoint Server 2016
27+
28+
To use the PowerShell console, you must register this snap-in manually.
29+
30+
Whether you use the SharePoint Management Shell or the PowerShell console, you can also load
31+
additional snap-ins and modules.
1732

1833
> [!NOTE]
19-
> The SharePoint Management Shell and the PowerShell console also differ in the use of the **ReuseThread** option, which defines how the threading model is used. The SharePoint Management Shell's use is defined by this line, {Host.Runspace.ThreadOptions = "ReuseThread"}, which is in the SharePoint.ps1 file. For more information, see [PS Thread Options](/dotnet/api/system.management.automation.runspaces.psthreadoptions).
34+
> The SharePoint Management Shell and the PowerShell console also differ in the use of the
35+
> **ReuseThread** option, which defines how the threading model is used. The SharePoint Management
36+
> Shell's use is defined by this line, `{Host.Runspace.ThreadOptions = "ReuseThread"}`, which is in
37+
> the `SharePoint.ps1` file. For more information, see
38+
> [PS Thread Options][01].
2039
2140
## Permissions
2241

23-
Before you can use the Add-SPShellAdmin cmdlet to grant permissions for users to run SharePoint Server cmdlets, verify that you meet all of the following minimum requirements:
42+
Before you can use the `Add-SPShellAdmin` cmdlet to grant permissions for users to run SharePoint
43+
Server cmdlets, verify that you meet all of the following minimum requirements:
2444

25-
* You must have membership in the **securityadmin** fixed server role on the SQL Server instance.
26-
* You must be a member of the Administrators group on the server on which you are running the PowerShell cmdlet.
45+
- You must have membership in the **SecurityAdmin** fixed server role on the SQL Server instance.
46+
- You must be a member of the Administrators group on the server on which you are running the
47+
PowerShell cmdlet.
2748

2849
> [!NOTE]
29-
> If these permissions are not satisfied, contact your Setup administrator or SQL Server administrator to request these permissions.
50+
> If these permissions aren't satisfied, contact your Setup administrator or SQL Server
51+
> administrator to request these permissions.
3052
31-
For additional information about PowerShell permissions, see [Add-SPShellAdmin](xref:SharePointServer.Add-SPShellAdmin).
53+
For additional information about PowerShell permissions, see [Add-SPShellAdmin][05].
3254

33-
If you do not have membership in the **SharePoint_Shell_Access** role or **WSS_Admin_WPG** local group, use the **Add-SPShellAdmin** cmdlet to add the **WSS_Admin_WPG** group in all front-end web servers in the SharePoint farm and the **SharePoint_Shell_Access** role. If the SQL Server database does not have a **SharePoint_Shell_Access** role, the role is automatically created when you run the **Add-SPShellAdmin** cmdlet. After you run the **Add-SPShellAdmin** cmdlet, users can run SharePoint PowerShell cmdlets in a multiple-server farm environment.
55+
If you don't have membership in the **SharePoint_Shell_Access** role or **WSS_Admin_WPG** local
56+
group, use the `Add-SPShellAdmin` cmdlet to add the **WSS_Admin_WPG** group in all front-end web
57+
servers in the SharePoint farm and the **SharePoint_Shell_Access** role. If the SQL Server database
58+
doesn't have a **SharePoint_Shell_Access** role, the role is automatically created when you run the
59+
`Add-SPShellAdmin` cmdlet. After you run the `Add-SPShellAdmin` cmdlet, users can run SharePoint
60+
PowerShell cmdlets in a multiple-server farm environment.
3461

3562
> [!NOTE]
36-
> When you install SharePoint Server, the user account from which you run the installation is granted the appropriate permissions to run PowerShell cmdlets. If any users have not been added to run a PowerShell cmdlet, you can use the **Add-SPShellAdmin** cmdlet to add them.
63+
> When you install SharePoint Server, the user account from which you run the installation is
64+
> granted the appropriate permissions to run PowerShell cmdlets. If any users haven't been added to
65+
> run a PowerShell cmdlet, you can use the `Add-SPShellAdmin` cmdlet to add them.
3766
38-
To see a list of all of the **SPShellAdmin** cmdlets, from a PowerShell command prompt, type _Get-Command -Noun SPShellAdmin_.
67+
To see a list of all **SPShellAdmin** cmdlets, from a PowerShell command prompt, type
68+
`Get-Command -Noun SPShellAdmin`.
3969

4070
## Scripts and execution policies
4171

42-
Although you can use Microsoft PowerShell to perform a single administrative task, you can also use a script to automate a series of tasks. A script is a text file that contains one or more Microsoft PowerShell commands. Microsoft PowerShell scripts have a .ps1 file name extension.
43-
44-
To run scripts, the minimum required execution policy for SharePoint Server is **RemoteSigned**, although the default policy for PowerShell is Restricted. If the policy is left as Restricted, the SharePoint Management Shell will change the policy for PowerShell to RemoteSigned. This means that you must select **Run as administrator** to start the SharePoint Management Shell with elevated administrative permission. This change will apply to all PowerShell sessions. For more information, see [ExecutionPolicy Enumeration](/dotnet/api/microsoft.powershell.executionpolicy).
45-
46-
For additional information about scripts and execution policies, see [about_scripts](/powershell/module/microsoft.powershell.core/about/about_scripts) and [About Execution Policies](/powershell/module/microsoft.powershell.core/about/about_execution_policies).
72+
Although you can use Microsoft PowerShell to perform a single administrative task, you can also use
73+
a script to automate a series of tasks. A script is a text file that contains one or more Microsoft
74+
PowerShell commands. Microsoft PowerShell scripts have a `.ps1` file name extension.
75+
76+
To run scripts, the minimum required execution policy for SharePoint Server is **RemoteSigned**,
77+
although the default policy for PowerShell is **Restricted**. If the policy is left as
78+
**Restricted**, the SharePoint Management Shell changes the policy for PowerShell to
79+
**RemoteSigned**. This means that you must select **Run as administrator** to start the SharePoint
80+
Management Shell with elevated administrative permission. This change applies to all PowerShell
81+
sessions. For more information about scripts and execution policies, see [about_scripts][03] and
82+
[About Execution Policies][02].
83+
84+
<!-- link references -->
85+
[01]: /dotnet/api/system.management.automation.runspaces.psthreadoptions
86+
[02]: /powershell/module/microsoft.powershell.core/about/about_execution_policies
87+
[03]: /powershell/module/microsoft.powershell.core/about/about_scripts
88+
[04]: /powershell/module/microsoft.sharepoint.powershell
89+
[05]: /powershell/module/microsoft.sharepoint.powershell/add-spshelladmin?view=sharepoint-ps&preserve-view=true

0 commit comments

Comments
 (0)