Skip to content

Commit 0a0dd87

Browse files
authored
Merge pull request #308 from viananth/ten-sub
Add warning to New-AzsSubscription and Get-AzureRmOffer cmdlets
2 parents 627cf9c + 41fa60f commit 0a0dd87

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/StackAdmin/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Offers/GetOffer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ public class GetOffer : AdminApiCmdlet
7070
/// </summary>
7171
protected override void ExecuteCore()
7272
{
73+
// note: this command should be deprecated
74+
WriteWarning("Get-AzureRmOffer cmdlet will be deprecated and moved to a different module in a future release.");
75+
7376
if (this.Managed.IsPresent)
7477
{
7578
this.WriteWarning("The switch parameter Managed will be deprecated in a future release. Please use the cmdlet Get-AzsManagedOffer instead");

src/StackAdmin/AzureStackAdmin/Commands.AzureStackAdmin/Microsoft.Subscriptions/Subscriptions/NewSubscription.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,8 @@ protected SubscriptionDefinition GetSubscriptionDefinition()
9090
/// </summary>
9191
protected override void ExecuteCore()
9292
{
93-
if (this.MyInvocation.InvocationName.Equals("New-AzureRmTenantSubscription", StringComparison.OrdinalIgnoreCase))
94-
{
95-
this.WriteWarning("Alias New-AzureRmTenantSubscription will be deprecated in a future release. Please use the cmdlet name New-AzsSubscription instead");
96-
}
93+
// note: this command should be deprecated
94+
WriteWarning("New-AzsSubscription cmdlet will be deprecated and moved to a different module in a future release.");
9795

9896
if (ShouldProcess(this.SubscriptionId, VerbsCommon.New))
9997
{

0 commit comments

Comments
 (0)