Configuration using PowerShell

 

Applies To: Service Bus for Windows Server 1.1

You can create PowerShell scripts that use these cmdlets to set up or change the configuration of the Service Bus for Windows Server.

To run PowerShell manually and enter configuration cmdlets:

  1. Open the Start menu.

  2. In All Programs, go to Service Bus 1.1. Then click on the Service Bus PowerShell shortcut to launch PowerShell console.

The following table lists the cmdlets that you use to configure the Service Bus for Windows Server. The cmdlets are re-entrant in case of failures. For example, running New-SBFarm will fail if SQL connectivity is lost during the farm configuration. In that case ensure that the SQL Server is up and running and call New-SBFarm again.

Configuration Action

PowerShell Cmdlet

Effect

Manage farms and nodes

New-SBFarm

Creates a new farm.

Add-SBHost

Adds a node to an existing farm.

Remove-SBHost

Removes a node from a farm.

Manage certificates

Set-SBCertificate

Replaces the certificate provided to the Service Bus for Windows Server farm. Use this cmdlet to follow a security compliance requirement of changing certificates.

Set-SBCertificateAutogenerationKey

Use this cmdlet to change the key used for securing auto generated certificates. Changing the key regenerates the certificate authority used for auto generation and the auto generated certificates. Therefore, the new CA must be installed on the client machines.

Update-SBHostUpdate-SBHost

Propagates changes to each machine in a farm. The new certificates must be manually installed on each machine in the farm.

Get-SBAutoGeneratedCA

Retrieves the certificate authority that was used for certificate auto generation. This CA is required to be installed on the client machine if the client for the Service Bus for Windows Server is not on the same as server machine.

Get-SBFarm

Displays the farm configuration values.

Get-SBFarmStatus

Displays the farm status values.

Manage Share Access Signature (SAS) rules.

New-SBAuthorizationRule

Creates an authorization rule for a namespace or entity.

Get-SBAuthorizationRule

Display authorization rules per namespace or entity.

Set-SBAuthorizationRule

Change authorization rules.

Remove-SBAuthorizationRule

Delete authorization rules.

Start and stop servers.

Start-SBHost

Starts the services on the machine.

Stop-SBHost

Stops the services on the machine.

Start and stop a Service Bus for Windows Server farm.

Start-SBFarm

Starts the Service Bus for Windows Server service.

Stop-SBFarm

Stops the Service Bus for Windows Server service.

Modify Service Bus for Windows Server farm settings.

Set-SBFarm

Change the farm settings.

Enable and disable participation in the Customer Experience Improvement Program (CEIP).

Enable-SBHostCEIP

Enables your Customer Experience Improvement participation.

Disable-SBHostCEIP

Disables your current Customer Experience Improvement participation.

You can find a script that demonstrates how to create a Service Bus for Windows Server farm in Sample Script for Creating a Service Bus Farm1.