Skip to content

Commit b1df4c1

Browse files
committed
Added Examples
1 parent 80ee8b7 commit b1df4c1

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

sharepoint/sharepoint-ps/sharepoint-online/Connect-SPOService.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ schema: 2.0.0
1111
Connects a SharePoint Online global administrator to a SharePoint Online connection (the SharePoint Online Administration Center).
1212
This cmdlet must be run before any other SharePoint Online cmdlets can run.
1313

14+
1415
## SYNTAX
1516

1617
### AuthenticationUrl
@@ -26,11 +27,11 @@ Connect-SPOService [-ClientTag <String>] [-Credential <CredentialCmdletPipeBind>
2627
```
2728

2829
## DESCRIPTION
29-
The Connect-SPOService cmdlet connects a SharePoint Online global administrator to the SharePoint Online Administration Center.
30+
The `Connect-SPOService` cmdlet connects a SharePoint Online global administrator to the SharePoint Online Administration Center.
3031

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

3637
A delegated partner administrator has to swap connections for different organizations within the same Windows PowerShell session.
@@ -39,13 +40,22 @@ You must be a SharePoint Online global administrator to run the cmdlet.
3940

4041
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at http://go.microsoft.com/fwlink/p/?LinkId=251832 (http://go.microsoft.com/fwlink/p/?LinkId=251832).
4142

43+
4244
## EXAMPLES
4345

44-
### ------------ Example 1 --------------------
46+
### -----------------------EXAMPLE 1-----------------------------
4547
```
46-
{example code}
48+
Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential [email protected]
4749
```
48-
{example description}
50+
Example 1 shows how a SharePoint Online global administrator with credential [email protected] connects to a SharePoint Online Administration Center that has the URL http://contoso-admin.sharepoint.com/.
51+
52+
53+
### -----------------------EXAMPLE 2-----------------------------
54+
```
55+
$username = "[email protected]"$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
56+
```
57+
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/.
58+
4959

5060
## PARAMETERS
5161

@@ -82,7 +92,8 @@ Accept wildcard characters: False
8292
```
8393
8494
### -Credential
85-
{{Fill Credential Description}}
95+
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.
96+
8697
8798
```yaml
8899
Type: CredentialCmdletPipeBind
@@ -98,7 +109,13 @@ Accept wildcard characters: False
98109
```
99110
100111
### -Region
101-
{{Fill Region Description}}
112+
The valid values are: Default | ITAR | Germany | China
113+
114+
The default value is "default".
115+
116+
Note:
117+
The ITAR value is for United States Government cloud tenancies only.
118+
102119
103120
```yaml
104121
Type: AADCrossTenantAuthenticationLocation
@@ -114,7 +131,8 @@ Accept wildcard characters: False
114131
```
115132
116133
### -Url
117-
{{Fill Url Description}}
134+
Specifies the URL of the SharePoint Online Administration Center site.
135+
118136
119137
```yaml
120138
Type: UrlCmdletPipeBind
@@ -145,4 +163,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
145163
[Set up the SharePoint Online Management Shell Windows PowerShell environment]()
146164
147165
[Disconnect-SPOService](Disconnect-SPOService.md)
148-

0 commit comments

Comments
 (0)