Apply (set) a retention label on a driveItem (files and folders).
Retention labels don't need to be published in a retention label policy to be applied using this method.
When a retention label is applied to a folder, all the items in the folder are tagged with the same retention label.
For information about conflict resolution for retention labels, see Will an existing label be overridden or removed.
For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
Apply (set) a retention label on a driveItem (files and folders).
Retention labels don't need to be published in a retention label policy to be applied using this method.
When a retention label is applied to a folder, all the items in the folder are tagged with the same retention label.
For information about conflict resolution for retention labels, see Will an existing label be overridden or removed.
For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint.
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Parameter properties
Type:
Microsoft.Graph.PowerShell.Models.IFilesIdentity
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateViaIdentity
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-IsLabelAppliedExplicitly
Specifies whether the label is applied explicitly on the item.
True indicates that the label is applied explicitly; otherwise, the label is inherited from its parent.
Read-only.
Parameter properties
Type:
System.Management.Automation.SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-LabelAppliedBy
identitySet
To construct, see NOTES section for LABELAPPLIEDBY properties and create a hash table.
The date and time when the label was applied on the item.
The timestamp type represents date and time information using ISO 8601 format and is always in UTC.
For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
Read-only.
Parameter properties
Type:
System.DateTime
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Name
The retention label on the document.
Read-write.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Proxy
The URI for the proxy server to use
Parameter properties
Type:
System.Uri
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:
System.Management.Automation.PSCredential
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:
System.Management.Automation.SwitchParameter
Default value:
False
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
-ResponseHeadersVariable
Optional Response Headers Variable.
Parameter properties
Type:
System.String
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
-RetentionSettings
retentionLabelSettings
To construct, see NOTES section for RETENTIONSETTINGS properties and create a hash table.
Runs the command in a mode that only reports what would happen without performing the actions.
Parameter properties
Type:
System.Management.Automation.SwitchParameter
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.
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 <IMicrosoftGraphItemRetentionLabel>: itemRetentionLabel
[(Any) <Object>]: This indicates any property can be added to this object.
[Id <String>]: The unique identifier for an entity.
Read-only.
[IsLabelAppliedExplicitly <Boolean?>]: Specifies whether the label is applied explicitly on the item.
True indicates that the label is applied explicitly; otherwise, the label is inherited from its parent.
Read-only.
[LabelAppliedBy <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
[LabelAppliedDateTime <DateTime?>]: The date and time when the label was applied on the item.
The timestamp type represents date and time information using ISO 8601 format and is always in UTC.
For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
Read-only.
[Name <String>]: The retention label on the document.
Read-write.
[RetentionSettings <IMicrosoftGraphRetentionLabelSettings>]: retentionLabelSettings
[(Any) <Object>]: This indicates any property can be added to this object.
[BehaviorDuringRetentionPeriod <String>]: behaviorDuringRetentionPeriod
[IsContentUpdateAllowed <Boolean?>]: Specifies whether updates to document content are allowed.
Read-only.
[IsDeleteAllowed <Boolean?>]: Specifies whether the document deletion is allowed.
Read-only.
[IsLabelUpdateAllowed <Boolean?>]: Specifies whether you're allowed to change the retention label on the document.
Read-only.
[IsMetadataUpdateAllowed <Boolean?>]: Specifies whether updates to the item metadata (for example, the Title field) are blocked.
Read-only.
[IsRecordLocked <Boolean?>]: Specifies whether the item is locked.
Read-write.
INPUTOBJECT <IFilesIdentity>: Identity Parameter
[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
[DriveItemId <String>]: The unique identifier of driveItem
[DriveItemId1 <String>]: The unique identifier of driveItem
[DriveItemVersionId <String>]: The unique identifier of driveItemVersion
[EndDateTime <String>]: Usage: endDateTime='{endDateTime}'
[GroupId <String>]: The unique identifier of group
[Interval <String>]: Usage: interval='{interval}'
[ItemActivityStatId <String>]: The unique identifier of itemActivityStat
[ListItemId <String>]: The unique identifier of listItem
[ListItemVersionId <String>]: The unique identifier of listItemVersion
[PermissionId <String>]: The unique identifier of permission
[Q <String>]: Usage: q='{q}'
[RichLongRunningOperationId <String>]: The unique identifier of richLongRunningOperation
[SharedDriveItemId <String>]: The unique identifier of sharedDriveItem
[StartDateTime <String>]: Usage: startDateTime='{startDateTime}'
[SubscriptionId <String>]: The unique identifier of subscription
[ThumbnailSetId <String>]: The unique identifier of thumbnailSet
[Token <String>]: Usage: token='{token}'
[UserId <String>]: The unique identifier of user
LABELAPPLIEDBY <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
RETENTIONSETTINGS <IMicrosoftGraphRetentionLabelSettings>: retentionLabelSettings
[(Any) <Object>]: This indicates any property can be added to this object.
[BehaviorDuringRetentionPeriod <String>]: behaviorDuringRetentionPeriod
[IsContentUpdateAllowed <Boolean?>]: Specifies whether updates to document content are allowed.
Read-only.
[IsDeleteAllowed <Boolean?>]: Specifies whether the document deletion is allowed.
Read-only.
[IsLabelUpdateAllowed <Boolean?>]: Specifies whether you're allowed to change the retention label on the document.
Read-only.
[IsMetadataUpdateAllowed <Boolean?>]: Specifies whether updates to the item metadata (for example, the Title field) are blocked.
Read-only.
[IsRecordLocked <Boolean?>]: Specifies whether the item is locked.
Read-write.