Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

Connect-SPOService

Published: July 16, 2012

Applies to:  Office 365 | SharePoint Online 

Connects a SharePoint Online global administrator to a SharePoint Online connection (the SharePoint Online Administration Center). This cmdlet must be run before any other SharePoint Online cmdlets can run.

Connect-SPOService [-Url] <UrlCmdletPipeBind> [[-Credential] <CredentialCmdletPipeBind>]

Parameters

Parameter Required Type Description

Url

Required

Microsoft.Online.SharePoint.PowerShell.UrlCmdletPipeBind

Specifies the URL of the SharePoint Online Administration Center site.

Credential

Required

Microsoft.Online.SharePoint.PowerShell.CredentialCmdletPipeBind

Specifies the credentials to use to connect. If no credentials are presented, a dialog will prompt for the credentials. The credentials must be those of a SharePoint Online global administrator who can access the SharePoint Online Administration Center site.

Detailed Description

The Connect-SPOService cmdlet connects a SharePoint Online global administrator to the SharePoint Online Administration Center.

Only a single SharePoint Online service connection is maintained from any single Windows PowerShell session. In other words, this is a per-organization administrator connection. Running the Connect-SPOService cmdlet twice implicitly disconnects the previous connection. The Windows PowerShell session will be set to serve the new SharePoint Online global administrator specified.

noteNote:

A delegated partner administrator has to swap connections for different organizations within the same Windows PowerShell session.

You must be a SharePoint Online global administrator to run the cmdlet.

Input Types

Return Types

--------EXAMPLE 1--------

Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential admin@contoso.com

Example 1 shows how a SharePoint Online global administrator with credential admin@contoso.com connects to a SharePoint Online Administration Center that has the URL http://contoso-admin.sharepoint.com/.

--------EXAMPLE 2--------

$username = "admin@contoso.sharepoint.com"$password = "password"$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $(convertto-securestring $Password -asplaintext -force)Connect-SPOService -Url http://contoso-admin.sharepoint.com/ -Credential $cred

Example 2 shows how a SharePoint Online global administrator with a user name and password connects to a SharePoint Online Administration Center that has the URL http://contoso-admin.sharepoint.com/.

Change History

Date Description

July 16, 2012

Initial publication

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.