Share via


New-MgSiteListItemDocumentSetVersion

Create a new version of a document set item in a list.

Note

To view the beta release of this cmdlet, view New-MgBetaSiteListItemDocumentSetVersion

Syntax

CreateExpanded (Default)

New-MgSiteListItemDocumentSetVersion
    -ListId <String>
    -ListItemId <String>
    -SiteId <String>
    [-ResponseHeadersVariable <String>]
    [-AdditionalProperties <Hashtable>]
    [-Comment <String>]
    [-CreatedBy <IMicrosoftGraphIdentitySet>]
    [-CreatedDateTime <DateTime>]
    [-Fields <Hashtable>]
    [-Id <String>]
    [-Items <IMicrosoftGraphDocumentSetVersionItem[]>]
    [-LastModifiedBy <IMicrosoftGraphIdentitySet>]
    [-LastModifiedDateTime <DateTime>]
    [-Publication <IMicrosoftGraphPublicationFacet>]
    [-ShouldCaptureMinorVersion]
    [-Headers <IDictionary>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Create

New-MgSiteListItemDocumentSetVersion
    -ListId <String>
    -ListItemId <String>
    -SiteId <String>
    -BodyParameter <IMicrosoftGraphDocumentSetVersion>
    [-ResponseHeadersVariable <String>]
    [-Headers <IDictionary>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaIdentityExpanded

New-MgSiteListItemDocumentSetVersion
    -InputObject <ISitesIdentity>
    [-ResponseHeadersVariable <String>]
    [-AdditionalProperties <Hashtable>]
    [-Comment <String>]
    [-CreatedBy <IMicrosoftGraphIdentitySet>]
    [-CreatedDateTime <DateTime>]
    [-Fields <Hashtable>]
    [-Id <String>]
    [-Items <IMicrosoftGraphDocumentSetVersionItem[]>]
    [-LastModifiedBy <IMicrosoftGraphIdentitySet>]
    [-LastModifiedDateTime <DateTime>]
    [-Publication <IMicrosoftGraphPublicationFacet>]
    [-ShouldCaptureMinorVersion]
    [-Headers <IDictionary>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CreateViaIdentity

New-MgSiteListItemDocumentSetVersion
    -InputObject <ISitesIdentity>
    -BodyParameter <IMicrosoftGraphDocumentSetVersion>
    [-ResponseHeadersVariable <String>]
    [-Headers <IDictionary>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Create a new version of a document set item in a list.

Permissions

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

Examples

Example 1: Code snippet


Import-Module Microsoft.Graph.Sites

$params = @{
	comment = "v1"
	shouldCaptureMinorVersion = $false
}

New-MgSiteListItemDocumentSetVersion -SiteId $siteId -ListId $listId -ListItemId $listItemId -BodyParameter $params

This example shows how to use the New-MgSiteListItemDocumentSetVersion 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

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

Parameter properties

Type:IMicrosoftGraphDocumentSetVersion
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

-Comment

Comment about the captured version.

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

-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

-CreatedDateTime

Date and time when this version was created.

Parameter properties

Type:DateTime
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

-Fields

fieldValueSet

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

-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:ISitesIdentity
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

-Items

Items within the document set that are captured as part of this version. To construct, see NOTES section for ITEMS properties and create a hash table.

Parameter properties

Type:

IMicrosoftGraphDocumentSetVersionItem[]

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

-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

-LastModifiedDateTime

Date and time the version was last modified. Read-only.

Parameter properties

Type:DateTime
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

-ListId

The unique identifier of list

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

-ListItemId

The unique identifier of listItem

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

-Publication

publicationFacet To construct, see NOTES section for PUBLICATION properties and create a hash table.

Parameter properties

Type:IMicrosoftGraphPublicationFacet
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

-ShouldCaptureMinorVersion

If true, minor versions of items are also captured; otherwise, only major versions are captured. The default value is false.

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

-SiteId

The unique identifier of site

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

-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.PowerShell.Models.IMicrosoftGraphDocumentSetVersion

Microsoft.Graph.PowerShell.Models.ISitesIdentity

System.Collections.IDictionary

Outputs

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDocumentSetVersion

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 <IMicrosoftGraphDocumentSetVersion>: documentSetVersion

  • [(Any) <Object>]: This indicates any property can be added to this object.
  • [Fields <IMicrosoftGraphFieldValueSet>]: fieldValueSet
    • [(Any) <Object>]: This indicates any property can be added to this object.
    • [Id <String>]: The unique identifier for an entity. Read-only.
  • [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
  • [LastModifiedDateTime <DateTime?>]: Date and time the version was last modified. Read-only.
  • [Publication <IMicrosoftGraphPublicationFacet>]: publicationFacet
    • [(Any) <Object>]: This indicates any property can be added to this object.
    • [CheckedOutBy <IMicrosoftGraphIdentitySet>]: identitySet
    • [Level <String>]: The state of publication for this document. Either published or checkout. Read-only.
    • [VersionId <String>]: The unique identifier for the version that is visible to the current caller. Read-only.
  • [Id <String>]: The unique identifier for an entity. Read-only.
  • [Comment <String>]: Comment about the captured version.
  • [CreatedBy <IMicrosoftGraphIdentitySet>]: identitySet
  • [CreatedDateTime <DateTime?>]: Date and time when this version was created.
  • [Items <IMicrosoftGraphDocumentSetVersionItem- []>]: Items within the document set that are captured as part of this version.
    • [ItemId <String>]: The unique identifier for the item.
    • [Title <String>]: The title of the item.
    • [VersionId <String>]: The version ID of the item.
  • [ShouldCaptureMinorVersion <Boolean?>]: If true, minor versions of items are also captured; otherwise, only major versions are captured. The default value is false.

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.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

INPUTOBJECT <ISitesIdentity>: Identity Parameter

  • [BaseItemId <String>]: The unique identifier of baseItem
  • [BaseSitePageId <String>]: The unique identifier of baseSitePage
  • [ColumnDefinitionId <String>]: The unique identifier of columnDefinition
  • [ColumnLinkId <String>]: The unique identifier of columnLink
  • [ContentTypeId <String>]: The unique identifier of contentType
  • [ContentTypeId1 <String>]: The unique identifier of contentType
  • [DocumentSetVersionId <String>]: The unique identifier of documentSetVersion
  • [DriveId <String>]: The unique identifier of drive
  • [EndDateTime <String>]: Usage: endDateTime='{endDateTime}'
  • [GroupId <String>]: The unique identifier of group
  • [GroupId1 <String>]: The unique identifier of group
  • [HorizontalSectionColumnId <String>]: The unique identifier of horizontalSectionColumn
  • [HorizontalSectionId <String>]: The unique identifier of horizontalSection
  • [IncludePersonalNotebooks <Boolean?>]: Usage: includePersonalNotebooks={includePersonalNotebooks}
  • [Interval <String>]: Usage: interval='{interval}'
  • [ItemActivityId <String>]: The unique identifier of itemActivity
  • [ItemActivityStatId <String>]: The unique identifier of itemActivityStat
  • [ListId <String>]: The unique identifier of list
  • [ListItemId <String>]: The unique identifier of listItem
  • [ListItemVersionId <String>]: The unique identifier of listItemVersion
  • [NotebookId <String>]: The unique identifier of notebook
  • [OnenoteOperationId <String>]: The unique identifier of onenoteOperation
  • [OnenotePageId <String>]: The unique identifier of onenotePage
  • [OnenoteResourceId <String>]: The unique identifier of onenoteResource
  • [OnenoteSectionId <String>]: The unique identifier of onenoteSection
  • [Path <String>]: Usage: path='{path}'
  • [PermissionId <String>]: The unique identifier of permission
  • [RelationId <String>]: The unique identifier of relation
  • [RichLongRunningOperationId <String>]: The unique identifier of richLongRunningOperation
  • [SectionGroupId <String>]: The unique identifier of sectionGroup
  • [SectionGroupId1 <String>]: The unique identifier of sectionGroup
  • [SetId <String>]: The unique identifier of set
  • [SetId1 <String>]: The unique identifier of set
  • [SiteId <String>]: The unique identifier of site
  • [SiteId1 <String>]: The unique identifier of site
  • [StartDateTime <String>]: Usage: startDateTime='{startDateTime}'
  • [StoreId <String>]: The unique identifier of store
  • [SubscriptionId <String>]: The unique identifier of subscription
  • [TermId <String>]: The unique identifier of term
  • [TermId1 <String>]: The unique identifier of term
  • [Token <String>]: Usage: token='{token}'
  • [UserId <String>]: The unique identifier of user
  • [WebPartId <String>]: The unique identifier of webPart

ITEMS <IMicrosoftGraphDocumentSetVersionItem- []>: Items within the document set that are captured as part of this version.

  • [ItemId <String>]: The unique identifier for the item.
  • [Title <String>]: The title of the item.
  • [VersionId <String>]: The version ID of the item.

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

PUBLICATION <IMicrosoftGraphPublicationFacet>: publicationFacet

  • [(Any) <Object>]: This indicates any property can be added to this object.
  • [CheckedOutBy <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
  • [Level <String>]: The state of publication for this document. Either published or checkout. Read-only.
  • [VersionId <String>]: The unique identifier for the version that is visible to the current caller. Read-only.