This topic has not yet been rated - Rate this topic

New-SBFarm

New-SBFarm

You can use this cmdlet to create a new Service Bus for Windows Server farm.

Syntax

Parameter Set: AutoGeneratedCert
New-SBFarm -CertificateAutoGenerationKey <SecureString> -SBFarmDBConnectionString <String> [-AdminGroup <String> ] [-GatewayDBConnectionString <String> ] [-HttpsPort <Int32> ] [-InternalPortRangeStart <Int32> ] [-MessageBrokerPort <Int32> ] [-MessageContainerDBConnectionString <String> ] [-RunAsAccount <String> ] [-TcpPort <Int32> ] [ <CommonParameters>]

Parameter Set: CustomCert
New-SBFarm -FarmCertificateThumbprint <String> -SBFarmDBConnectionString <String> [-AdminGroup <String> ] [-EncryptionCertificateThumbprint <String> ] [-GatewayDBConnectionString <String> ] [-HttpsPort <Int32> ] [-InternalPortRangeStart <Int32> ] [-MessageBrokerPort <Int32> ] [-MessageContainerDBConnectionString <String> ] [-RunAsAccount <String> ] [-TcpPort <Int32> ] [ <CommonParameters>]




Detailed Description

Run New-SBFarm to create a new Service Bus for Windows Server farm. This is the first step required for getting started with Service Bus for Windows Server. A Farm is a Service Bus for Windows Server configuration stored in a farm management database. It includes the settings required by Service Bus for Windows Server such as databases to use to store settings as well as messages, ports to use either externally with clients or internally between the hosts of the farm.

If an error occurs or you are forced to reboot during farm creation, the databases that are created may be left in a corrupt state. In that case, when you try to join a farm, the process may display an error that says that the machine you are trying to add to the farm is not a part of any farm. When you encounter such an error, you must drop the databases and recreate them before you can join any new nodes to the farm.

Parameters

-AdminGroup<String>

Represents the admin group.


Aliases

none

Required?

false

Position?

named

Default Value

BUILTIN\Administrators

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CertificateAutoGenerationKey<SecureString>

This passphrase is required for certificate auto generation. This parameter is mandatory if you want certificates to be auto generated.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EncryptionCertificateThumbprint<String>

This certificate is used for securing the SQL connection strings. If not provided, it will take the value of the SslCertificate. Represents the encryption certificate.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FarmCertificateThumbprint<String>

Represents the certificate that is used for securing the certificate. Do not provide this certificate if you are providing CertificateAutoGenerationKey for auto generation of certificates.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-GatewayDBConnectionString<String>

Represents a connection string of the gateway database. If not passed in will be created in the same SQL Server using SBFarmDBConnectionString with the default name of “SBGatewayDatabase”.


Aliases

none

Required?

false

Position?

named

Default Value

SBGatewayDatabase

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-HttpsPort<Int32>

Represents the port that the Service Bus for Windows Server uses for HTTPS communication.


Aliases

none

Required?

false

Position?

named

Default Value

9355

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InternalPortRangeStart<Int32>

Represents the start of the port range that the Service Bus for Windows Server uses for internal communication purposes.


Aliases

none

Required?

false

Position?

named

Default Value

9000-004

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MessageBrokerPort<Int32>

Represents the port that the Service Bus for Windows Server uses for MessageBroker communication.


Aliases

none

Required?

false

Position?

named

Default Value

9356

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MessageContainerDBConnectionString<String>

Represents a connection string of the message container. If not passed in will be created in the same SQL Server using SBFarmDBConnectionString with the default name of "SBMessageContainer01”.


Aliases

none

Required?

false

Position?

named

Default Value

SBMessageContainer01

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsAccount<String>

Represents the account under which the service runs. This account must be a domain account.


Aliases

none

Required?

false

Position?

named

Default Value

The account under which configuration is run

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SBFarmDBConnectionString<String>

Represents a connection string of the Service Bus for Windows Server database.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TcpPort<Int32>

Represents the port that the Service Bus for Windows Server uses for TCP.


Aliases

none

Required?

false

Position?

named

Default Value

9354

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1

Create a new Service Bus for Windows Server farm with default settings. The farm will use the local host SQLExpress database and will create 3 databases (ManagementDB, GatewayDB and MessageContainer1).


PS C:\> $mycert=ConvertTo-SecureString -string myPassword1 -force –AsPlainText; New-SBFarm  -SBFarmDBConnectionString 'Data Source=localhost\sqlexpress;Integrated Security=True' -CertificateAutoGenerationKey $mycert

Example 2

Create a new Service Bus for Windows Server farm where management and gateway databases are placed on MySQLServer server and the initial message container database is placed on myDedicatedMessagingSQLServer server. The Service Bus for Windows Server services will run under the myServiceAccount domain account and admin permissions are given to the myAdminsGroup Active directory users group.


PS C:\> $mycert=ConvertTo-SecureString -string myPassword1 -force –AsPlainText; New-SBFarm -SBFarmDBConnectionString 'Data Source=mySQLServer;Integrated Security=True' –RunAsAccount myServiceAccount –AdminGroup myAdminsGroup –MessageContainerDBConnectionString 'Data Source=myDedicatedMessagingSQLServer;Integrated Security=True' –CertificateAutoGenerationKey $mycert


Workflow Manager 1.0 MSDN Community Forum
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.