Set-SPServer

Cambia el rol del servidor.

Syntax

Set-SPServer
   [-Identity] <SPServerPipeBind>
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Role <SPServerRole>]
   [-Status <SPObjectStatus>]
   [<CommonParameters>]

Description

El cmdlet Set-SPServer cambia el rol del servidor de la granja de servidores mediante el parámetro Role. Un nuevo cmdlet en SharePoint Server 2016, SharePoint Server 2019 que se usa en MinRole.

Ejemplos

--------------------EJEMPLO---------------------

Set-SPServer -Role SingleServerFarm

En este ejemplo se cambia el servidor al rol SingleServerFarm.

Parámetros

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

NOTA: Cuando se usa el parámetro Global, todos los objetos se encuentran en el almacén global. Si los objetos no se usan de forma inmediata o se eliminan mediante el comando Stop-SPAssignment, puede producirse un error de memoria insuficiente.

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Identidad

Especifica el nombre del servidor de la granja de servidores.

Type:SPServerPipeBind
Aliases:Address
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Role

Especifica el nombre del rol de servidor que desea cambiar.

Los valores válidos son:

  • WebFrontEnd
  • Application
  • SingleServerFarm
  • Caché distribuida
  • Búsqueda
  • Personalizado
  • ApplicationWithSearch
  • WebFrontEndWithDistributedCache
Type:SPServerRole
Accepted values:Application, ApplicationWithSearch, Custom, DistributedCache, Search, SingleServerFarm, WebFrontEnd, WebFrontEndWithDistributedCache
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Status

Establece el estado del servidor en la granja de servidores.

Type:SPObjectStatus
Accepted values:Online, Disabled, Offline, Unprovisioning, Provisioning, Upgrading, Patching
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

Entradas

Microsoft.SharePoint.PowerShell.SPServerPipeBind

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Salidas

System.Object