The following cmdlets and aliases are provided by the ServiceControl Management PowerShell module for the management of ServiceControl instances.
All of the cmdlets have local help which can be accessed via the standard PowerShell help command
New-ServiceControlInstance -Name Test.ServiceControl -InstallPath C:\ServiceControl\Bin -DBPath C:\ServiceControl\DB -LogPath C:\ServiceControl\Logs -Port 33334 -DatabaseMaintenancePort 33335 -Transport MSMQ -ErrorQueue error1 -AuditQueue audit1 -ForwardAuditMessages:$false -AuditRetentionPeriod 01:00:00 -ErrorRetentionPeriod 10:00:00:00
There are additional parameters available to set additional configuration options such as forwarding queues, the transport connection string or hostname.
The following commands show how to remove a ServiceControl instance(s). To List existing instances of the ServiceControl service use
Remove the instance that was created in the Add sample and delete the database and logs:
Remove-ServiceControlInstance -Name Test.ServiceControl -RemoveDB -RemoveLogs
Remove all ServiceControl instance created in the Add sample and delete the database and logs for each one:
Get-ServiceControlInstances | Remove-ServiceControlInstance -RemoveDB -RemoveLogs
There are additional parameters available to set additional configuration options such as forwarding queues, the transport connection string or host name.
The following command will list the ServiceControl instances current installed and their version number.
Get-ServiceControlInstances | Select Name, Version
To upgrade and instance to the latest version of the binaries run.
Invoke-ServiceControlInstanceUpgrade -Name <Instance To upgrade>
The upgrade will stop the service if it is running. Additional parameters for
Invoke-ServiceControlInstanceUpgrade may be required. The configuration file of the existing version is examined prior to determine if all the required settings are present. If a configuration setting is missing then the cmdlet will throw an error indicating the required additional parameter.