Skip to content

Commit 301cfe0

Browse files
committed
Deprecating Switch-AzureMode
1 parent 8cbee16 commit 301cfe0

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/Common/Commands.Common/Properties/Resources.Designer.cs

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Common/Commands.Common/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,4 +1358,7 @@ use and privacy statement at <url> and (c) agree to sharing my contact inf
13581358
<data name="AzureProfileMustNotBeNull" xml:space="preserve">
13591359
<value>Selected profile must not be null.</value>
13601360
</data>
1361+
<data name="SwitchAzureModeDeprecated" xml:space="preserve">
1362+
<value>The Switch-AzureMode cmdlet is deprecated and will be removed in a future release.</value>
1363+
</data>
13611364
</root>

src/Common/Commands.Profile/SwitchAzureMode.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using System;
1616
using System.Management.Automation;
17+
using Microsoft.WindowsAzure.Commands.Common.Properties;
1718
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1819
using Microsoft.Azure.Common.Authentication;
1920

@@ -34,6 +35,7 @@ public class SwitchAzureMode : AzurePSCmdlet
3435

3536
public override void ExecuteCmdlet()
3637
{
38+
WriteWarning(Resources.SwitchAzureModeDeprecated);
3739
AzureModule moduleToImport = (AzureModule)Enum.Parse(typeof(AzureModule), Name, false);
3840
AzureModule moduleToRemove = moduleToImport == AzureModule.AzureResourceManager ? AzureModule.AzureServiceManagement : AzureModule.AzureResourceManager;
3941
RemoveAzureModule(FileUtilities.GetModuleName(moduleToRemove), FileUtilities.GetPSModulePathForModule(moduleToRemove));

0 commit comments

Comments
 (0)