Share via


New-MgBetaTeamScheduleTimeOff

Create a new timeOff instance in a schedule.

Note

To view the v1.0 release of this cmdlet, view New-MgTeamScheduleTimeOff

Syntax

CreateExpanded (Default)

New-MgBetaTeamScheduleTimeOff
    -TeamId <String>
    [-ResponseHeadersVariable <String>]
    [-AdditionalProperties <Hashtable>]
    [-CreatedBy <IMicrosoftGraphIdentitySet>]
    [-DraftTimeOff <IMicrosoftGraphTimeOffItem>]
    [-Id <String>]
    [-IsStagedForDeletion]
    [-LastModifiedBy <IMicrosoftGraphIdentitySet>]
    [-SharedTimeOff <IMicrosoftGraphTimeOffItem>]
    [-TeamInfo <IMicrosoftGraphShiftsTeamInfo>]
    [-UserId <String>]
    [-UserInfo <IMicrosoftGraphShiftsUserInfo>]
    [-Headers <IDictionary>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Create

New-MgBetaTeamScheduleTimeOff
    -TeamId <String>
    -BodyParameter <IMicrosoftGraphTimeOff>
    [-ResponseHeadersVariable <String>]
    [-Headers <IDictionary>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaIdentityExpanded

New-MgBetaTeamScheduleTimeOff
    -InputObject <ITeamsIdentity>
    [-ResponseHeadersVariable <String>]
    [-AdditionalProperties <Hashtable>]
    [-CreatedBy <IMicrosoftGraphIdentitySet>]
    [-DraftTimeOff <IMicrosoftGraphTimeOffItem>]
    [-Id <String>]
    [-IsStagedForDeletion]
    [-LastModifiedBy <IMicrosoftGraphIdentitySet>]
    [-SharedTimeOff <IMicrosoftGraphTimeOffItem>]
    [-TeamInfo <IMicrosoftGraphShiftsTeamInfo>]
    [-UserId <String>]
    [-UserInfo <IMicrosoftGraphShiftsUserInfo>]
    [-Headers <IDictionary>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaIdentity

New-MgBetaTeamScheduleTimeOff
    -InputObject <ITeamsIdentity>
    -BodyParameter <IMicrosoftGraphTimeOff>
    [-ResponseHeadersVariable <String>]
    [-Headers <IDictionary>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Create a new timeOff instance in a schedule.

Permissions

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Schedule.ReadWrite.All, Group.ReadWrite.All,
Delegated (personal Microsoft account) Not supported
Application Schedule.ReadWrite.All,

Examples

Example 1: Code snippet


Import-Module Microsoft.Graph.Beta.Teams

$params = @{
	userId = "c5d0c76b-80c4-481c-be50-923cd8d680a1"
	sharedTimeOff = @{
		timeOffReasonId = "TOR_891045ca-b5d2-406b-aa06-a3c8921245d7"
		startDateTime = [System.DateTime]::Parse("2019-03-11T07:00:00Z")
		endDateTime = [System.DateTime]::Parse("2019-03-12T07:00:00Z")
		theme = "white"
	}
	draftTimeOff = @{
		timeOffReasonId = "TOR_891045ca-b5d2-406b-aa06-a3c8921245d7"
		startDateTime = [System.DateTime]::Parse("2019-03-11T07:00:00Z")
		endDateTime = [System.DateTime]::Parse("2019-03-12T07:00:00Z")
		theme = "pink"
	}
}

New-MgBetaTeamScheduleTimeOff -TeamId $teamId -BodyParameter $params

This example shows how to use the New-MgBetaTeamScheduleTimeOff Cmdlet.

Parameters

-AdditionalProperties

Additional Parameters

Parameter properties

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

Parameter sets

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

-BodyParameter

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

Parameter properties

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

Parameter sets

Create
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
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

-CreatedBy

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

Parameter properties

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

Parameter sets

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

-DraftTimeOff

timeOffItem To construct, see NOTES section for DRAFTTIMEOFF properties and create a hash table.

Parameter properties

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

Parameter sets

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

-Headers

Optional headers that will be added to the request.

Parameter properties

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

Parameter sets

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

-Id

The unique identifier for an entity. Read-only.

Parameter properties

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

Parameter sets

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

-InputObject

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

Parameter properties

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

Parameter sets

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

-IsStagedForDeletion

The timeOff is marked for deletion, a process that is finalized when the schedule is shared.

Parameter properties

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

Parameter sets

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

-LastModifiedBy

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

Parameter properties

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

Parameter sets

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

-ResponseHeadersVariable

Optional Response Headers Variable.

Parameter properties

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

Parameter sets

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

-SharedTimeOff

timeOffItem To construct, see NOTES section for SHAREDTIMEOFF properties and create a hash table.

Parameter properties

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

Parameter sets

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

-TeamId

The unique identifier of team

Parameter properties

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

Parameter sets

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

-TeamInfo

shiftsTeamInfo To construct, see NOTES section for TEAMINFO properties and create a hash table.

Parameter properties

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

Parameter sets

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

-UserId

ID of the user assigned to the timeOff. Required.

Parameter properties

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

Parameter sets

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

-UserInfo

shiftsUserInfo To construct, see NOTES section for USERINFO properties and create a hash table.

Parameter properties

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

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
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.Graph.Beta.PowerShell.Models.IMicrosoftGraphTimeOff

Microsoft.Graph.Beta.PowerShell.Models.ITeamsIdentity

System.Collections.IDictionary

Outputs

Microsoft.Graph.Beta.PowerShell.Models.IMicrosoftGraphTimeOff

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.

BODYPARAMETER <IMicrosoftGraphTimeOff>: timeOff

  • [(Any) <Object>]: This indicates any property can be added to this object.
  • [CreatedBy <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. This property is read-only.
      • [Id <String>]: The identifier of the identity. This property is read-only.
    • [Device <IMicrosoftGraphIdentity>]: identity
    • [User <IMicrosoftGraphIdentity>]: identity
  • [LastModifiedBy <IMicrosoftGraphIdentitySet>]: identitySet
  • [Id <String>]: The unique identifier for an entity. Read-only.
  • [DraftTimeOff <IMicrosoftGraphTimeOffItem>]: timeOffItem
    • [(Any) <Object>]: This indicates any property can be added to this object.
    • [EndDateTime <DateTime?>]:
    • [StartDateTime <DateTime?>]:
    • [Theme <String>]: scheduleEntityTheme
    • [TimeOffReasonId <String>]: ID of the timeOffReason for this timeOffItem. Required.
  • [IsStagedForDeletion <Boolean?>]: The timeOff is marked for deletion, a process that is finalized when the schedule is shared.
  • [SharedTimeOff <IMicrosoftGraphTimeOffItem>]: timeOffItem
  • [TeamInfo <IMicrosoftGraphShiftsTeamInfo>]: shiftsTeamInfo
    • [(Any) <Object>]: This indicates any property can be added to this object.
    • [DisplayName <String>]: The display name for the team. Required.
    • [TeamId <String>]: ID of the team.
  • [UserId <String>]: ID of the user assigned to the timeOff. Required.
  • [UserInfo <IMicrosoftGraphShiftsUserInfo>]: shiftsUserInfo
    • [(Any) <Object>]: This indicates any property can be added to this object.
    • [DisplayName <String>]: The display name for the user. Required.
    • [UserId <String>]: ID of the user.

CREATEDBY <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. This property is read-only.
    • [Id <String>]: The identifier of the identity. This property is read-only.
  • [Device <IMicrosoftGraphIdentity>]: identity
  • [User <IMicrosoftGraphIdentity>]: identity

DRAFTTIMEOFF <IMicrosoftGraphTimeOffItem>: timeOffItem

  • [(Any) <Object>]: This indicates any property can be added to this object.
  • [EndDateTime <DateTime?>]:
  • [StartDateTime <DateTime?>]:
  • [Theme <String>]: scheduleEntityTheme
  • [TimeOffReasonId <String>]: ID of the timeOffReason for this timeOffItem. Required.

INPUTOBJECT <ITeamsIdentity>: Identity Parameter

  • [AssociatedTeamInfoId <String>]: The unique identifier of associatedTeamInfo
  • [ChannelId <String>]: The unique identifier of channel
  • [ChatId <String>]: The unique identifier of chat
  • [ChatMessageHostedContentId <String>]: The unique identifier of chatMessageHostedContent
  • [ChatMessageId <String>]: The unique identifier of chatMessage
  • [ChatMessageId1 <String>]: The unique identifier of chatMessage
  • [ConversationMemberId <String>]: The unique identifier of conversationMember
  • [DayNoteId <String>]: The unique identifier of dayNote
  • [DeletedChatId <String>]: The unique identifier of deletedChat
  • [DeletedTeamId <String>]: The unique identifier of deletedTeam
  • [GroupId <String>]: The unique identifier of group
  • [OfferShiftRequestId <String>]: The unique identifier of offerShiftRequest
  • [OpenShiftChangeRequestId <String>]: The unique identifier of openShiftChangeRequest
  • [OpenShiftId <String>]: The unique identifier of openShift
  • [PinnedChatMessageInfoId <String>]: The unique identifier of pinnedChatMessageInfo
  • [PlannerBucketId <String>]: The unique identifier of plannerBucket
  • [PlannerPlanId <String>]: The unique identifier of plannerPlan
  • [PlannerTaskId <String>]: The unique identifier of plannerTask
  • [ResourceSpecificPermissionGrantId <String>]: The unique identifier of resourceSpecificPermissionGrant
  • [SchedulingGroupId <String>]: The unique identifier of schedulingGroup
  • [SharedWithChannelTeamInfoId <String>]: The unique identifier of sharedWithChannelTeamInfo
  • [ShiftId <String>]: The unique identifier of shift
  • [ShiftsRoleDefinitionId <String>]: The unique identifier of shiftsRoleDefinition
  • [SwapShiftsChangeRequestId <String>]: The unique identifier of swapShiftsChangeRequest
  • [TeamId <String>]: The unique identifier of team
  • [TeamTemplateDefinitionId <String>]: The unique identifier of teamTemplateDefinition
  • [TeamTemplateId <String>]: The unique identifier of teamTemplate
  • [TeamsAppDashboardCardDefinitionId <String>]: The unique identifier of teamsAppDashboardCardDefinition
  • [TeamsAppDefinitionId <String>]: The unique identifier of teamsAppDefinition
  • [TeamsAppId <String>]: The unique identifier of teamsApp
  • [TeamsAppInstallationId <String>]: The unique identifier of teamsAppInstallation
  • [TeamsAsyncOperationId <String>]: The unique identifier of teamsAsyncOperation
  • [TeamsTabId <String>]: The unique identifier of teamsTab
  • [TeamworkDeviceId <String>]: The unique identifier of teamworkDevice
  • [TeamworkDeviceOperationId <String>]: The unique identifier of teamworkDeviceOperation
  • [TeamworkTagId <String>]: The unique identifier of teamworkTag
  • [TeamworkTagMemberId <String>]: The unique identifier of teamworkTagMember
  • [TimeCardId <String>]: The unique identifier of timeCard
  • [TimeOffId <String>]: The unique identifier of timeOff
  • [TimeOffReasonId <String>]: The unique identifier of timeOffReason
  • [TimeOffRequestId <String>]: The unique identifier of timeOffRequest
  • [UserId <String>]: The unique identifier of user
  • [UserPrincipalName <String>]: Alternate key of user
  • [UserScopeTeamsAppInstallationId <String>]: The unique identifier of userScopeTeamsAppInstallation
  • [WorkforceIntegrationId <String>]: The unique identifier of workforceIntegration

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. This property is read-only.
    • [Id <String>]: The identifier of the identity. This property is read-only.
  • [Device <IMicrosoftGraphIdentity>]: identity
  • [User <IMicrosoftGraphIdentity>]: identity

SHAREDTIMEOFF <IMicrosoftGraphTimeOffItem>: timeOffItem

  • [(Any) <Object>]: This indicates any property can be added to this object.
  • [EndDateTime <DateTime?>]:
  • [StartDateTime <DateTime?>]:
  • [Theme <String>]: scheduleEntityTheme
  • [TimeOffReasonId <String>]: ID of the timeOffReason for this timeOffItem. Required.

TEAMINFO <IMicrosoftGraphShiftsTeamInfo>: shiftsTeamInfo

  • [(Any) <Object>]: This indicates any property can be added to this object.
  • [DisplayName <String>]: The display name for the team. Required.
  • [TeamId <String>]: ID of the team.

USERINFO <IMicrosoftGraphShiftsUserInfo>: shiftsUserInfo

  • [(Any) <Object>]: This indicates any property can be added to this object.
  • [DisplayName <String>]: The display name for the user. Required.
  • [UserId <String>]: ID of the user.