Update-MgUserSettingShiftPreference

Update the properties and relationships of a shiftPreferences object.

Note

To view the beta release of this cmdlet, view Update-MgBetaUserSettingShiftPreference

Syntax

Update-MgUserSettingShiftPreference
      -UserId <String>
      [-ResponseHeadersVariable <String>]
      [-AdditionalProperties <Hashtable>]
      [-Availability <IMicrosoftGraphShiftAvailability[]>]
      [-Id <String>]
      [-LastModifiedBy <IMicrosoftGraphIdentitySet>]
      [-Headers <IDictionary>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-MgUserSettingShiftPreference
      -UserId <String>
      -BodyParameter <IMicrosoftGraphShiftPreferences>
      [-ResponseHeadersVariable <String>]
      [-Headers <IDictionary>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-MgUserSettingShiftPreference
      -InputObject <IUsersIdentity>
      [-ResponseHeadersVariable <String>]
      [-AdditionalProperties <Hashtable>]
      [-Availability <IMicrosoftGraphShiftAvailability[]>]
      [-Id <String>]
      [-LastModifiedBy <IMicrosoftGraphIdentitySet>]
      [-Headers <IDictionary>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-MgUserSettingShiftPreference
      -InputObject <IUsersIdentity>
      -BodyParameter <IMicrosoftGraphShiftPreferences>
      [-ResponseHeadersVariable <String>]
      [-Headers <IDictionary>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Update the properties and relationships of a shiftPreferences object.

Permissions

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) User.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application UserShiftPreferences.ReadWrite.All Not available.

Examples

Example 1: Code snippet

Import-Module Microsoft.Graph.Users

$params = @{
	id = "SHPR_eeab4fb1-20e5-48ca-ad9b-98119d94bee7"
	"@odata.etag" = "1a371e53-f0a6-4327-a1ee-e3c56e4b38aa"
	availability = @(
		@{
			recurrence = @{
				pattern = @{
					type = "Weekly"
					daysOfWeek = @(
					"Monday"
				"Wednesday"
			"Friday"
		)
		interval = 1
	}
	range = @{
		type = "noEnd"
	}
}
timeZone = "Pacific Standard Time"
timeSlots = $null
}
)
}

Update-MgUserSettingShiftPreference -UserId $userId -BodyParameter $params

This example shows how to use the Update-MgUserSettingShiftPreference Cmdlet.

Parameters

-AdditionalProperties

Additional Parameters

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

-Availability

Availability of the user to be scheduled for work and its recurrence pattern. To construct, see NOTES section for AVAILABILITY properties and create a hash table.

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

-BodyParameter

shiftPreferences To construct, see NOTES section for BODYPARAMETER properties and create a hash table.

Type:IMicrosoftGraphShiftPreferences
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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

-Headers

Optional headers that will be added to the request.

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

-Id

The unique identifier for an entity. Read-only.

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

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

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

-LastModifiedBy

identitySet To construct, see NOTES section for LASTMODIFIEDBY properties and create a hash table.

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

-ProgressAction

{{ Fill ProgressAction Description }}

Type:ActionPreference
Aliases:proga
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResponseHeadersVariable

Optional Response Headers Variable.

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

-UserId

The unique identifier of user

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.Graph.PowerShell.Models.IMicrosoftGraphShiftPreferences

Microsoft.Graph.PowerShell.Models.IUsersIdentity

System.Collections.IDictionary

Outputs

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphShiftPreferences

Notes

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

AVAILABILITY <IMicrosoftGraphShiftAvailability- []>: Availability of the user to be scheduled for work and its recurrence pattern.

  • [Recurrence <IMicrosoftGraphPatternedRecurrence>]: patternedRecurrence
    • [(Any) <Object>]: This indicates any property can be added to this object.
    • [Pattern <IMicrosoftGraphRecurrencePattern>]: recurrencePattern
      • [(Any) <Object>]: This indicates any property can be added to this object.
      • [DayOfMonth <Int32?>]: The day of the month on which the event occurs. Required if type is absoluteMonthly or absoluteYearly.
      • [DaysOfWeek <String- []>]: A collection of the days of the week on which the event occurs. The possible values are: sunday, monday, tuesday, wednesday, thursday, friday, saturday. If type is relativeMonthly or relativeYearly, and daysOfWeek specifies more than one day, the event falls on the first day that satisfies the pattern. Required if type is weekly, relativeMonthly, or relativeYearly.
      • [FirstDayOfWeek <String>]: dayOfWeek
      • [Index <String>]: weekIndex
      • [Interval <Int32?>]: The number of units between occurrences, where units can be in days, weeks, months, or years, depending on the type. Required.
      • [Month <Int32?>]: The month in which the event occurs. This is a number from 1 to 12.
      • [Type <String>]: recurrencePatternType
    • [Range <IMicrosoftGraphRecurrenceRange>]: recurrenceRange
      • [(Any) <Object>]: This indicates any property can be added to this object.
      • [EndDate <DateTime?>]: The date to stop applying the recurrence pattern. Depending on the recurrence pattern of the event, the last occurrence of the meeting may not be this date. Required if type is endDate.
      • [NumberOfOccurrences <Int32?>]: The number of times to repeat the event. Required and must be positive if type is numbered.
      • [RecurrenceTimeZone <String>]: Time zone for the startDate and endDate properties. Optional. If not specified, the time zone of the event is used.
      • [StartDate <DateTime?>]: The date to start applying the recurrence pattern. The first occurrence of the meeting may be this date or later, depending on the recurrence pattern of the event. Must be the same value as the start property of the recurring event. Required.
      • [Type <String>]: recurrenceRangeType
  • [TimeSlots <IMicrosoftGraphTimeRange- []>]: The time slot(s) preferred by the user.
    • [EndTime <String>]: End time for the time range.
    • [StartTime <String>]: Start time for the time range.
  • [TimeZone <String>]: Specifies the time zone for the indicated time.

BODYPARAMETER <IMicrosoftGraphShiftPreferences>: shiftPreferences

  • [(Any) <Object>]: This indicates any property can be added to this object.
  • [LastModifiedBy <IMicrosoftGraphIdentitySet>]: identitySet
    • [(Any) <Object>]: This indicates any property can be added to this object.
    • [Application <IMicrosoftGraphIdentity>]: identity
      • [(Any) <Object>]: This indicates any property can be added to this object.
      • [DisplayName <String>]: The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
      • [Id <String>]: Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
    • [Device <IMicrosoftGraphIdentity>]: identity
    • [User <IMicrosoftGraphIdentity>]: identity
  • [Id <String>]: The unique identifier for an entity. Read-only.
  • [Availability <IMicrosoftGraphShiftAvailability- []>]: Availability of the user to be scheduled for work and its recurrence pattern.
    • [Recurrence <IMicrosoftGraphPatternedRecurrence>]: patternedRecurrence
      • [(Any) <Object>]: This indicates any property can be added to this object.
      • [Pattern <IMicrosoftGraphRecurrencePattern>]: recurrencePattern
        • [(Any) <Object>]: This indicates any property can be added to this object.
        • [DayOfMonth <Int32?>]: The day of the month on which the event occurs. Required if type is absoluteMonthly or absoluteYearly.
        • [DaysOfWeek <String- []>]: A collection of the days of the week on which the event occurs. The possible values are: sunday, monday, tuesday, wednesday, thursday, friday, saturday. If type is relativeMonthly or relativeYearly, and daysOfWeek specifies more than one day, the event falls on the first day that satisfies the pattern. Required if type is weekly, relativeMonthly, or relativeYearly.
        • [FirstDayOfWeek <String>]: dayOfWeek
        • [Index <String>]: weekIndex
        • [Interval <Int32?>]: The number of units between occurrences, where units can be in days, weeks, months, or years, depending on the type. Required.
        • [Month <Int32?>]: The month in which the event occurs. This is a number from 1 to 12.
        • [Type <String>]: recurrencePatternType
      • [Range <IMicrosoftGraphRecurrenceRange>]: recurrenceRange
        • [(Any) <Object>]: This indicates any property can be added to this object.
        • [EndDate <DateTime?>]: The date to stop applying the recurrence pattern. Depending on the recurrence pattern of the event, the last occurrence of the meeting may not be this date. Required if type is endDate.
        • [NumberOfOccurrences <Int32?>]: The number of times to repeat the event. Required and must be positive if type is numbered.
        • [RecurrenceTimeZone <String>]: Time zone for the startDate and endDate properties. Optional. If not specified, the time zone of the event is used.
        • [StartDate <DateTime?>]: The date to start applying the recurrence pattern. The first occurrence of the meeting may be this date or later, depending on the recurrence pattern of the event. Must be the same value as the start property of the recurring event. Required.
        • [Type <String>]: recurrenceRangeType
    • [TimeSlots <IMicrosoftGraphTimeRange- []>]: The time slot(s) preferred by the user.
      • [EndTime <String>]: End time for the time range.
      • [StartTime <String>]: Start time for the time range.
    • [TimeZone <String>]: Specifies the time zone for the indicated time.

INPUTOBJECT <IUsersIdentity>: Identity Parameter

  • [AttachmentBaseId <String>]: The unique identifier of attachmentBase
  • [AttachmentSessionId <String>]: The unique identifier of attachmentSession
  • [ChecklistItemId <String>]: The unique identifier of checklistItem
  • [DirectoryObjectId <String>]: The unique identifier of directoryObject
  • [ExtensionId <String>]: The unique identifier of extension
  • [LicenseDetailsId <String>]: The unique identifier of licenseDetails
  • [LinkedResourceId <String>]: The unique identifier of linkedResource
  • [OAuth2PermissionGrantId <String>]: The unique identifier of oAuth2PermissionGrant
  • [OutlookCategoryId <String>]: The unique identifier of outlookCategory
  • [ProfilePhotoId <String>]: The unique identifier of profilePhoto
  • [ServiceStorageQuotaBreakdownId <String>]: The unique identifier of serviceStorageQuotaBreakdown
  • [SharedInsightId <String>]: The unique identifier of sharedInsight
  • [TodoTaskId <String>]: The unique identifier of todoTask
  • [TodoTaskListId <String>]: The unique identifier of todoTaskList
  • [TrendingId <String>]: The unique identifier of trending
  • [UsedInsightId <String>]: The unique identifier of usedInsight
  • [UserId <String>]: The unique identifier of user
  • [WindowsSettingId <String>]: The unique identifier of windowsSetting
  • [WindowsSettingInstanceId <String>]: The unique identifier of windowsSettingInstance

LASTMODIFIEDBY <IMicrosoftGraphIdentitySet>: identitySet

  • [(Any) <Object>]: This indicates any property can be added to this object.
  • [Application <IMicrosoftGraphIdentity>]: identity
    • [(Any) <Object>]: This indicates any property can be added to this object.
    • [DisplayName <String>]: The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
    • [Id <String>]: Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
  • [Device <IMicrosoftGraphIdentity>]: identity
  • [User <IMicrosoftGraphIdentity>]: identity