diff --git a/src/NServiceBus.PowerShell/Cmdlets/InstallPlatformLicense.cs b/src/NServiceBus.PowerShell/Cmdlets/InstallPlatformLicense.cs index 9ab7ef6..d82c71e 100644 --- a/src/NServiceBus.PowerShell/Cmdlets/InstallPlatformLicense.cs +++ b/src/NServiceBus.PowerShell/Cmdlets/InstallPlatformLicense.cs @@ -9,6 +9,7 @@ using RegistryView = Helpers.RegistryView; [Cmdlet(VerbsLifecycle.Install, "NServiceBusPlatformLicense", DefaultParameterSetName = "ByLicenseFile")] + [Obsolete(@"Installing license information in the registry has been deprecated as the Particular Platform reads license info from file system. For legacy installations this cmdlet can still be used. See https://docs.particular.net/search?q=license.")] public class InstallPlatformLicense : CmdletBase { [Parameter(Mandatory = true, HelpMessage = "Platform license file to import", Position = 0, ParameterSetName = "ByLicenseFile")] @@ -19,6 +20,11 @@ public class InstallPlatformLicense : CmdletBase [ValidateNotNullOrEmpty] public string LicenseString { get; set; } + protected override void BeginProcessing() + { + WriteWarning("Installing license information in the registry has been deprecated as the Particular Platform reads license info from file system. For legacy installations this cmdlet can still be used. See https://docs.particular.net/search?q=license."); + } + protected override void ProcessRecord() { const string particular = @"Software\ParticularSoftware"; diff --git a/src/NServiceBus.PowerShell/Helpers/RegistryHelper.cs b/src/NServiceBus.PowerShell/Helpers/RegistryHelper.cs index 0a3797d..3ecd3d4 100644 --- a/src/NServiceBus.PowerShell/Helpers/RegistryHelper.cs +++ b/src/NServiceBus.PowerShell/Helpers/RegistryHelper.cs @@ -323,8 +323,7 @@ public object ReadValue(string subKeyName, string valueName, object defaultValue var cur = 0; var len = blob.Length; - // ReSharper disable once ConditionIsAlwaysTrueOrFalse - while (ret == 0 && cur < len) + while (cur < len) { var nextNull = cur; while (nextNull < len && blob[nextNull] != (char) 0) @@ -350,7 +349,6 @@ public object ReadValue(string subKeyName, string valueName, object defaultValue } cur = nextNull + 1; } - // ReSharper enable once ConditionIsAlwaysTrueOrFalse data = new String[strings.Count]; strings.CopyTo((String[]) data, 0); @@ -589,4 +587,4 @@ public RegistryValueKind GetRegistryValueKind(string subKeyName, string valueNam } } } -} \ No newline at end of file +} diff --git a/src/NServiceBus.PowerShell/NServiceBus.PowerShell.dll-help.xml b/src/NServiceBus.PowerShell/NServiceBus.PowerShell.dll-help.xml index 35f2233..fc22eb8 100644 --- a/src/NServiceBus.PowerShell/NServiceBus.PowerShell.dll-help.xml +++ b/src/NServiceBus.PowerShell/NServiceBus.PowerShell.dll-help.xml @@ -1,113 +1,143 @@ - - - - - Get-NServiceBusLocalMachineSettings + + + + + + Get-NServiceBusLocalMachineSettings + Get + NServiceBusLocalMachineSettings + + Shows the default Error and Audit queues. + + - Shows the default Error and Audit queues. + Reads the registry settings for the default audit and error queues. These settings can be found in the registry "HKEY_LOCAL_MACHINE\SOFTWARE\ParticularSoftware\ServiceBus". On 64 bit operating system the setting can also be set in the 32 bit registry. This cmdlet will list both 64-bit and 32-bit settings. + To add these properties use Set-NServiceBusLocalMachineSettings - - - - Get - NServiceBusLocalMachineSettings - - - - Reads the registry settings for the default audit and error queues. These settings can be found in the registry "HKEY_LOCAL_MACHINE\SOFTWARE\ParticularSoftware\ServiceBus". On 64 bit operating system the setting can also be set in the 32 bit registry. This cmdlet will list both 64-bit and 32-bit settings. - To add these properties use Set-NServiceBusLocalMachineSettings - - - - Get-NServiceBusLocalMachineSettings - - - - - - - + + + Get-NServiceBusLocalMachineSettings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This cmdlet requires elevated privileges. + + + + + + + Set-NServiceBusLocalMachineSettings - - - - - - - - - - - + + + Clear-NServiceBusLocalMachineSettings - - - - - - - - - - - - - This cmdlet requires elevated privileges. - - - - - - - Set-NServiceBusLocalMachineSettings - - - - Clear-NServiceBusLocalMachineSettings - - - - http://docs.particular.net - - - - - - - - Install-NServiceBusDTC + + + http://docs.particular.net + + + + + + + Install-NServiceBusDTC + Install + NServiceBusDTC + + Configures DTC on the machine to work with NServiceBus + + - Configures DTC on the machine to work with NServiceBus - - - - - Install - NServiceBusDTC - - - - This cmdlet will configure and attempt to start the Microsoft Distributed Transaction Coordinator service on this machine. To configure MSDTC with NServiceBus the cmdlet sets the following values under the -"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\Security" registry key: - NetworkDtcAccess : 1 (DWORD) + This cmdlet will configure and attempt to start the Microsoft Distributed Transaction Coordinator service on this machine. To configure MSDTC with NServiceBus the cmdlet sets the following values under the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\Security" registry key: + NetworkDtcAccess : 1 (DWORD) NetworkDtcAccessOutbound : 1 (DWORD) NetworkDtcAccessTransactions: 1 (DWORD) XaTransactions : 1 (DWORD) - If the optional PortRange parameter is supplied, then this value will be used for the DCOM Configuration. The format should be two numbers separated by a dash. (e.g. "5000-6000"). Specifically, the cmdlet will set the following values under the + If the optional PortRange parameter is supplied, then this value will be used for the DCOM Configuration. The format should be two numbers separated by a dash. (e.g. "5000-6000"). Specifically, the cmdlet will set the following values under the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\Internet" registry key: - Ports : [Based on value of PortRange parameter] (Multi-String Value) + Ports : [Based on value of PortRange parameter] (Multi-String Value) PortsInternetAvailable : "Y" (String Value) UseInternetPorts : "Y" (String Value) - - - - Install-NServiceBusDTC + + + + Install-NServiceBusDTC + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + + + PortRange + + + + String + + String + + + + WhatIf SwitchParameter + + SwitchParameter + + + Confirm @@ -115,291 +145,269 @@ UseInternetPorts : "Y" (String Value) SwitchParameter + + SwitchParameter + + + - - - - - PortRange - - - - String - - String - - - - - - WhatIf - - - - SwitchParameter - - SwitchParameter - - - - - - Confirm - - - - SwitchParameter - - SwitchParameter - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This cmdlet requires elevated privileges. + + + + + + + Test-NServiceBusDTCInstallation - - - - - - - - - - - + + + http://docs.particular.net - - - - - - - - - - - - - This cmdlet requires elevated privileges. - - - - - - - Test-NServiceBusDTCInstallation - - - - http://docs.particular.net - - - - - - - - Install-NServiceBusMSMQ + + + + + + Install-NServiceBusMSMQ + Install + NServiceBusMSMQ + + Configures MSMQ on the machine to work with NServiceBus + + - Configures MSMQ on the machine to work with NServiceBus + This cmdlet will configure and attempt install and configuration the MSMQ service on this machine. The cmdlet uses either OCSetup.exe or DISM.exe command to install the required Windows Feature depending on the version of Windows installed. + If a Windows Feature installation is installed a reboot may be required to complete the install. - - - - Install - NServiceBusMSMQ - - - - This cmdlet will configure and attempt install and configuration the MSMQ service on this machine. The cmdlet uses either OCSetup.exe or DISM.exe command to install the required Windows Feature depending on the version of Windows installed. - If a Windows Feature installation is installed a reboot may be required to complete the install. - - - - - Install-NServiceBusMSMQ - - - - - - - - + + + Install-NServiceBusMSMQ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This cmdlet requires elevated privileges. + + + + + + + Test-NServiceBusMSMQInstallation - - - - - - - - - - - + + + http://docs.particular.net - - - - - - - - - - - - - This cmdlet requires elevated privileges. - - - - - - - Test-NServiceBusMSMQInstallation - - - - http://docs.particular.net - - - - - - - - Install-NServiceBusPerformanceCounters + + + + + + Install-NServiceBusPerformanceCounters + Install + NServiceBusPerformanceCounters + + Adds NServiceBus performance counters on this machine. + + - Adds NServiceBus performance counters on this machine. - - - - - Install - NServiceBusPerformanceCounters - - - - This cmdlet adds the "NServiceBus statistics" Performance Monitor category. + This cmdlet adds the "NServiceBus statistics" Performance Monitor category. Underneath this category the following counter are added: - - Critical Time + - Critical Time - SLA violation countdown - # of msgs successfully processed / sec - # of msgs pulled from the input queue /sec - # of msgs failures / sec - Use the Test-NServiceBusPerformanceCountersInstallation cmdlet to verify the counters exist. + Use the Test-NServiceBusPerformanceCountersInstallation cmdlet to verify the counters exist. - - - - Install-NServiceBusPerformanceCounters + + + + Install-NServiceBusPerformanceCounters + + Force + + + + SwitchParameter + + + + Force SwitchParameter + + SwitchParameter + + + - - - - - Force - - - - SwitchParameter - - SwitchParameter - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This cmdlet requires elevated privileges. + + + + + + + Test-NServiceBusPerformanceCountersInstallation - - - - - - - - - - - + + + Uninstall-NServiceBusPerformanceCounters - - - - - - - - - - - - - This cmdlet requires elevated privileges. - - - - - - - Test-NServiceBusPerformanceCountersInstallation - - - - Uninstall-NServiceBusPerformanceCounters - - - - http://docs.particular.net - - - - - - - - Remove-NServiceBusMSMQWorker + + + http://docs.particular.net + + + + + + + Remove-NServiceBusMSMQWorker + Remove + NServiceBusMSMQWorker + + Sends a disconnect message to the distributor to remove a worker. + + - Sends a disconnect message to the distributor to remove a worker. + This cmdlet can be used to sent a disconnect message to the Distributor control queue. + When the Distributor processes it, the Worker with the address specified in the message is set to "disconnected". - - - - Remove - NServiceBusMSMQWorker - - - - This cmdlet can be used to sent a disconnect message to the Distributor control queue. - When the Distributor processes it, the Worker with the address specified in the message is set to "disconnected". - - - - - Remove-NServiceBusMSMQWorker + + + Remove-NServiceBusMSMQWorker + + WorkerAddress + + + + String + + + DistributorAddress + + + + String + + + TransactionalDistributorQueue + + + + Boolean + + + + WorkerAddress String + + String + + + DistributorAddress @@ -407,6 +415,11 @@ Underneath this category the following counter are added: String + + String + + + TransactionalDistributorQueue @@ -414,118 +427,101 @@ Underneath this category the following counter are added: Boolean + + Boolean + + + - - - - - WorkerAddress - - - - String - - String - - - - - - DistributorAddress - - - - String - - String - - - - - - TransactionalDistributorQueue - - - - Boolean - - Boolean - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This cmdlet requires elevated privileges. + + + + + + + http://docs.particular.net - - - - - - - - - - - + + + - - - - - - - - - - - - - This cmdlet requires elevated privileges. - - - - - - - http://docs.particular.net - - - - - - - - - - - - Set-NServiceBusLocalMachineSettings + + + + + + Set-NServiceBusLocalMachineSettings + Set + NServiceBusLocalMachineSettings + + Sets the default Error and Audit queues. + + - Sets the default Error and Audit queues. + Sets the registry settings for the default audit and error queues. These settings can be found in the registry under "HKEY_LOCAL_MACHINE\SOFTWARE\ParticularSoftware\ServiceBus". On 64 bit operating system the settings are applied to both the 32-bit and 64-bit registry. - - - - Set - NServiceBusLocalMachineSettings - - - - Sets the registry settings for the default audit and error queues. These settings can be found in the registry under "HKEY_LOCAL_MACHINE\SOFTWARE\ParticularSoftware\ServiceBus". On 64 bit operating system the settings are applied to both the 32-bit and 64-bit registry. - - - - Set-NServiceBusLocalMachineSettings + + + Set-NServiceBusLocalMachineSettings + + ErrorQueue + + + + String + + + AuditQueue + + + + String + + + + ErrorQueue String + + String + + + AuditQueue @@ -533,545 +529,492 @@ Underneath this category the following counter are added: String + + String + + + - - - - - ErrorQueue - - - - String - - String - - - - - - AuditQueue - - - - String - - String - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This cmdlet requires elevated privileges. + + + + + + + Get-NServiceBusLocalMachineSettings - - - - - - - - - - - + + + Clear-NServiceBusLocalMachineSettings - - - - - - - - - - - - - This cmdlet requires elevated privileges. - - - - - - - Get-NServiceBusLocalMachineSettings - - - - Clear-NServiceBusLocalMachineSettings - - - - http://docs.particular.net - - - - - - - - Test-NServiceBusDTCInstallation + + + http://docs.particular.net + + + + + + + Test-NServiceBusDTCInstallation + Test + NServiceBusDTCInstallation + + Test the configuration of the DTC service to ensure it has the appropriate setting to work with NServiceBus + + - Test the configuration of the DTC service to ensure it has the appropriate setting to work with NServiceBus - - - - - Test - NServiceBusDTCInstallation - - - - This cmdlet will check the Microsoft Distributed Transaction Co-ordinator service on this machine is setup for use with NServiceBus. Specifically it checks the following values under the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\Security" registry key are set as follows: - NetworkDtcAccess : 1 (DWORD) + This cmdlet will check the Microsoft Distributed Transaction Co-ordinator service on this machine is setup for use with NServiceBus. Specifically it checks the following values under the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\Security" registry key are set as follows: + NetworkDtcAccess : 1 (DWORD) NetworkDtcAccessOutbound : 1 (DWORD) NetworkDtcAccessTransactions: 1 (DWORD) XaTransactions : 1 (DWORD) - These settings can be set by using the Install-NServiceBusDTC cmdlet - - - - - Test-NServiceBusDTCInstallation - - - - - - - + These settings can be set by using the Install-NServiceBusDTC cmdlet + + + + Test-NServiceBusDTCInstallation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This cmdlet requires elevated privileges. + + + + + + + Install-NServiceBusDTC - - - - - - - - - - - + + + http://docs.particular.net - - - - - - - - - - - - - This cmdlet requires elevated privileges. - - - - - - - Install-NServiceBusDTC - - - - http://docs.particular.net - - - - - - - - Test-NServiceBusMSMQInstallation + + + + + + Test-NServiceBusMSMQInstallation + Test + NServiceBusMSMQInstallation + + Validates MSMQ is correctly installed on the machine + + - Validates MSMQ is correctly installed on the machine + This cmdlet validates MSMQ is installed on the machine and the correct MSMQ sub features are installed. The cmdlet will also check that the service is started. - - - - Test - NServiceBusMSMQInstallation - - - - This cmdlet validates MSMQ is installed on the machine and the correct MSMQ sub features are installed. The cmdlet will also check that the service is started. - - - - Test-NServiceBusMSMQInstallation - - - - - - - + + + Test-NServiceBusMSMQInstallation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This cmdlet requires elevated privileges. + + + + + + + Install-NServiceBusMSMQ - - - - - - - - - - - + + + http://docs.particular.net - - - - - - - - - - - - - This cmdlet requires elevated privileges. - - - - - - - Install-NServiceBusMSMQ - - - - http://docs.particular.net - - - - - - - - Test-NServiceBusPerformanceCountersInstallation + + + + + + Test-NServiceBusPerformanceCountersInstallation + Test + NServiceBusPerformanceCountersInstallation + + Validates that NServiceBus performance counters are correctly installed on the machine. + + - Validates that NServiceBus performance counters are correctly installed on the machine. + This cmdlet validates that NServiceBus performance counters are correctly installed on the machine. Refer to Install-NserviceBusPerformanceCounters for more details regarding the NServiceBus performance counters. - - - - Test - NServiceBusPerformanceCountersInstallation - - - - This cmdlet validates that NServiceBus performance counters are correctly installed on the machine. Refer to Install-NserviceBusPerformanceCounters for more details regarding the NServiceBus performance counters. - - - - - Test-NServiceBusPerformanceCountersInstallation - - - - - - - + + + Test-NServiceBusPerformanceCountersInstallation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This cmdlet requires elevated privileges. + + + + + + + Install-NServiceBusPerformanceCounters - - - - - - - - - - - + + + Uninstall-NServiceBusPerformanceCounters - - - - - - - - - - - - - This cmdlet requires elevated privileges. - - - - - - - Install-NServiceBusPerformanceCounters - - - - Uninstall-NServiceBusPerformanceCounters - - - - http://docs.particular.net - - - - - - - - Uninstall-NServiceBusPerformanceCounters + + + http://docs.particular.net + + + + + + + Uninstall-NServiceBusPerformanceCounters + Uninstall + NServiceBusPerformanceCounters + + Removes the NServiceBus performance counters from this machine. + + + - Removes the NServiceBus performance counters from this machine. - - - - - Uninstall - NServiceBusPerformanceCounters - - - - This cmdlet removes the NServiceBus performance if they are installed on this machine. Refer to Install-NserviceBusPerformanceCounters for more details regarding the NServiceBus performance counters. + This cmdlet removes the NServiceBus performance if they are installed on this machine. Refer to Install-NserviceBusPerformanceCounters for more details regarding the NServiceBus performance counters. - - - - Uninstall-NServiceBusPerformanceCounters - - - - - - - - + + + + Uninstall-NServiceBusPerformanceCounters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This cmdlet requires elevated privileges + Refer to https://docs.particular.net for more information + + + + + + + Install-NServiceBusPerformanceCounters - - - - - - - - - - - + + + Test-NServiceBusPerformanceCountersInstallation - - - - - - - - - - - - - This cmdlet requires elevated privileges - Refer to https://docs.particular.net for more information - - - - - - - Install-NServiceBusPerformanceCounters - - - - Test-NServiceBusPerformanceCountersInstallation - - - - http://docs.particular.net - - - - - - - - Clear-NServiceBusLocalMachineSettings + + + http://docs.particular.net + + + + + + + Clear-NServiceBusLocalMachineSettings + Clear + NServiceBusLocalMachineSettings + + Removes the default Error and Audit queues settings. + + - Removes the default Error and Audit queues settings. + Removes the registry settings for the default audit and error queues. These settings can be found in the registry "HKEY_LOCAL_MACHINE\SOFTWARE\ParticularSoftware\ServiceBus". On 64 bit operating system the setting is removed in both the 32 bit registry and 64 bit registry. - - - - Clear - NServiceBusLocalMachineSettings - - - - Removes the registry settings for the default audit and error queues. These settings can be found in the registry "HKEY_LOCAL_MACHINE\SOFTWARE\ParticularSoftware\ServiceBus". On 64 bit operating system the setting is removed in both the 32 bit registry and 64 bit registry. - - - - Clear-NServiceBusLocalMachineSettings - - - - - - - + + + Clear-NServiceBusLocalMachineSettings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This cmdlet requires elevated privileges. + + + + + + + Get-NServiceBusLocalMachineSettings - - - - - - - - - - - + + + Set-NServiceBusLocalMachineSettings - - - - - - - - - - - - - This cmdlet requires elevated privileges. - - - - - - - Get-NServiceBusLocalMachineSettings - - - - Set-NServiceBusLocalMachineSettings - - - - http://docs.particular.net - - - - - - - - Install-NServiceBusPlatformLicense + + + http://docs.particular.net + + + + + + + Install-NServiceBusPlatformLicense + Install + NServiceBusPlatformLicense + + Imports the Particular Platform License into the registry + + - Imports the Particular Platform License into the registry + Imports the the Particular Platform License into the registry. For 64-bit operating systems the license is written to both the 32-bit and 64-bit registry. Provide either LicenseFile or LicenseString. - - - - Install - NServiceBusPlatformLicense - - - - Imports the the Particular Platform License into the registry. For 64-bit operating systems the license is written to both the 32-bit and 64-bit registry. Provide either LicenseFile or LicenseString. - - - - Install-NServiceBusPlatformLicense + + + Install-NServiceBusPlatformLicense + + LicenseFile + + + + String + + + + + LicenseString + + + + String + + + + LicenseFile String + + String + + + - - - + LicenseString String + + String + + + - - - - - LicenseFile - - - - String - - String - - - - - - LicenseString - - - - String - - String - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This cmdlet requires elevated privileges. - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This cmdlet requires elevated privileges. + + + + + + + \ No newline at end of file diff --git a/src/NServiceBus.PowerShell/NServiceBus.Powershell.psd1 b/src/NServiceBus.PowerShell/NServiceBus.Powershell.psd1 index fd895ea..ee782a7 100644 --- a/src/NServiceBus.PowerShell/NServiceBus.Powershell.psd1 +++ b/src/NServiceBus.PowerShell/NServiceBus.Powershell.psd1 @@ -7,7 +7,7 @@ CLRVersion = '4.0' DotNetFrameworkVersion = '4.5.2' CompanyName = 'Particular Software' - Copyright = '(c) 2015 NServiceBus Ltd. All rights reserved.' + Copyright = '(c) 2020 NServiceBus Ltd. All rights reserved.' FunctionsToExport='*' CmdletsToExport = '*' VariablesToExport = '*'