Share via


Update-MgAdminSharepointSetting

Update one or more tenant-level settings for SharePoint and OneDrive.

Note

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

Syntax

UpdateExpanded (Default)

Update-MgAdminSharepointSetting
    [-ResponseHeadersVariable <string>]
    [-AdditionalProperties <hashtable>]
    [-AllowedDomainGuidsForSyncApp <string[]>]
    [-AvailableManagedPathsForSiteCreation <string[]>]
    [-DeletedUserPersonalSiteRetentionPeriodInDays <int>]
    [-ExcludedFileExtensionsForSyncApp <string[]>]
    [-Id <string>]
    [-IdleSessionSignOut <IMicrosoftGraphIdleSessionSignOut>]
    [-ImageTaggingOption <string>]
    [-IsCommentingOnSitePagesEnabled]
    [-IsFileActivityNotificationEnabled]
    [-IsLegacyAuthProtocolsEnabled]
    [-IsLoopEnabled]
    [-IsMacSyncAppEnabled]
    [-IsRequireAcceptingUserToMatchInvitedUserEnabled]
    [-IsResharingByExternalUsersEnabled]
    [-IsSharePointMobileNotificationEnabled]
    [-IsSharePointNewsfeedEnabled]
    [-IsSiteCreationEnabled]
    [-IsSiteCreationUiEnabled]
    [-IsSitePagesCreationEnabled]
    [-IsSitesStorageLimitAutomatic]
    [-IsSyncButtonHiddenOnPersonalSite]
    [-IsUnmanagedSyncAppForTenantRestricted]
    [-PersonalSiteDefaultStorageLimitInMb <long>]
    [-SharingAllowedDomainList <string[]>]
    [-SharingBlockedDomainList <string[]>]
    [-SharingCapability <string>]
    [-SharingDomainRestrictionMode <string>]
    [-SiteCreationDefaultManagedPath <string>]
    [-SiteCreationDefaultStorageLimitInMb <int>]
    [-TenantDefaultTimezone <string>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Update

Update-MgAdminSharepointSetting
    -BodyParameter <IMicrosoftGraphSharepointSettings>
    [-ResponseHeadersVariable <string>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Update one or more tenant-level settings for SharePoint and OneDrive.

Permissions

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

Examples

Example 1: Code snippet


Import-Module Microsoft.Graph.Sites

$params = @{
	deletedUserPersonalSiteRetentionPeriodInDays = 365
	excludedFileExtensionsForSyncApp = @(
	".mp3"
)
imageTaggingOption = "enhanced"
isLegacyAuthProtocolsEnabled = $true
isSitesStorageLimitAutomatic = $false
isSyncButtonHiddenOnPersonalSite = $false
isUnmanagedSyncAppForTenantRestricted = $false
personalSiteDefaultStorageLimitInMB = 120000
}

Update-MgAdminSharepointSetting -BodyParameter $params

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

Parameters

-AdditionalProperties

Additional Parameters

Parameter properties

Type:System.Collections.Hashtable
Supports wildcards:False
DontShow:False

Parameter sets

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

-AllowedDomainGuidsForSyncApp

Collection of trusted domain GUIDs for the OneDrive sync app.

Parameter properties

Type:

System.String[]

Supports wildcards:False
DontShow:False

Parameter sets

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

-AvailableManagedPathsForSiteCreation

Collection of managed paths available for site creation. Read-only.

Parameter properties

Type:

System.String[]

Supports wildcards:False
DontShow:False

Parameter sets

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

-BodyParameter

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

Parameter properties

Type:Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSharepointSettings
Supports wildcards:False
DontShow:False

Parameter sets

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

-Break

Wait for .NET debugger to attach

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:System.Management.Automation.SwitchParameter
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

-DeletedUserPersonalSiteRetentionPeriodInDays

The number of days for preserving a deleted user's OneDrive.

Parameter properties

Type:System.Int32
Default value:0
Supports wildcards:False
DontShow:False

Parameter sets

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

-ExcludedFileExtensionsForSyncApp

Collection of file extensions not uploaded by the OneDrive sync app.

Parameter properties

Type:

System.String[]

Supports wildcards:False
DontShow:False

Parameter sets

UpdateExpanded
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:System.Collections.IDictionary
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

-HttpPipelineAppend

SendAsync Pipeline Steps to be appended to the front of the pipeline

Parameter properties

Type:

Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]

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

-HttpPipelinePrepend

SendAsync Pipeline Steps to be prepended to the front of the pipeline

Parameter properties

Type:

Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]

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

