ServiceControl instance Cmdlets and Aliases
The following cmdlets and aliases are provided by the ServiceControl Management PowerShell module for the management of ServiceControl instances.
Alias | Cmdlet |
---|---|
sc-add | New-ServiceControlInstance |
sc-delete | Remove-ServiceControlInstance |
sc-instances | Get-ServiceControlInstances |
sc-transportsinfo | Get-ServiceControlTransportTypes |
sc-upgrade | Invoke-ServiceControlInstanceUpgrade |
The following cmdlets are available for the management of ServiceControl Audit instances.
Alias | Cmdlet |
---|---|
audit-add | New-ServiceControlAuditInstance |
audit-delete | Remove-ServiceControlAuditInstance |
audit-instances | Get-ServiceControlAuditInstances |
audit-upgrade | Invoke-ServiceControlAuditInstanceUpgrade |
The following cmdlets are available for the management of ServiceControl remotes.
Alias | Cmdlet |
---|---|
sc-addremote | Add-ServiceControlRemote |
sc-deleteremote | Remove-ServiceControlRemote |
sc-remotes | Get-ServiceControlRemotes |
The following cmdlets are available for the management of ServiceControl Monitoring instances.
Alias | Cmdlet |
---|---|
mon-add | New-MonitoringInstance |
mon-delete | Remove-MonitoringInstance |
mon-instances | Get-MonitoringInstances |
mon-upgrade | Invoke-MonitoringInstanceUpgrade |
The following general cmdlets and aliases are provided by the ServiceControl Management PowerShell module.
Alias | Cmdlet |
---|---|
sc-addlicense | Import-ServiceControlLicense |
sc-findlicense | Get-ServiceControlLicense |
sc-help | Get-ServiceControlMgmtCommands |
urlacl-add | Add-UrlAcl |
urlacl-delete | Remove-UrlAcl |
urlacl-list | Get-UrlAcls |
port-check | Test-IfPortIsAvailable |
user-sid | Get-SecurityIdentifier |
Help
All of the cmdlets have local help which can be accessed via the standard PowerShell help command
Get-Help Get-ServiceControlInstances
Adding an instance
Use the New-ServiceControlInstance
cmdlet to create a new ServiceControl instance. Version 3 and below contains parameters to configure audit ingestion and retention. Managing an audit queue on version 4 and above requires creating a new ServiceControl Audit instance with New-ServiceControlAuditInstance
.
There are additional parameters available to set additional configuration options such as forwarding queues, the transport connection string, or host name.
Create a ServiceControl instance:
$serviceControlInstance = 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 `
-ErrorRetentionPeriod 10:00:00:00
Create a ServiceControl Audit instance to manage an audit queue:
$auditInstance = New-ServiceControlAuditInstance `
-Name Test.ServiceControl.Audit `
-InstallPath C:\ServiceControl.Audit\Bin `
-DBPath C:\ServiceControl.Audit\DB `
-LogPath C:\ServiceControl.Audit\Logs `
-Port 44444 `
-DatabaseMaintenancePort 44445 `
-Transport MSMQ `
-AuditQueue audit1 `
-AuditRetentionPeriod 10:00:00:00 `
-ForwardAuditMessages:$false `
-ServiceControlQueueAddress Test.ServiceControl
Add-ServiceControlRemote `
-Name $serviceControlInstance.Name `
-RemoteInstanceAddress $auditInstance.Url
Removing an instance
Use the Remove-ServiceControlInstance
cmdlet to remove a ServiceControl instance.
Remove-ServiceControlInstance -Name Test.ServiceControl -RemoveDB -RemoveLogs
Use the Remove-ServiceControlAuditInstance
cmdlet to remove a ServiceControl Audit instance.
Remove-ServiceControlRemote `
-Name Test.ServiceControl `
-RemoteInstanceAddress http://localhost:44444/api
Remove-AuditInstance `
-Name Test.ServiceControl.Audit
-RemoveDB -RemoveLogs
Get-ServiceControlRemotes
cmdlet to find a list of connected ServiceControl Audit instances for a given ServiceControl instance.Upgrading an instance
The cmdlets in this section are used to upgrade the binaries of an existing instance. If the instance is running when the upgrade starts, it will be shut down during the upgrade and restarted once the upgrade is complete.
sc-upgrade
and audit-upgrade
commands do not download the latest available ServiceControl version. These Powershell commandlets are bound to the version of the Particular.ServiceControl.Management module loaded.Before the upgrade begins the configuration file of the existing version is examined to determine if all of the required settings are present. If a configuration setting is missing then the cmdlet will throw an error indicating the required additional parameter for the cmdlet.
Use the Invoke-ServiceControlInstanceUpgrade
cmdlet to upgrade a ServiceControl instance to the latest binaries.
Invoke-ServiceControlInstanceUpgrade -Name InstanceToUpgrade
Use the following to find a list of all of the ServiceControl instances and their version numbers:
Get-ServiceControlInstances | Select Name, Version
Additional parameters may be required when upgrading instances. See the upgrade guide for the specific version for more details.
Use the Invoke-AuditInstanceUpgrade
cmdlet to upgrade a ServiceControl audit instance to the latest binaries.
Invoke-ServiceControlAuditInstanceUpgrade -Name InstanceToUpgrade
Use the following command to find a list of all of the ServiceControl Audit instances and their version numbers:
Get-ServiceControlAuditInstances | Select Name, Version
Licensing
Copies the license file to the correct location on the file system (%PROGRAMDATA%/
) so it is available to all instances of ServiceControl installed on the machine.
Import-ServiceControlLicense License.xml