external help file | Module Name | title | author | ms.author | manager | online version | schema |
---|---|---|---|---|---|---|---|
Microsoft.Teams.ConfigAPI.Cmdlets-help.xml |
MicrosoftTeams |
New-CsTeamsShiftsConnection |
shane-malone |
shanemalone |
valk |
2.0.0 |
This cmdlet creates a new workforce management (WFM) connection.
New-CsTeamsShiftsConnection -Body <IWfmConnectionRequest> [-Authorization <string>] [-Break] [-HttpPipelineAppend <SendAsyncStep[]>] [-HttpPipelinePrepend <SendAsyncStep[]>] [-Proxy <uri>] [-ProxyCredential <pscredential>] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [<CommonParameters>]
New-CsTeamsShiftsConnection -ConnectorId <string> -ConnectorSpecificSettings <IWfmConnectionRequestConnectorSpecificSettings> -Name <string> -State <string> [-Authorization <string>] [-Break] [-HttpPipelineAppend <SendAsyncStep[]>] [-HttpPipelinePrepend <SendAsyncStep[]>] [-Proxy <uri>] [-ProxyCredential <pscredential>] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [<CommonParameters>]
This cmdlet creates a Shifts WFM connection. It allows the admin to set up the environment for creating connection instances.
PS C:\> $result = New-CsTeamsShiftsConnection `
-connectorId "6A51B888-FF44-4FEA-82E1-839401E00000" `
-name "Cmdlet test connection" `
-connectorSpecificSettings (New-Object Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ConnectorSpecificBlueYonderSettingsRequest `
-Property @{
adminApiUrl = "https://contoso.com/retail/data/wfmadmin/api/v1-beta2"
siteManagerUrl = "https://contoso.com/retail/data/wfmsm/api/v1-beta2"
essApiUrl = "https://contoso.com/retail/data/wfmess/api/v1-beta1"
retailWebApiUrl = "https://contoso.com/retail/data/retailwebapi/api/v1"
cookieAuthUrl = "https://contoso.com/retail/data/login"
federatedAuthUrl = "https://contoso.com/retail/data/login"
LoginUserName = "PlaceholderForUsername"
LoginPwd = "PlaceholderForPassword"
}) `
-state "Active"
PS C:\> $result | Format-List
{
ConnectorId : 6A51B888-FF44-4FEA-82E1-839401E00000
ConnectorSpecificSettingAdminApiUrl : https://www.contoso.com/retail/data/wfmadmin/api/v1-beta2
ConnectorSpecificSettingApiUrl :
ConnectorSpecificSettingAppKey :
ConnectorSpecificSettingClientId :
ConnectorSpecificSettingCookieAuthUrl : https://www.contoso.com/retail/data/login
ConnectorSpecificSettingEssApiUrl : https://www.contoso.com/retail/data/wfmess/api/v1-beta2
ConnectorSpecificSettingFederatedAuthUrl : https://www.contoso.com/retail/data/login
ConnectorSpecificSettingRetailWebApiUrl : https://www.contoso.com/retail/data/retailwebapi/api/v1
ConnectorSpecificSettingSiteManagerUrl : https://www.contoso.com/retail/data/wfmsm/api/v1-beta2
ConnectorSpecificSettingSsoUrl :
CreatedDateTime : 24/03/2023 04:58:23
Etag : "5b00dd1b-0000-0400-0000-641d2df00000"
Id : 4dae9db0-0841-412c-8d6b-f5684bfebdd7
LastModifiedDateTime : 24/03/2023 04:58:23
Name : Cmdlet test connection
State : Active
TenantId : 3FDCAAF2-863A-4520-97BA-DFA211595876
}
Returns the object of the created connection.
In case of an error, we can capture the error response as follows:
-
Hold the cmdlet output in a variable:
$result=<CMDLET>
-
To get the entire error message in Json:
$result.ToJsonString()
-
To get the error object and object details:
$result, $result.Detail
PS C:\> $result = New-CsTeamsShiftsConnection `
-connectorId "95BF2848-2DDA-4425-B0EE-D62AEED4C0A0" `
-name "Cmdlet test connection" `
-connectorSpecificSettings (New-Object Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ConnectorSpecificUkgDimensionsSettingsRequest `
-Property @{
apiUrl = "https://www.contoso.com/api"
ssoUrl = "https://www.contoso.com/sso"
appKey = "PlaceholderForAppKey"
clientId = "Es5Q2fB4PXweCyto6Ms6J2kRB7uwAc3W"
clientSecret = "PlaceholderForClientSecret"
LoginUserName = "PlaceholderForUsername"
LoginPwd = "PlaceholderForPassword"
}) `
-state "Active"
PS C:\> $result | Format-List
ConnectorId : 95BF2848-2DDA-4425-B0EE-D62AEED4C0A0
ConnectorSpecificSettingAdminApiUrl :
ConnectorSpecificSettingApiUrl : https://www.contoso.com/api
ConnectorSpecificSettingAppKey :
ConnectorSpecificSettingClientId : Es5Q2fB4PXweCyto6Ms6J2kRB7uwAc3W
ConnectorSpecificSettingCookieAuthUrl :
ConnectorSpecificSettingEssApiUrl :
ConnectorSpecificSettingFederatedAuthUrl :
ConnectorSpecificSettingRetailWebApiUrl :
ConnectorSpecificSettingSiteManagerUrl :
ConnectorSpecificSettingSsoUrl : https://www.contoso.com/sso
CreatedDateTime : 06/04/2023 11:05:39
Etag : "3100fd6e-0000-0400-0000-642ea7840000"
Id : a2d1b091-5140-4dd2-987a-98a8b5338744
LastModifiedDateTime : 06/04/2023 11:05:39
Name : Cmdlet test connection
State : Active
TenantId : 3FDCAAF2-863A-4520-97BA-DFA211595876
The request body.
Type: IConnectorInstanceRequest
Parameter Sets: New
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Wait for .NET debugger to attach.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The WFM connector ID.
Type: String
Parameter Sets: NewExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The connection name.
Type: String
Parameter Sets: NewExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The connection name.
Type: Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ConnectorSpecificSettingsRequest
Parameter Sets: NewExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
SendAsync Pipeline Steps to be appended to the front of the pipeline
Type: SendAsyncStep[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
SendAsync Pipeline Steps to be prepended to the front of the pipeline
Type: SendAsyncStep[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The URI for the proxy server to use
Type: Uri
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Credentials for a proxy server to use for the remote call.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Use the default credentials for the proxy.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The state of the connection. Valid values are "Active" and "Disabled". A third value, "ErrorDisabled", signifies an error in the connection.
Type: String
Parameter Sets: NewExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Update-CsTeamsShiftsConnection