-Id

The unique identifier for an entity. Read-only.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

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

-IdleSessionSignOut

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

Parameter properties

Type:Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIdleSessionSignOut
Supports wildcards:False
DontShow:False

Parameter sets

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

-ImageTaggingOption

imageTaggingChoice

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsCommentingOnSitePagesEnabled

Indicates whether comments are allowed on modern site pages in SharePoint.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsFileActivityNotificationEnabled

Indicates whether push notifications are enabled for OneDrive events.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsLegacyAuthProtocolsEnabled

Indicates whether legacy authentication protocols are enabled for the tenant.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsLoopEnabled

Indicates whether if Fluid Framework is allowed on SharePoint sites.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsMacSyncAppEnabled

Indicates whether files can be synced using the OneDrive sync app for Mac.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsRequireAcceptingUserToMatchInvitedUserEnabled

Indicates whether guests must sign in using the same account to which sharing invitations are sent.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsResharingByExternalUsersEnabled

Indicates whether guests are allowed to reshare files, folders, and sites they don't own.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsSharePointMobileNotificationEnabled

Indicates whether mobile push notifications are enabled for SharePoint.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsSharePointNewsfeedEnabled

Indicates whether the newsfeed is allowed on the modern site pages in SharePoint.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsSiteCreationEnabled

Indicates whether users are allowed to create sites.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsSiteCreationUiEnabled

Indicates whether the UI commands for creating sites are shown.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsSitePagesCreationEnabled

Indicates whether creating new modern pages is allowed on SharePoint sites.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsSitesStorageLimitAutomatic

Indicates whether site storage space is automatically managed or if specific storage limits are set per site.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsSyncButtonHiddenOnPersonalSite

Indicates whether the sync button in OneDrive is hidden.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-IsUnmanagedSyncAppForTenantRestricted

Indicates whether users are allowed to sync files only on PCs joined to specific domains.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

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

-PersonalSiteDefaultStorageLimitInMb

The default OneDrive storage limit for all new and existing users who are assigned a qualifying license. Measured in megabytes (MB).

Parameter properties

Type:System.Int64
Default value:0
Supports wildcards:False
DontShow:False

Parameter sets

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

-SharingAllowedDomainList

Collection of email domains that are allowed for sharing outside the organization.

Parameter properties

Type:

System.String[]

Supports wildcards:False
DontShow:False

Parameter sets

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

-SharingBlockedDomainList

Collection of email domains that are blocked for sharing outside the organization.

Parameter properties

Type:

System.String[]

Supports wildcards:False
DontShow:False

Parameter sets

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

-SharingCapability

sharingCapabilities

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

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

-SharingDomainRestrictionMode

sharingDomainRestrictionMode

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

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

-SiteCreationDefaultManagedPath

The value of the team site managed path. This is the path under which new team sites will be created.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

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

-SiteCreationDefaultStorageLimitInMb

The default storage quota for a new site upon creation. Measured in megabytes (MB).

Parameter properties

Type:System.Int32
Default value:0
Supports wildcards:False
DontShow:False

Parameter sets

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

-TenantDefaultTimezone

The default timezone of a tenant for newly created sites. For a list of possible values, see SPRegionalSettings.TimeZones property.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

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

-WhatIf

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.

Inputs

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSharepointSettings

{{ Fill in the Description }}

System.Collections.IDictionary

{{ Fill in the Description }}

Outputs

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSharepointSettings

