< Back
New-SCSession
Post
NAME New-SCSession
SYNOPSIS
Connects to the Office 365 Service Communications API using your administrator account credentials.
SYNTAX
New-SCSession [-Credential] <PSCredential> [[-Locale] <String>] [<CommonParameters>]
DESCRIPTION
Connects to the Office 365 Service Communications API using your administrator account credentials. This
generates a cookie that authenticates your account to the API. This cookie has a lifetime of 48 hours.
PARAMETERS
-Credential <PSCredential>
Specifies a user name and password of an Office 365 tenant admin. Accepts an object of type PSCredential or a
username of type String. If a username is specified, you'll be prompted to enter the password.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Locale <String>
Specifies the locale for output. If locale is ommitted or the value you pass does not match acceptable options
will default to US English (en-US).
Required? false
Position? 2
Default value en-US
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
O365ServiceCommunications.Session
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$O365Admin = Get-Credential
$Session = New-SCSession -Credential $O365Admin
Create a credential object and use that credential to connect to the Service Communications API.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$Session = New-SCSession -Credential 'O365Admin@domain.onmicrosoft.com'
Connect to the Service Communications API using a string username. When you run this command you'll be
prompted for a password.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$Session = New-SCSession -Credential 'O365Admin@domain.onmicrosoft.com' -locale es-ES
Connect to the Service Communications API and specify Spanish (Spain) and the language.
RELATED LINKS
https://msdn.microsoft.com/en-us/librar ... 76043.aspx
SYNOPSIS
Connects to the Office 365 Service Communications API using your administrator account credentials.
SYNTAX
New-SCSession [-Credential] <PSCredential> [[-Locale] <String>] [<CommonParameters>]
DESCRIPTION
Connects to the Office 365 Service Communications API using your administrator account credentials. This
generates a cookie that authenticates your account to the API. This cookie has a lifetime of 48 hours.
PARAMETERS
-Credential <PSCredential>
Specifies a user name and password of an Office 365 tenant admin. Accepts an object of type PSCredential or a
username of type String. If a username is specified, you'll be prompted to enter the password.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Locale <String>
Specifies the locale for output. If locale is ommitted or the value you pass does not match acceptable options
will default to US English (en-US).
Required? false
Position? 2
Default value en-US
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
O365ServiceCommunications.Session
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$O365Admin = Get-Credential
$Session = New-SCSession -Credential $O365Admin
Create a credential object and use that credential to connect to the Service Communications API.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$Session = New-SCSession -Credential 'O365Admin@domain.onmicrosoft.com'
Connect to the Service Communications API using a string username. When you run this command you'll be
prompted for a password.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$Session = New-SCSession -Credential 'O365Admin@domain.onmicrosoft.com' -locale es-ES
Connect to the Service Communications API and specify Spanish (Spain) and the language.
RELATED LINKS
https://msdn.microsoft.com/en-us/librar ... 76043.aspx