Share via


Update-MgBetaSolutionBackupRestoreSharePointProtectionPolicy

Update a SharePoint protection policy. This method adds a siteprotectionunit to or removes it from the protection policy.

Note

To view the v1.0 release of this cmdlet, view Update-MgSolutionBackupRestoreSharePointProtectionPolicy

Syntax

Update-MgBetaSolutionBackupRestoreSharePointProtectionPolicy
      -SharePointProtectionPolicyId <String>
      [-ResponseHeadersVariable <String>]
      [-AdditionalProperties <Hashtable>]
      [-CreatedBy <IMicrosoftGraphIdentitySet>]
      [-CreatedDateTime <DateTime>]
      [-DisplayName <String>]
      [-Id <String>]
      [-LastModifiedBy <IMicrosoftGraphIdentitySet>]
      [-LastModifiedDateTime <DateTime>]
      [-RetentionSettings <IMicrosoftGraphRetentionSetting[]>]
      [-SiteInclusionRules <IMicrosoftGraphSiteProtectionRule[]>]
      [-SiteProtectionUnits <IMicrosoftGraphSiteProtectionUnit[]>]
      [-SiteProtectionUnitsBulkAdditionJobs <IMicrosoftGraphSiteProtectionUnitsBulkAdditionJob[]>]
      [-Status <String>]
      [-Headers <IDictionary>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-MgBetaSolutionBackupRestoreSharePointProtectionPolicy
      -SharePointProtectionPolicyId <String>
      -BodyParameter <IMicrosoftGraphSharePointProtectionPolicy>
      [-ResponseHeadersVariable <String>]
      [-Headers <IDictionary>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-MgBetaSolutionBackupRestoreSharePointProtectionPolicy
      -InputObject <IBackupRestoreIdentity>
      [-ResponseHeadersVariable <String>]
      [-AdditionalProperties <Hashtable>]
      [-CreatedBy <IMicrosoftGraphIdentitySet>]
      [-CreatedDateTime <DateTime>]
      [-DisplayName <String>]
      [-Id <String>]
      [-LastModifiedBy <IMicrosoftGraphIdentitySet>]
      [-LastModifiedDateTime <DateTime>]
      [-RetentionSettings <IMicrosoftGraphRetentionSetting[]>]
      [-SiteInclusionRules <IMicrosoftGraphSiteProtectionRule[]>]
      [-SiteProtectionUnits <IMicrosoftGraphSiteProtectionUnit[]>]
      [-SiteProtectionUnitsBulkAdditionJobs <IMicrosoftGraphSiteProtectionUnitsBulkAdditionJob[]>]
      [-Status <String>]
      [-Headers <IDictionary>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-MgBetaSolutionBackupRestoreSharePointProtectionPolicy
      -InputObject <IBackupRestoreIdentity>
      -BodyParameter <IMicrosoftGraphSharePointProtectionPolicy>
      [-ResponseHeadersVariable <String>]
      [-Headers <IDictionary>]
      [-ProgressAction <ActionPreference>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Update a SharePoint protection policy. This method adds a siteprotectionunit to or removes it from the protection policy.

Parameters

-AdditionalProperties

Additional Parameters

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

-BodyParameter

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

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

-CreatedBy

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

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

-CreatedDateTime

The time of creation of the policy.

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

-DisplayName

The name of the policy to be created.

Type:String
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:IBackupRestoreIdentity
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

-LastModifiedDateTime

The timestamp of the last modification of the policy.

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

-RetentionSettings

Contains the retention setting details for the policy. To construct, see NOTES section for RETENTIONSETTINGS properties and create a hash table.

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

-SharePointProtectionPolicyId

The unique identifier of sharePointProtectionPolicy

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

-SiteInclusionRules

The rules associated with the SharePoint Protection policy. To construct, see NOTES section for SITEINCLUSIONRULES properties and create a hash table.

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

-SiteProtectionUnits

The protection units (sites) that are protected under the site protection policy. To construct, see NOTES section for SITEPROTECTIONUNITS properties and create a hash table.

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

-SiteProtectionUnitsBulkAdditionJobs

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

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

-Status

protectionPolicyStatus

Type:String
Position:Named
Default value:None
Required:False
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.Beta.PowerShell.Models.IBackupRestoreIdentity

Microsoft.Graph.Beta.PowerShell.Models.IMicrosoftGraphSharePointProtectionPolicy

System.Collections.IDictionary

Outputs

Microsoft.Graph.Beta.PowerShell.Models.IMicrosoftGraphSharePointProtectionPolicy

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 <IMicrosoftGraphSharePointProtectionPolicy>: sharePointProtectionPolicy

  • [(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
  • [CreatedDateTime <DateTime?>]: The time of creation of the policy.
  • [DisplayName <String>]: The name of the policy to be created.
  • [LastModifiedBy <IMicrosoftGraphIdentitySet>]: identitySet
  • [LastModifiedDateTime <DateTime?>]: The timestamp of the last modification of the policy.
  • [RetentionSettings <IMicrosoftGraphRetentionSetting- []>]: Contains the retention setting details for the policy.
    • [Interval <String>]: The frequency of the backup.
    • [Period <TimeSpan?>]: The period of time to retain the protected data for a single Microsoft 365 service.
  • [Status <String>]: protectionPolicyStatus
  • [Id <String>]: The unique identifier for an entity. Read-only.
  • [SiteInclusionRules <IMicrosoftGraphSiteProtectionRule- []>]: The rules associated with the SharePoint Protection policy.
    • [CreatedBy <IMicrosoftGraphIdentitySet>]: identitySet
    • [CreatedDateTime <DateTime?>]: The time of creation of the rule.
    • [Error <IMicrosoftGraphPublicError>]: publicError
      • [(Any) <Object>]: This indicates any property can be added to this object.
      • [Code <String>]: Represents the error code.
      • [Details <IMicrosoftGraphPublicErrorDetail- []>]: Details of the error.
        • [Code <String>]: The error code.
        • [Message <String>]: The error message.
        • [Target <String>]: The target of the error.
      • [InnerError <IMicrosoftGraphPublicInnerError>]: publicInnerError
        • [(Any) <Object>]: This indicates any property can be added to this object.
        • [Code <String>]: The error code.
        • [Details <IMicrosoftGraphPublicErrorDetail- []>]: A collection of error details.
        • [Message <String>]: The error message.
        • [Target <String>]: The target of the error.
      • [Message <String>]: A non-localized message for the developer.
      • [Target <String>]: The target of the error.
    • [IsAutoApplyEnabled <Boolean?>]: true indicates that the protection rule is dynamic; false that it's static.
    • [LastModifiedBy <IMicrosoftGraphIdentitySet>]: identitySet
    • [LastModifiedDateTime <DateTime?>]: Timestamp of the last modification made to the rule.
    • [Status <String>]: protectionRuleStatus
    • [Id <String>]: The unique identifier for an entity. Read-only.
    • [SiteExpression <String>]: Contains a site expression. For examples, see siteExpression example.
  • [SiteProtectionUnits <IMicrosoftGraphSiteProtectionUnit- []>]: The protection units (sites) that are protected under the site protection policy.
    • [CreatedBy <IMicrosoftGraphIdentitySet>]: identitySet
    • [CreatedDateTime <DateTime?>]: The time of creation of the protection unit.
    • [Error <IMicrosoftGraphPublicError>]: publicError
    • [LastModifiedBy <IMicrosoftGraphIdentitySet>]: identitySet
    • [LastModifiedDateTime <DateTime?>]: Timestamp of the last modification of this protection unit.
    • [PolicyId <String>]: The unique identifier of the protection policy based on which protection unit was created.
    • [ProtectionSources <String>]: protectionSource
    • [Status <String>]: protectionUnitStatus
    • [Id <String>]: The unique identifier for an entity. Read-only.
    • [SiteId <String>]: Unique identifier of the SharePoint site.
  • [SiteProtectionUnitsBulkAdditionJobs <IMicrosoftGraphSiteProtectionUnitsBulkAdditionJob- []>]:
    • [CreatedBy <IMicrosoftGraphIdentitySet>]: identitySet
    • [CreatedDateTime <DateTime?>]: The time of creation of the job.
    • [DisplayName <String>]: The name of the protection units bulk addition job.
    • [Error <IMicrosoftGraphPublicError>]: publicError
    • [LastModifiedBy <IMicrosoftGraphIdentitySet>]: identitySet
    • [LastModifiedDateTime <DateTime?>]: Timestamp of the last modification made to the job.
    • [Status <String>]: protectionUnitsBulkJobStatus
    • [Id <String>]: The unique identifier for an entity. Read-only.
    • [SiteIds <String- []>]: The list of SharePoint site IDs to add to the SharePoint protection policy.
    • [SiteWebUrls <String- []>]: The list of SharePoint site URLs to add to the SharePoint protection policy.

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

INPUTOBJECT <IBackupRestoreIdentity>: Identity Parameter

  • [DriveProtectionRuleId <String>]: The unique identifier of driveProtectionRule
  • [DriveProtectionUnitId <String>]: The unique identifier of driveProtectionUnit
  • [DriveProtectionUnitsBulkAdditionJobId <String>]: The unique identifier of driveProtectionUnitsBulkAdditionJob
  • [DriveRestoreArtifactId <String>]: The unique identifier of driveRestoreArtifact
  • [DriveRestoreArtifactsBulkAdditionRequestId <String>]: The unique identifier of driveRestoreArtifactsBulkAdditionRequest
  • [ExchangeProtectionPolicyId <String>]: The unique identifier of exchangeProtectionPolicy
  • [ExchangeRestoreSessionId <String>]: The unique identifier of exchangeRestoreSession
  • [GranularMailboxRestoreArtifactId <String>]: The unique identifier of granularMailboxRestoreArtifact
  • [MailboxProtectionRuleId <String>]: The unique identifier of mailboxProtectionRule
  • [MailboxProtectionUnitId <String>]: The unique identifier of mailboxProtectionUnit
  • [MailboxProtectionUnitsBulkAdditionJobId <String>]: The unique identifier of mailboxProtectionUnitsBulkAdditionJob
  • [MailboxRestoreArtifactId <String>]: The unique identifier of mailboxRestoreArtifact
  • [MailboxRestoreArtifactsBulkAdditionRequestId <String>]: The unique identifier of mailboxRestoreArtifactsBulkAdditionRequest
  • [OneDriveForBusinessProtectionPolicyId <String>]: The unique identifier of oneDriveForBusinessProtectionPolicy
  • [OneDriveForBusinessRestoreSessionId <String>]: The unique identifier of oneDriveForBusinessRestoreSession
  • [ProtectionPolicyBaseId <String>]: The unique identifier of protectionPolicyBase
  • [ProtectionUnitBaseId <String>]: The unique identifier of protectionUnitBase
  • [RestorePointId <String>]: The unique identifier of restorePoint
  • [RestoreSessionBaseId <String>]: The unique identifier of restoreSessionBase
  • [ServiceAppId <String>]: The unique identifier of serviceApp
  • [SharePointProtectionPolicyId <String>]: The unique identifier of sharePointProtectionPolicy
  • [SharePointRestoreSessionId <String>]: The unique identifier of sharePointRestoreSession
  • [SiteProtectionRuleId <String>]: The unique identifier of siteProtectionRule
  • [SiteProtectionUnitId <String>]: The unique identifier of siteProtectionUnit
  • [SiteProtectionUnitsBulkAdditionJobId <String>]: The unique identifier of siteProtectionUnitsBulkAdditionJob
  • [SiteRestoreArtifactId <String>]: The unique identifier of siteRestoreArtifact
  • [SiteRestoreArtifactsBulkAdditionRequestId <String>]: The unique identifier of siteRestoreArtifactsBulkAdditionRequest

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

RETENTIONSETTINGS <IMicrosoftGraphRetentionSetting- []>: Contains the retention setting details for the policy.

  • [Interval <String>]: The frequency of the backup.
  • [Period <TimeSpan?>]: The period of time to retain the protected data for a single Microsoft 365 service.

SITEINCLUSIONRULES <IMicrosoftGraphSiteProtectionRule- []>: The rules associated with the SharePoint Protection policy.

  • [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
  • [CreatedDateTime <DateTime?>]: The time of creation of the rule.
  • [Error <IMicrosoftGraphPublicError>]: publicError
    • [(Any) <Object>]: This indicates any property can be added to this object.
    • [Code <String>]: Represents the error code.
    • [Details <IMicrosoftGraphPublicErrorDetail- []>]: Details of the error.
      • [Code <String>]: The error code.
      • [Message <String>]: The error message.
      • [Target <String>]: The target of the error.
    • [InnerError <IMicrosoftGraphPublicInnerError>]: publicInnerError
      • [(Any) <Object>]: This indicates any property can be added to this object.
      • [Code <String>]: The error code.
      • [Details <IMicrosoftGraphPublicErrorDetail- []>]: A collection of error details.
      • [Message <String>]: The error message.
      • [Target <String>]: The target of the error.
    • [Message <String>]: A non-localized message for the developer.
    • [Target <String>]: The target of the error.
  • [IsAutoApplyEnabled <Boolean?>]: true indicates that the protection rule is dynamic; false that it's static.
  • [LastModifiedBy <IMicrosoftGraphIdentitySet>]: identitySet
  • [LastModifiedDateTime <DateTime?>]: Timestamp of the last modification made to the rule.
  • [Status <String>]: protectionRuleStatus
  • [Id <String>]: The unique identifier for an entity. Read-only.
  • [SiteExpression <String>]: Contains a site expression. For examples, see siteExpression example.

SITEPROTECTIONUNITS <IMicrosoftGraphSiteProtectionUnit- []>: The protection units (sites) that are protected under the site protection policy.

  • [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
  • [CreatedDateTime <DateTime?>]: The time of creation of the protection unit.
  • [Error <IMicrosoftGraphPublicError>]: publicError
    • [(Any) <Object>]: This indicates any property can be added to this object.
    • [Code <String>]: Represents the error code.
    • [Details <IMicrosoftGraphPublicErrorDetail- []>]: Details of the error.
      • [Code <String>]: The error code.
      • [Message <String>]: The error message.
      • [Target <String>]: The target of the error.
    • [InnerError <IMicrosoftGraphPublicInnerError>]: publicInnerError
      • [(Any) <Object>]: This indicates any property can be added to this object.
      • [Code <String>]: The error code.
      • [Details <IMicrosoftGraphPublicErrorDetail- []>]: A collection of error details.
      • [Message <String>]: The error message.
      • [Target <String>]: The target of the error.
    • [Message <String>]: A non-localized message for the developer.
    • [Target <String>]: The target of the error.
  • [LastModifiedBy <IMicrosoftGraphIdentitySet>]: identitySet
  • [LastModifiedDateTime <DateTime?>]: Timestamp of the last modification of this protection unit.
  • [PolicyId <String>]: The unique identifier of the protection policy based on which protection unit was created.
  • [ProtectionSources <String>]: protectionSource
  • [Status <String>]: protectionUnitStatus
  • [Id <String>]: The unique identifier for an entity. Read-only.
  • [SiteId <String>]: Unique identifier of the SharePoint site.

SITEPROTECTIONUNITSBULKADDITIONJOBS <IMicrosoftGraphSiteProtectionUnitsBulkAdditionJob- []>: .

  • [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
  • [CreatedDateTime <DateTime?>]: The time of creation of the job.
  • [DisplayName <String>]: The name of the protection units bulk addition job.
  • [Error <IMicrosoftGraphPublicError>]: publicError
    • [(Any) <Object>]: This indicates any property can be added to this object.
    • [Code <String>]: Represents the error code.
    • [Details <IMicrosoftGraphPublicErrorDetail- []>]: Details of the error.
      • [Code <String>]: The error code.
      • [Message <String>]: The error message.
      • [Target <String>]: The target of the error.
    • [InnerError <IMicrosoftGraphPublicInnerError>]: publicInnerError
      • [(Any) <Object>]: This indicates any property can be added to this object.
      • [Code <String>]: The error code.
      • [Details <IMicrosoftGraphPublicErrorDetail- []>]: A collection of error details.
      • [Message <String>]: The error message.
      • [Target <String>]: The target of the error.
    • [Message <String>]: A non-localized message for the developer.
    • [Target <String>]: The target of the error.
  • [LastModifiedBy <IMicrosoftGraphIdentitySet>]: identitySet
  • [LastModifiedDateTime <DateTime?>]: Timestamp of the last modification made to the job.
  • [Status <String>]: protectionUnitsBulkJobStatus
  • [Id <String>]: The unique identifier for an entity. Read-only.
  • [SiteIds <String- []>]: The list of SharePoint site IDs to add to the SharePoint protection policy.
  • [SiteWebUrls <String- []>]: The list of SharePoint site URLs to add to the SharePoint protection policy.

https://learn.microsoft.com/powershell/module/microsoft.graph.beta.backuprestore/update-mgbetasolutionbackuprestoresharepointprotectionpolicy

https://learn.microsoft.com/graph/api/sharepointprotectionpolicy-update?view=graph-rest-beta