Remove-SBHost
Remove-SBHost
You can use this cmdlet to remove a machine joined to a Service Bus for Windows Server farm.
Syntax
Parameter Set: Default
Remove-SBHost [-HostName <String> ] [-SBFarmDBConnectionString <String> ] [ <CommonParameters>]
Detailed Description
Run Remove-SBHost to remove a host (machine) from the Service Bus for Windows Server farm configuration. You can only run Remove-SBHost from a host that is part of the farm.
Use Remove-SBHost locally before uninstalling Service Bus for Windows Server.
Use Remove-SBHost remotely by providing a HostName if you have lost one of your hosts and you wish to clean up the configuration of the Service Bus for Windows Server farm.
Parameters
-HostName<String>
The name of the host to be removed.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SBFarmDBConnectionString<String>
Specifies the connection string for the Service Bus for Windows Server management database. Use this parameter if you no longer have access to the host being removed.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).
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
Removes the current host from the Service Bus for Windows Server farm configuration.
PS C:\> Remove-SBHost
Example 2
Removes the host myHost from the Service Bus for Windows Server farm configuration.
PS C:\> Remove-SBHost –HostName myHost -SBFarmDBConnectionString 'SBFarmDBConnectionString'