Connect-SPConfigurationDatabase

Connette il computer server locale a una farm.

Sintassi

Connect-SPConfigurationDatabase
       [-DatabaseName] <String>
       [-SkipRegisterAsDistributedCacheHost]
       [-Passphrase] <SecureString>
       -DatabaseServer <String>
       [-AssignmentCollection <SPAssignmentCollection>]
       [-DatabaseCredentials <PSCredential>]
       [-DatabaseFailOverPartner <String>]
       [-LocalServerRole <SPServerRole>]
       [<CommonParameters>]

Descrizione

Il cmdlet Connect-SPConfigurationDatabase connette il server corrente al database di configurazione specificato.

Essentially, this cmdlet connects the server to the farm. If the current computer cannot be connected to a farm, the following error message is displayed:

"Computer già connesso a una farm di SharePoint. Vedere: Dismount-SPConfigurationDatabase"

Per le autorizzazioni e le informazioni più recenti su Windows PowerShell per i prodotti SharePoint, vedere la documentazione online nella pagina Cmdlet server SharePoint.

Esempio

------------------ESEMPIO------------------

Connect-SPConfigurationDatabase -DatabaseServer "ServerName\InstanceName" -DatabaseName "SharePointConfigurationDatabaseName" -Passphrase (ConvertTo-SecureString "MyP@ssw0rd" -AsPlainText -Force)
Start-Service SPTimerv4

Questo esempio consente di aggiungere il computer server locale a una farm configurata per l'utilizzo del database SharePointConfigurationDatabase in un'istanza di SQL Server utilizzando il nome ServerName\InstanceName con la passphrase MyP@ssw0rd.

Parametri

-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
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-DatabaseCredentials

Specifies the PSCredential object that contains the user name and password to be used for database SQL authentication. If this parameter is not specified, the current user is used.

Il tipo deve essere un oggetto PSCredential valido.

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

-DatabaseFailOverPartner

Specifica il partner mirroring del database per un'istanza di SQL Server.

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

-DatabaseName

Specifica il nome del database di configurazione a cui connettere il server.

Il tipo deve essere un nome di database valido, ad esempio DB1.

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

-DatabaseServer

Specifica il server in cui creare il database di configurazione. Il valore predefinito è il nome del computer locale.

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

-LocalServerRole

Specifica l'oggetto MinRole assegnato al server locale.

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

-Passphrase

Specifica la passphrase sicura per la connessione del server corrente al database di configurazione.

Il tipo deve essere una stringa sicura valida, ad esempio ChiaveServerAppBDC1.

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

-SkipRegisterAsDistributedCacheHost

Per impostazione predefinita, tutti i server della farm vengono registrati come host della cache, ovvero per impostazione predefinita viene eseguito il servizio DistributedCacheService.

Use this parameter to not register the server computer as a distributed cache host. If you want to have a dedicated cache host, then use this parameter to make sure that caching service is not installed on the computer.

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