Edit

Share via


New-CsTeamsShiftsConnectionInstance

This cmdlet creates a Shifts connection instance.

Syntax

New (Default)

New-CsTeamsShiftsConnectionInstance
    -Body <IConnectorInstanceRequest>
    [-Break]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

NewExpanded

New-CsTeamsShiftsConnectionInstance
    [-ConnectionId <string>]
    [-ConnectorAdminEmail <string[]>]
    [-DesignatedActorId <string>]
    [-Name <string>]
    [-State <string>]
    [-SyncFrequencyInMin <int>]
    [-SyncScenarioOpenShiftRequest <string>]
    [-SyncScenarioShift <string>]
    [-SyncScenarioSwapRequest <string>]
    [-SyncScenarioTimeCard <string>]
    [-SyncScenarioUserShiftPreference <string>]
    [-Break]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

This cmdlet creates a Shifts connection instance. It allows the admin to set up the environment for further connection settings.

Examples

Example 1

PS C:\> $result = New-CsTeamsShiftsConnectionInstance `
-connectionId  "79964000-286a-4216-ac60-c795a426d61a" `
-name "Cmdlet test instance" `
-connectorAdminEmail @("admin@contoso.com", "superadmin@contoso.com") `
-designatedActorId "93f85765-47db-412d-8f06-9844718762a1" `
-State "Active" `
-syncFrequencyInMin "10" `
-SyncScenarioOfferShiftRequest "FromWfmToShifts" `
-SyncScenarioOpenShift "FromWfmToShifts" `
-SyncScenarioOpenShiftRequest "FromWfmToShifts" `
-SyncScenarioShift "FromWfmToShifts" `
-SyncScenarioSwapRequest "FromWfmToShifts" `
-SyncScenarioTimeCard "FromWfmToShifts" `
-SyncScenarioTimeOff "FromWfmToShifts" `
-SyncScenarioTimeOffRequest "FromWfmToShifts" `
-SyncScenarioUserShiftPreference "Disabled"
PS C:\> $result.ToJsonString()
{
  "syncScenarios": {
    "offerShiftRequest": "FromWfmToShifts",
    "openShift": "FromWfmToShifts",
    "openShiftRequest": "FromWfmToShifts",
    "shift": "FromWfmToShifts",
    "swapRequest": "FromWfmToShifts",
    "timeCard": "FromWfmToShifts",
    "timeOff": "FromWfmToShifts",
    "timeOffRequest": "FromWfmToShifts",
    "userShiftPreferences": "Disabled"
  },
  "id": "WCI-eba2865f-6cac-46f9-8733-e0631a4536e1",
  "tenantId": "dfd24b34-ccb0-47e1-bdb7-e49db9c7c14a",
  "connectionId": "79964000-286a-4216-ac60-c795a426d61a",
  "connectorAdminEmails": [ "admin@contoso.com", "superadmin@contoso.com" ],
  "connectorId": "95BF2848-2DDA-4425-B0EE-D62AEED4C0A0",
  "designatedActorId": "ec1a4edb-1a5f-4b2d-b2a4-37aab6ebd231",
  "name": "Cmdlet test instance",
  "syncFrequencyInMin": 10,
  "workforceIntegrationId": "WFI_6b225907-b476-4d40-9773-08b86db7b11b",
  "etag": "\"4f005d22-0000-0400-0000-642ff64a0000\"",
  "createdDateTime": "2023-04-07T10:54:01.8170000Z",
  "lastModifiedDateTime": "2023-04-07T10:54:01.8170000Z",
  "state": "Active"
}

Returns the object of created connector instance.

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

Parameters

-Body

The request body

Parameter properties

Type:IConnectorInstanceRequest
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

New
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Break

Wait for .NET debugger to attach

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ConnectionId

Gets or sets the WFM connection ID for the new instance. This can be retrieved by running Get-CsTeamsShiftsConnection.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ConnectorAdminEmail

Gets or sets the list of connector admin email addresses.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DesignatedActorId

Gets or sets the designated actor ID that App acts as for Shifts Graph Api calls.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HttpPipelineAppend

SendAsync Pipeline Steps to be appended to the front of the pipeline.

Parameter properties

Type:

SendAsyncStep[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HttpPipelinePrepend

SendAsync Pipeline Steps to be prepended to the front of the pipeline.

Parameter properties

Type:

SendAsyncStep[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The connector instance name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Proxy

This cmdlet creates a Shifts connection instance. It allows the admin to set up the environment for further connection settings.

Parameter properties

Type:Uri
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProxyCredential

Credentials for a proxy server to use for the remote call.

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProxyUseDefaultCredentials

Use the default credentials for the proxy.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-State

The state of the connection instance. Valid values are "Active" and "Disabled". A third value, "ErrorDisabled", signifies an error in the connection instance.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SyncFrequencyInMin

The sync frequency in minutes.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SyncScenarioOfferShiftRequest

The sync state for the offer shift request scenario. Valid values are "Disabled", "FromWfmToShifts", and "TwoWay".

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SyncScenarioOpenShift

The sync state for the open shift scenario. Valid values are "Disabled", "FromWfmToShifts", and "TwoWay".

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SyncScenarioOpenShiftRequest

The sync state for the open shift request scenario. Valid values are "Disabled", "FromWfmToShifts", and "TwoWay".

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SyncScenarioShift

The sync state for the shift scenario. Valid values are "Disabled", "FromWfmToShifts", and "TwoWay".

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SyncScenarioSwapRequest

The sync state for the swap shift request scenario. Valid values are "Disabled", "FromWfmToShifts", and "TwoWay".

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SyncScenarioTimeCard

The sync state for the time card scenario. Valid values are "Disabled", "FromWfmToShifts", and "TwoWay".

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SyncScenarioTimeOff

The sync state for the time off scenario. Valid values are "Disabled", "FromWfmToShifts", and "TwoWay".

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SyncScenarioTimeOffRequest

The sync state for the time off request scenario. Valid values are "Disabled", "FromWfmToShifts", and "TwoWay".

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SyncScenarioUserShiftPreference

The sync state for the user shift preferences scenario. Valid values are "Disabled", "FromWfmToShifts", and "TwoWay".

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NewExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.IConnectorInstanceRequest

Outputs

Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.IConnectorInstanceResponse

Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.IErrorDetailsResponse