Set-SPSiteAdministration

Allows farm administrators to configure any site collection.

Syntax

Set-SPSiteAdministration
   [-Identity] <SPSiteAdministrationPipeBind>
   [-AdministrationSiteType <SPAdministrationSiteType>]
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-Force]
   [-SiteSubscription <SPSiteSubscriptionPipeBind>]
   [-WhatIf]
   [<CommonParameters>]
Set-SPSiteAdministration
   [-Identity] <SPSiteAdministrationPipeBind>
   [-AdministrationSiteType <SPAdministrationSiteType>]
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-LockState <String>]
   [-MaxSize <Int64>]
   [-OwnerAlias <SPUserPipeBind>]
   [-SecondaryOwnerAlias <SPUserPipeBind>]
   [-Template <SPWebTemplatePipeBind>]
   [-WarningSize <Int64>]
   [-WhatIf]
   [<CommonParameters>]

Description

This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet parameter sets.

The Set-SPSiteAdministration cmdlet allows a farm administrator to configure particular settings on a site collection even if the farm administrator is not granted explicit permissions. Any parameter that is not provided is not changed.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint Server Cmdlets.

Examples

--------------------EXAMPLE---------------------

Set-SPSiteAdministration https://sitename -OwnerAlias "DOMAIN\NewOwner"

This example allows farm administrators to change the ownership of a site collection to which they do not have access.

Parameters

-AdministrationSiteType

Specifies the site type.

Valid values are None or TentantAdministration.

Type:SPAdministrationSiteType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-AssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type:SPAssignmentCollection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-Confirm

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-Force

Suppresses confirmation messages involved in setting the site subscription. This parameter is used in conjunction with the SiteSubscription parameter.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-Identity

Specifies the URL (full or partial) or GUID of the site collection.

The type must be a valid URL, in the form https://server_name, or a GUID, in the form 1234-456-987fg.

Type:SPSiteAdministrationPipeBind
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-LockState

Specifies the lock state for the given site collection.

The type must be any of the following values:

  • Unlock: Sets the site collection to unlock.
  • Content: No new content can be added. Updates and deletions are allowed.
  • Readonly: Sets the site collection to read-only.
  • Noaccess: Sets the site collection to unavailable to all users.
Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-MaxSize

Sets the maximum storage size of the site collection.

The type must be a valid number greater than or equal to 0.

Set to 0 for unlimited.

Type:Int64
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-OwnerAlias

Sets the owner of this site collection.

The type must be a valid user alias.

Type:SPUserPipeBind
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-SecondaryOwnerAlias

Sets the secondary owner of this site collection.

The type must be a valid user alias.

Type:SPUserPipeBind
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-SiteSubscription

Specifies the Site Group to get site collections.

Type:SPSiteSubscriptionPipeBind
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-Template

Specifies the Web template for the top-level Web site of this site collection. This can only be given if the template has not already been configured.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890abcdef, or an SPWebTemplate object.

Type:SPWebTemplatePipeBind
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-WarningSize

Specifies the site collection warning size limit.

The type must be a valid number greater than or equal to 0. Set to 0 for unlimited.

Type:Int64
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019

-WhatIf

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019