{{ Fill in the Description }}

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 <IMicrosoftGraphSharepointSettings>: sharepointSettings [(Any) <Object>]: This indicates any property can be added to this object. [Id <String>]: The unique identifier for an entity. Read-only. [AllowedDomainGuidsForSyncApp <String[]>]: Collection of trusted domain GUIDs for the OneDrive sync app. [AvailableManagedPathsForSiteCreation <String[]>]: Collection of managed paths available for site creation. Read-only. [DeletedUserPersonalSiteRetentionPeriodInDays <Int32?>]: The number of days for preserving a deleted user's OneDrive. [ExcludedFileExtensionsForSyncApp <String[]>]: Collection of file extensions not uploaded by the OneDrive sync app. [IdleSessionSignOut <IMicrosoftGraphIdleSessionSignOut>]: idleSessionSignOut [(Any) <Object>]: This indicates any property can be added to this object. [IsEnabled <Boolean?>]: Indicates whether the idle session sign-out policy is enabled. [SignOutAfterInSeconds <Int64?>]: Number of seconds of inactivity after which a user is signed out. [WarnAfterInSeconds <Int64?>]: Number of seconds of inactivity after which a user is notified that they'll be signed out. [ImageTaggingOption <String>]: imageTaggingChoice [IsCommentingOnSitePagesEnabled <Boolean?>]: Indicates whether comments are allowed on modern site pages in SharePoint. [IsFileActivityNotificationEnabled <Boolean?>]: Indicates whether push notifications are enabled for OneDrive events. [IsLegacyAuthProtocolsEnabled <Boolean?>]: Indicates whether legacy authentication protocols are enabled for the tenant. [IsLoopEnabled <Boolean?>]: Indicates whether if Fluid Framework is allowed on SharePoint sites. [IsMacSyncAppEnabled <Boolean?>]: Indicates whether files can be synced using the OneDrive sync app for Mac. [IsRequireAcceptingUserToMatchInvitedUserEnabled <Boolean?>]: Indicates whether guests must sign in using the same account to which sharing invitations are sent. [IsResharingByExternalUsersEnabled <Boolean?>]: Indicates whether guests are allowed to reshare files, folders, and sites they don't own. [IsSharePointMobileNotificationEnabled <Boolean?>]: Indicates whether mobile push notifications are enabled for SharePoint. [IsSharePointNewsfeedEnabled <Boolean?>]: Indicates whether the newsfeed is allowed on the modern site pages in SharePoint. [IsSiteCreationEnabled <Boolean?>]: Indicates whether users are allowed to create sites. [IsSiteCreationUiEnabled <Boolean?>]: Indicates whether the UI commands for creating sites are shown. [IsSitePagesCreationEnabled <Boolean?>]: Indicates whether creating new modern pages is allowed on SharePoint sites. [IsSitesStorageLimitAutomatic <Boolean?>]: Indicates whether site storage space is automatically managed or if specific storage limits are set per site. [IsSyncButtonHiddenOnPersonalSite <Boolean?>]: Indicates whether the sync button in OneDrive is hidden. [IsUnmanagedSyncAppForTenantRestricted <Boolean?>]: Indicates whether users are allowed to sync files only on PCs joined to specific domains. [PersonalSiteDefaultStorageLimitInMb <Int64?>]: The default OneDrive storage limit for all new and existing users who are assigned a qualifying license. Measured in megabytes (MB). [SharingAllowedDomainList <String[]>]: Collection of email domains that are allowed for sharing outside the organization. [SharingBlockedDomainList <String[]>]: Collection of email domains that are blocked for sharing outside the organization. [SharingCapability <String>]: sharingCapabilities [SharingDomainRestrictionMode <String>]: sharingDomainRestrictionMode [SiteCreationDefaultManagedPath <String>]: The value of the team site managed path. This is the path under which new team sites will be created. [SiteCreationDefaultStorageLimitInMb <Int32?>]: The default storage quota for a new site upon creation. Measured in megabytes (MB). [TenantDefaultTimezone <String>]: The default timezone of a tenant for newly created sites. For a list of possible values, see SPRegionalSettings.TimeZones property.

IDLESESSIONSIGNOUT <IMicrosoftGraphIdleSessionSignOut>: idleSessionSignOut [(Any) <Object>]: This indicates any property can be added to this object. [IsEnabled <Boolean?>]: Indicates whether the idle session sign-out policy is enabled. [SignOutAfterInSeconds <Int64?>]: Number of seconds of inactivity after which a user is signed out. [WarnAfterInSeconds <Int64?>]: Number of seconds of inactivity after which a user is notified that they'll be signed out.