Skip to content

Commit cc632ef

Browse files
authored
Merge branch 'master' into teamsfeedpatch
2 parents 06436d2 + 8a393ac commit cc632ef

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

sharepoint/docs-conceptual/sharepoint-online/connect-sharepoint-online.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@ ms.service: sharepoint-powershell
55

66
# Get started with SharePoint Online Management Shell #
77

8-
To get started using PowerShell to manage SharePoint Online, you need to install the latest SharePoint Online Management Shell is installed and connect to SharePoint Online.
8+
To get started using PowerShell to manage SharePoint Online, you need to install the SharePoint Online Management Shell and connect to SharePoint Online.
99

1010
Install the SharePoint Online Management Shell by downloading and running the [SharePoint Online Management Shell](https://go.microsoft.com/fwlink/p/?LinkId=255251) or installing the module from the [PowerShell Gallery](https://www.powershellgallery.com/packages/Microsoft.Online.SharePoint.PowerShell/). Once installed, the module is available for use, and you do not need to install it again until you need features introduced in a later version. For example, you may need to install a new version for TLS 1.2 negotiation after October 2018.
1111

12-
First you can check if you have already installed SharePoint Online Management Shell by running the following command in administrative mode in PowerShell:
12+
First you can check if you have already installed the SharePoint Online Management Shell by running the following command in administrative mode in PowerShell:
1313

1414
```powershell
1515
Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version
1616
```
1717

18-
If your operating system is using PowerShell 5 or newer, you can install the SharePoint Online Management Shell also by running the following command in administrative mode:
18+
If your operating system is using PowerShell 5 or newer, you can also install the SharePoint Online Management Shell by running the following command in administrative mode:
1919

2020
```powershell
2121
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
2222
```
2323

24+
If you don't have administrative privileges on the system, you can install the SharePoint Online Management Shell only for the current user by running the following command:
25+
26+
```powershell
27+
Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Scope CurrentUser
28+
```
29+
2430
To ensure you have all available cmdlets, you should always make sure the module is up to date. You can update the SharePoint Online Management Shell by running the following command in administrative mode:
2531

2632
```powershell
@@ -31,28 +37,24 @@ To open the SharePoint Online Management Shell command prompt, from the **Start*
3137

3238
> [!VIDEO https://www.youtube.com/embed/TMzHAWEQjlk]
3339
34-
## To connect with a user name and password ##
40+
## To connect with a user name and password
3541

36-
1. Fill in the values for the **$adminUPN** and **$orgName** variables (replacing all the text between the quotes, including the < and > characters), and then run the following commands at the SharePoint Online Management Shell command prompt:
42+
1. Run the following command at the SharePoint Online Management Shell command prompt:
3743

3844
```powershell
39-
$adminUPN="<the full email address of a SharePoint administrator account, example: [email protected]>"
40-
$orgName="<name of your Office 365 organization, example: contosotoycompany>"
41-
$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
42-
Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential
45+
Connect-SPOService -Url https://contoso-admin.sharepoint.com -Credential [email protected]
4346
```
4447

4548
2. When prompted with the Windows PowerShell credential request dialog box, type the password for the SharePoint admin account.
4649

4750
To assign a user the SharePoint admin role, see [Assign admin roles](https://docs.microsoft.com/microsoft-365/admin/add-users/assign-admin-roles) or [Assign admin roles to Microsoft 365 user accounts with PowerShell](https://docs.microsoft.com/microsoft-365/enterprise/assign-roles-to-user-accounts-with-microsoft-365-powershell).
4851

49-
## To connect with multifactor authentication (MFA) ##
52+
## To connect with multifactor authentication (MFA)
5053

51-
1. Fill in the value for the **$orgName** variable (replacing all the text between the quotes, including the < and > characters), and then run the following commands at the SharePoint Online Management Shell command prompt:
54+
1. Run the following command at the SharePoint Online Management Shell command prompt:
5255

5356
```powershell
54-
$orgName="<name of your Office 365 organization, example: contosotoycompany>"
55-
Connect-SPOService -Url https://$orgName-admin.sharepoint.com
57+
Connect-SPOService -Url https://contoso-admin.sharepoint.com
5658
```
5759

5860
2. When prompted with the **Microsoft SharePoint Online Management Shell** dialog box, type the account name and password for a SharePoint administrator account, and then click **Sign in**.

0 commit comments

Comments
 (0)