Share via


Add-CrmServer

Adds a Dynamics 365 server to the specified deployment.

Syntax

Default (Default)

Add-CrmServer
    [[-CrmSqlServer] <String>]
    [-Activate]
    [-Timeout <Int32>]
    [-Diag]
    [-Credential <PSCredential>]
    [-DwsServerUrl <String>]
    [-WhatIf]
    [-Confirm]

Description

The Add-CrmServer cmdlet adds a server to the Dynamics 365 deployment, specified by CrmSqlDeploymentServer or the preconfigured deployment for this server. This is used when adding a new, prebuilt server node to an existing deployment. This cmdlet must be run from the server that’s being added to the deployment and the user identity running the cmdlet must have privileges to access the MSCRM_CONFIG database on the Dynamics 365 deployment host SQL Server.

Examples

Example 1

PS C:\> Add-CrmServer -Activate -CrmSqlServer sqlserver -Credential $Cred -DwsServerUrl https://contoso

Adds and enables a Dynamics 365 server to the named contoso deployment.

Parameters

-Activate

Instructs the cmdlet to enable the server as part of adding the server to the deployment. The default value is False.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
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

-Credential

Variable that contains the user credentials used for signing in to Dynamics 365 on-premises organization. To establish this variable, run the PowerShell command $Cred = Get-Credential.

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-CrmSqlServer

Specifies a string that contains the name of the Microsoft SQL Server or SQL Server instance servicing the MSCRM_CONFIG database.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Diag

Turns on stack traces for error reports returned from Dynamics 365 service calls. Enabling this emits a detailed error message, including a stack trace, when an error is encountered by the Dynamics 365 PowerShell command.

Parameter properties

Type:SwitchParameter
Default value:None
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

-DwsServerUrl

The URL of the Deployment Web Service. This should be in the format: https://<serverurl>, for example, https://contoso.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Timeout

For internal use only.

Parameter properties

Type:Int32
Default value:None
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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
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

Inputs

System.String

System.Management.Automation.SwitchParameter

System.Int32

System.Management.Automation.PSCredential

Outputs

System.Object