Bearbeiten

Freigeben über


Set-CsTeamsShiftsConnectionInstance

This cmdlet updates a Shifts connection instance.

Syntax

Set-CsTeamsShiftsConnectionInstance
   -ConnectorInstanceId <string>
   -IfMatch <string>
   -Body <IUpdateConnectorInstanceRequest>[-Break]
   [-HttpPipelineAppend <SendAsyncStep[]>]
   [-HttpPipelinePrepend <SendAsyncStep[]>]
   [-Proxy <uri>][-ProxyCredential <pscredential>]
   [-ProxyUseDefaultCredentials]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CsTeamsShiftsConnectionInstance
   -ConnectorInstanceId <string>
   -IfMatch <string>
   [-ConnectionId <string>]
   [-ConnectorAdminEmail <string[]>][-DesignatedActorId <string>]
   [-Etag <string>]
   [-Name <string>]
   [-State <string>]
   [-SyncFrequencyInMin <int>]
   [-SyncScenarioOfferShiftRequest <string>][-SyncScenarioOpenShift <string>]
   [-SyncScenarioOpenShiftRequest <string>]
   [-SyncScenarioShift <string>]
   [-SyncScenarioSwapRequest <string>]
   [-SyncScenarioTimeCard <string>]
   [-SyncScenarioTimeOff <string>]
   [-SyncScenarioTimeOffRequest <string>]
   [-SyncScenarioUserShiftPreference <string>]
   [-Break]
   [-HttpPipelineAppend <SendAsyncStep[]>]
   [-HttpPipelinePrepend <SendAsyncStep[]>]
   [-Proxy <uri>]
   [-ProxyCredential <pscredential>]
   [-ProxyUseDefaultCredentials]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CsTeamsShiftsConnectionInstance
   -InputObject <IConfigApiBasedCmdletsIdentity>
   -IfMatch <string>
   [-ConnectionId <string>]
   [-ConnectorAdminEmail <string[]>]
   [-DesignatedActorId <string>]
   [-Etag <string>]
   [-Name <string>]
   [-State <string>]
   [-SyncFrequencyInMin <int>]
   [-SyncScenarioOfferShiftRequest <string>][-SyncScenarioOpenShift <string>]
   [-SyncScenarioOpenShiftRequest <string>]
   [-SyncScenarioShift <string>]
   [-SyncScenarioSwapRequest <string>]
   [-SyncScenarioTimeCard <string>]
   [-SyncScenarioTimeOff <string>]
   [-SyncScenarioTimeOffRequest <string>]
   [-SyncScenarioUserShiftPreference <string>]
   [-Break]
   [-HttpPipelineAppend <SendAsyncStep[]>]
   [-HttpPipelinePrepend <SendAsyncStep[]>]
   [-Proxy <uri>]
   [-ProxyCredential <pscredential>]
   [-ProxyUseDefaultCredentials]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CsTeamsShiftsConnectionInstance
   -InputObject <IConfigApiBasedCmdletsIdentity>
   -IfMatch <string>
   -Body <IUpdateConnectorInstanceRequest>
   [-Break]
   [-HttpPipelineAppend <SendAsyncStep[]>]
   [-HttpPipelinePrepend <SendAsyncStep[]>]
   [-Proxy <uri>]
   [-ProxyCredential <pscredential>]
   [-ProxyUseDefaultCredentials]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

This cmdlet updates a Shifts connection instance. It allows the admin to make changes to the settings in the instance such as name, enabled scenarios, and sync frequency. This cmdlet can update every input field except -ConnectorId and -ConnectorInstanceId.

Examples

Example 1

PS C:\> $connectionInstance = Get-CsTeamsShiftsConnectionInstance -ConnectorInstanceId WCI-eba2865f-6cac-46f9-8733-e0631a4536e1
PS C:\> $result = Set-CsTeamsShiftsConnectionInstance `
    -connectorInstanceId "WCI-eba2865f-6cac-46f9-8733-e0631a4536e1"
    -IfMatch $connectionInstance.Etag `
    -connectionId  "79964000-286a-4216-ac60-c795a426d61a" `
    -name "Cmdlet test instance - updated" `
    -connectorAdminEmail @() `
    -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": "a2d1b091-5140-4dd2-987a-98a8b5338744",
  "connectorAdminEmails": [ ],
  "connectorId": "95BF2848-2DDA-4425-B0EE-D62AEED4C0A0",
  "designatedActorId": "ec1a4edb-1a5f-4b2d-b2a4-37aab6ebd231",
  "name": "Cmdlet test instance - updated",
  "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"
}

Updates the instance with the specified -ConnectorInstanceId. Returns the object of the updated connector instance.

In case of error, we can capture the error response as following:

  • 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

Type:IConnectorInstanceRequest
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Break

Wait for .NET debugger to attach

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ConnectionId

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ConnectorAdminEmail

Gets or sets the list of connector admin email addresses.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ConnectorInstanceId

The Id of the connector instance to be updated.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DesignatedActorId

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Etag

Used to manage concurrency control. It helps ensure that updates to a Shifts connection instance are only applied if the instance has not been modified since it was last retrieved. This is particularly useful in preventing conflicts when multiple administrators might be making changes simultaneously.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HttpPipelineAppend

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

Type:SendAsyncStep[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HttpPipelinePrepend

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

Type:SendAsyncStep[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IfMatch

The value of the etag field as returned by the cmdlets.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Identity Parameter.

Type:IConfigApiBasedCmdletsIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The connector instance name.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Proxy

The URI for the proxy server to use.

Type:Uri
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ProxyCredential

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

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ProxyUseDefaultCredentials

Use the default credentials for the proxy.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SyncFrequencyInMin

The sync frequency in minutes.

Type:Int32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SyncScenarioOfferShiftRequest

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SyncScenarioOpenShift

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SyncScenarioOpenShiftRequest

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SyncScenarioShift

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SyncScenarioSwapRequest

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SyncScenarioTimeCard

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SyncScenarioTimeOff

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SyncScenarioTimeOffRequest

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SyncScenarioUserShiftPreference

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.IConfigApiBasedCmdletsIdentity

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

Outputs

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

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