Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
…ershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-7.1 it seems that to suppress the warning the Cmdlet should be invoked with `-WarningAction SilentlyContinue` or have `$WarningPreference` set to `SilentlyContinue`.
  • Loading branch information
ramonsmits committed Dec 1, 2020
1 parent ae38d76 commit 887d85c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/NServiceBus.PowerShell/Cmdlets/InstallPlatformLicense.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using RegistryView = Helpers.RegistryView;

[Cmdlet(VerbsLifecycle.Install, "NServiceBusPlatformLicense", DefaultParameterSetName = "ByLicenseFile")]
[Obsolete(@"The default location for reading license information has changed from the registry to the file system. See https://docs.particular.net/search?q=license. This Cmdlet will be removed in NServiceBus.PowerShell v6.0.0")]
public class InstallPlatformLicense : CmdletBase
{
[Parameter(Mandatory = true, HelpMessage = "Platform license file to import", Position = 0, ParameterSetName = "ByLicenseFile")]
Expand All @@ -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. Use -Force to suppress this message.");
}

protected override void ProcessRecord()
{
const string particular = @"Software\ParticularSoftware";
Expand Down

0 comments on commit 887d85c

Please sign in to comment.